RE: [EXT] Re: [PATCH net-next v2 6/8] octeon_ep_vf: add Tx/Rx processing and interrupt support

From: Shinas Rasheed
Date: Fri Jan 05 2024 - 02:26:38 EST


Hi Jakub,

Thanks for the review!

> > + rx_done = octep_vf_oq_process_rx(ioq_vector->oq, budget);
>
> You should not call Rx processing if budget is 0 at all, please see
> NAPI docs. Looks like the function may try to refill Rx buffers with
> budget of 0.
>
If budget is zero, octep_vf_oq_process_rx just wouldn't try to query hw for packets. Also since by then, the refill count should have been less than refill threshold, if not it only flushes free buffers back to the ring, (and tell hw that there are more free buffers available which have been processed from maybe previous calls - but this seems unlikely and should have been flushed at that time).

> > @@ -114,8 +158,8 @@ static int octep_vf_setup_oq(struct octep_vf_device
> *oct, int q_no)
> > goto desc_dma_alloc_err;
> > }
> >
> > - oq->buff_info = (struct octep_vf_rx_buffer *)
> > - vzalloc(oq->max_count *
> OCTEP_VF_OQ_RECVBUF_SIZE);
> > + oq->buff_info = vzalloc(oq->max_count *
> OCTEP_VF_OQ_RECVBUF_SIZE);
> > +
>
> bad fixup squash?
>
Sorry, I didn't understand. Can you explain?