Lines Matching refs:pg_vec
482 h.raw = rb->pg_vec[pg_vec_pos].buffer + in packet_lookup_frame()
577 struct pgv *pg_vec, in init_prb_bdqc() argument
586 p1->pkbdq = pg_vec; in init_prb_bdqc()
587 pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; in init_prb_bdqc()
588 p1->pkblk_start = pg_vec[0].buffer; in init_prb_bdqc()
2393 if (likely(po->tx_ring.pg_vec)) { in tpacket_destruct_skb()
2950 if (po->tx_ring.pg_vec) in packet_sendmsg()
2996 if (po->rx_ring.pg_vec) { in packet_release()
3001 if (po->tx_ring.pg_vec) { in packet_release()
3684 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3704 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3723 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3772 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3821 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
4096 if (po->rx_ring.pg_vec) { in packet_poll()
4105 if (po->tx_ring.pg_vec) { in packet_poll()
4143 static void free_pg_vec(struct pgv *pg_vec, unsigned int order, in free_pg_vec() argument
4149 if (likely(pg_vec[i].buffer)) { in free_pg_vec()
4150 if (is_vmalloc_addr(pg_vec[i].buffer)) in free_pg_vec()
4151 vfree(pg_vec[i].buffer); in free_pg_vec()
4153 free_pages((unsigned long)pg_vec[i].buffer, in free_pg_vec()
4155 pg_vec[i].buffer = NULL; in free_pg_vec()
4158 kfree(pg_vec); in free_pg_vec()
4189 struct pgv *pg_vec; in alloc_pg_vec() local
4192 pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL); in alloc_pg_vec()
4193 if (unlikely(!pg_vec)) in alloc_pg_vec()
4197 pg_vec[i].buffer = alloc_one_pg_vec_page(order); in alloc_pg_vec()
4198 if (unlikely(!pg_vec[i].buffer)) in alloc_pg_vec()
4203 return pg_vec; in alloc_pg_vec()
4206 free_pg_vec(pg_vec, order, block_nr); in alloc_pg_vec()
4207 pg_vec = NULL; in alloc_pg_vec()
4214 struct pgv *pg_vec = NULL; in packet_set_ring() local
4240 if (unlikely(rb->pg_vec)) in packet_set_ring()
4281 pg_vec = alloc_pg_vec(req, order); in packet_set_ring()
4282 if (unlikely(!pg_vec)) in packet_set_ring()
4288 init_prb_bdqc(po, rb, pg_vec, req_u); in packet_set_ring()
4329 swap(rb->pg_vec, pg_vec); in packet_set_ring()
4339 po->prot_hook.func = (po->rx_ring.pg_vec) ? in packet_set_ring()
4354 if (pg_vec && (po->tp_version > TPACKET_V2)) { in packet_set_ring()
4360 if (pg_vec) in packet_set_ring()
4361 free_pg_vec(pg_vec, order, req->tp_block_nr); in packet_set_ring()
4384 if (rb->pg_vec) { in packet_mmap()
4400 if (rb->pg_vec == NULL) in packet_mmap()
4405 void *kaddr = rb->pg_vec[i].buffer; in packet_mmap()