Lines Matching refs:pg_vec
525 h.raw = rb->pg_vec[pg_vec_pos].buffer + in packet_lookup_frame()
656 struct pgv *pg_vec, in init_prb_bdqc() argument
665 p1->pkbdq = pg_vec; in init_prb_bdqc()
666 pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; in init_prb_bdqc()
667 p1->pkblk_start = pg_vec[0].buffer; in init_prb_bdqc()
2567 if (likely(po->tx_ring.pg_vec)) { in tpacket_destruct_skb()
2795 if (unlikely(!po->tx_ring.pg_vec)) { in tpacket_snd()
3159 if (data_race(po->tx_ring.pg_vec)) in packet_sendmsg()
3203 if (po->rx_ring.pg_vec) { in packet_release()
3208 if (po->tx_ring.pg_vec) { in packet_release()
3925 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3945 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3964 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
4018 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
4082 if (!po->rx_ring.pg_vec && !po->tx_ring.pg_vec) in packet_setsockopt()
4350 if (po->rx_ring.pg_vec) { in packet_poll()
4358 if (po->tx_ring.pg_vec) { in packet_poll()
4396 static void free_pg_vec(struct pgv *pg_vec, unsigned int order, in free_pg_vec() argument
4402 if (likely(pg_vec[i].buffer)) { in free_pg_vec()
4403 if (is_vmalloc_addr(pg_vec[i].buffer)) in free_pg_vec()
4404 vfree(pg_vec[i].buffer); in free_pg_vec()
4406 free_pages((unsigned long)pg_vec[i].buffer, in free_pg_vec()
4408 pg_vec[i].buffer = NULL; in free_pg_vec()
4411 kfree(pg_vec); in free_pg_vec()
4442 struct pgv *pg_vec; in alloc_pg_vec() local
4445 pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL | __GFP_NOWARN); in alloc_pg_vec()
4446 if (unlikely(!pg_vec)) in alloc_pg_vec()
4450 pg_vec[i].buffer = alloc_one_pg_vec_page(order); in alloc_pg_vec()
4451 if (unlikely(!pg_vec[i].buffer)) in alloc_pg_vec()
4456 return pg_vec; in alloc_pg_vec()
4459 free_pg_vec(pg_vec, order, block_nr); in alloc_pg_vec()
4460 pg_vec = NULL; in alloc_pg_vec()
4467 struct pgv *pg_vec = NULL; in packet_set_ring() local
4494 if (unlikely(rb->pg_vec)) in packet_set_ring()
4535 pg_vec = alloc_pg_vec(req, order); in packet_set_ring()
4536 if (unlikely(!pg_vec)) in packet_set_ring()
4542 init_prb_bdqc(po, rb, pg_vec, req_u); in packet_set_ring()
4589 swap(rb->pg_vec, pg_vec); in packet_set_ring()
4601 po->prot_hook.func = (po->rx_ring.pg_vec) ? in packet_set_ring()
4616 if (pg_vec && (po->tp_version > TPACKET_V2)) { in packet_set_ring()
4623 if (pg_vec) { in packet_set_ring()
4625 free_pg_vec(pg_vec, order, req->tp_block_nr); in packet_set_ring()
4649 if (rb->pg_vec) { in packet_mmap()
4665 if (rb->pg_vec == NULL) in packet_mmap()
4670 void *kaddr = rb->pg_vec[i].buffer; in packet_mmap()