Lines Matching defs:rb

194 		struct packet_ring_buffer *rb,
483 struct packet_ring_buffer *rb,
490 pg_vec_pos = position / rb->frames_per_block;
491 frame_offset = position % rb->frames_per_block;
493 h.raw = rb->pg_vec[pg_vec_pos].buffer +
494 (frame_offset * rb->frame_size);
503 struct packet_ring_buffer *rb,
506 return packet_lookup_frame(po, rb, rb->head, status);
602 struct packet_ring_buffer *rb,
606 struct tpacket_kbdq_core *p1 = GET_PBDQC_FROM_RB(rb);
965 static void prb_clear_blk_fill_status(struct packet_ring_buffer *rb)
967 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb);
1110 struct packet_ring_buffer *rb,
1114 struct tpacket_kbdq_core *pkc = GET_PBDQC_FROM_RB(rb);
1122 static int prb_previous_blk_num(struct packet_ring_buffer *rb)
1125 if (rb->prb_bdqc.kactive_blk_num)
1126 prev = rb->prb_bdqc.kactive_blk_num-1;
1128 prev = rb->prb_bdqc.knum_blocks-1;
1134 struct packet_ring_buffer *rb,
1137 unsigned int previous = prb_previous_blk_num(rb);
1138 return prb_lookup_block(po, rb, previous, status);
1142 struct packet_ring_buffer *rb,
1146 return packet_previous_frame(po, rb, status);
1148 return __prb_previous_block(po, rb, status);
1152 struct packet_ring_buffer *rb)
1157 return packet_increment_head(rb);
1167 struct packet_ring_buffer *rb,
1170 unsigned int previous = rb->head ? rb->head - 1 : rb->frame_max;
1171 return packet_lookup_frame(po, rb, previous, status);
1179 static void packet_inc_pending(struct packet_ring_buffer *rb)
1181 this_cpu_inc(*rb->pending_refcnt);
1184 static void packet_dec_pending(struct packet_ring_buffer *rb)
1186 this_cpu_dec(*rb->pending_refcnt);
1189 static unsigned int packet_read_pending(const struct packet_ring_buffer *rb)
1195 if (rb->pending_refcnt == NULL)
1199 refcnt += *per_cpu_ptr(rb->pending_refcnt, cpu);
3746 struct packet_ring_buffer *rb;
3759 rb = tx_ring ? &po->tx_ring : &po->rx_ring;
3766 if (packet_read_pending(rb))
3773 if (unlikely(rb->pg_vec))
3803 rb->frames_per_block = req->tp_block_size/req->tp_frame_size;
3804 if (unlikely(rb->frames_per_block <= 0))
3806 if (unlikely((rb->frames_per_block * req->tp_block_nr) !=
3821 init_prb_bdqc(po, rb, pg_vec, req_u, tx_ring);
3853 swap(rb->pg_vec, pg_vec);
3854 rb->frame_max = (req->tp_frame_nr - 1);
3855 rb->head = 0;
3856 rb->frame_size = req->tp_frame_size;
3859 swap(rb->pg_vec_order, order);
3860 swap(rb->pg_vec_len, req->tp_block_nr);
3862 rb->pg_vec_pages = req->tp_block_size/PAGE_SIZE;
3897 struct packet_ring_buffer *rb;
3908 for (rb = &po->rx_ring; rb <= &po->tx_ring; rb++) {
3909 if (rb->pg_vec) {
3910 expected_size += rb->pg_vec_len
3911 * rb->pg_vec_pages
3924 for (rb = &po->rx_ring; rb <= &po->tx_ring; rb++) {
3925 if (rb->pg_vec == NULL)
3928 for (i = 0; i < rb->pg_vec_len; i++) {
3930 void *kaddr = rb->pg_vec[i].buffer;
3933 for (pg_num = 0; pg_num < rb->pg_vec_pages; pg_num++) {