Lines Matching refs:pg_vec
484 h.raw = rb->pg_vec[pg_vec_pos].buffer + in packet_lookup_frame()
574 struct pgv *pg_vec, in init_prb_bdqc() argument
583 p1->pkbdq = pg_vec; in init_prb_bdqc()
584 pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; in init_prb_bdqc()
585 p1->pkblk_start = pg_vec[0].buffer; in init_prb_bdqc()
2439 if (likely(po->tx_ring.pg_vec)) { in tpacket_destruct_skb()
2657 if (unlikely(!po->tx_ring.pg_vec)) { in tpacket_snd()
3014 if (po->tx_ring.pg_vec) in packet_sendmsg()
3060 if (po->rx_ring.pg_vec) { in packet_release()
3065 if (po->tx_ring.pg_vec) { in packet_release()
3758 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3778 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3797 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3846 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3909 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
4164 if (po->rx_ring.pg_vec) { in packet_poll()
4172 if (po->tx_ring.pg_vec) { in packet_poll()
4210 static void free_pg_vec(struct pgv *pg_vec, unsigned int order, in free_pg_vec() argument
4216 if (likely(pg_vec[i].buffer)) { in free_pg_vec()
4217 if (is_vmalloc_addr(pg_vec[i].buffer)) in free_pg_vec()
4218 vfree(pg_vec[i].buffer); in free_pg_vec()
4220 free_pages((unsigned long)pg_vec[i].buffer, in free_pg_vec()
4222 pg_vec[i].buffer = NULL; in free_pg_vec()
4225 kfree(pg_vec); in free_pg_vec()
4256 struct pgv *pg_vec; in alloc_pg_vec() local
4259 pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL | __GFP_NOWARN); in alloc_pg_vec()
4260 if (unlikely(!pg_vec)) in alloc_pg_vec()
4264 pg_vec[i].buffer = alloc_one_pg_vec_page(order); in alloc_pg_vec()
4265 if (unlikely(!pg_vec[i].buffer)) in alloc_pg_vec()
4270 return pg_vec; in alloc_pg_vec()
4273 free_pg_vec(pg_vec, order, block_nr); in alloc_pg_vec()
4274 pg_vec = NULL; in alloc_pg_vec()
4281 struct pgv *pg_vec = NULL; in packet_set_ring() local
4308 if (unlikely(rb->pg_vec)) in packet_set_ring()
4349 pg_vec = alloc_pg_vec(req, order); in packet_set_ring()
4350 if (unlikely(!pg_vec)) in packet_set_ring()
4356 init_prb_bdqc(po, rb, pg_vec, req_u); in packet_set_ring()
4403 swap(rb->pg_vec, pg_vec); in packet_set_ring()
4415 po->prot_hook.func = (po->rx_ring.pg_vec) ? in packet_set_ring()
4430 if (pg_vec && (po->tp_version > TPACKET_V2)) { in packet_set_ring()
4438 if (pg_vec) in packet_set_ring()
4439 free_pg_vec(pg_vec, order, req->tp_block_nr); in packet_set_ring()
4462 if (rb->pg_vec) { in packet_mmap()
4478 if (rb->pg_vec == NULL) in packet_mmap()
4483 void *kaddr = rb->pg_vec[i].buffer; in packet_mmap()