Lines Matching refs:pg_vec
492 h.raw = rb->pg_vec[pg_vec_pos].buffer + in packet_lookup_frame()
602 struct pgv *pg_vec, in init_prb_bdqc() argument
611 p1->pkbdq = pg_vec; in init_prb_bdqc()
612 pbd = (struct tpacket_block_desc *)pg_vec[0].buffer; in init_prb_bdqc()
613 p1->pkblk_start = pg_vec[0].buffer; in init_prb_bdqc()
2095 if (likely(po->tx_ring.pg_vec)) { in tpacket_destruct_skb()
2590 if (po->tx_ring.pg_vec) in packet_sendmsg()
2634 if (po->rx_ring.pg_vec) { in packet_release()
2639 if (po->tx_ring.pg_vec) { in packet_release()
3325 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3345 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { in packet_setsockopt()
3360 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) in packet_setsockopt()
3397 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) in packet_setsockopt()
3436 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) in packet_setsockopt()
3679 if (po->rx_ring.pg_vec) { in packet_poll()
3686 if (po->tx_ring.pg_vec) { in packet_poll()
3724 static void free_pg_vec(struct pgv *pg_vec, unsigned int order, in free_pg_vec() argument
3730 if (likely(pg_vec[i].buffer)) { in free_pg_vec()
3731 if (is_vmalloc_addr(pg_vec[i].buffer)) in free_pg_vec()
3732 vfree(pg_vec[i].buffer); in free_pg_vec()
3734 free_pages((unsigned long)pg_vec[i].buffer, in free_pg_vec()
3736 pg_vec[i].buffer = NULL; in free_pg_vec()
3739 kfree(pg_vec); in free_pg_vec()
3770 struct pgv *pg_vec; in alloc_pg_vec() local
3773 pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL); in alloc_pg_vec()
3774 if (unlikely(!pg_vec)) in alloc_pg_vec()
3778 pg_vec[i].buffer = alloc_one_pg_vec_page(order); in alloc_pg_vec()
3779 if (unlikely(!pg_vec[i].buffer)) in alloc_pg_vec()
3784 return pg_vec; in alloc_pg_vec()
3787 free_pg_vec(pg_vec, order, block_nr); in alloc_pg_vec()
3788 pg_vec = NULL; in alloc_pg_vec()
3795 struct pgv *pg_vec = NULL; in packet_set_ring() local
3826 if (unlikely(rb->pg_vec)) in packet_set_ring()
3867 pg_vec = alloc_pg_vec(req, order); in packet_set_ring()
3868 if (unlikely(!pg_vec)) in packet_set_ring()
3876 init_prb_bdqc(po, rb, pg_vec, req_u, tx_ring); in packet_set_ring()
3907 swap(rb->pg_vec, pg_vec); in packet_set_ring()
3917 po->prot_hook.func = (po->rx_ring.pg_vec) ? in packet_set_ring()
3932 if (pg_vec && (po->tp_version > TPACKET_V2)) { in packet_set_ring()
3938 if (pg_vec) in packet_set_ring()
3939 free_pg_vec(pg_vec, order, req->tp_block_nr); in packet_set_ring()
3963 if (rb->pg_vec) { in packet_mmap()
3979 if (rb->pg_vec == NULL) in packet_mmap()
3984 void *kaddr = rb->pg_vec[i].buffer; in packet_mmap()