Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This patch adds the queue_index parameter in inconsistent
  positions across the RX buffer helpers in…

--

ibmveth: Pass the RX queue index through replenish and poll

This patch adds a queue_index parameter to the rxq_* accessors and to the
RX buffer lookup, harvest and replenish helpers, which used to hardcode
queue 0. ibmveth_poll() now gets the queue index from its NAPI instance.
Only queue 0 is used, so the behavior does not change.

> diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
> b/drivers/net/ethernet/ibm/ibmveth.c
> index ab8c5f6a265b4..a40d9a6abf51b 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c

[ ... ]

> @@ -909,17 +922,20 @@ ibmveth_free_buffer_pools(struct ibmveth_adapter 
> *adapter)
>   * * %-EFAULT - pool and index map to null skb
>   */
>  static int ibmveth_remove_buffer_from_pool(struct ibmveth_adapter *adapter,
> -                                        u64 correlator, bool reuse)
> +                                        u64 correlator, int queue_index,
> +                                        bool reuse)

[Severity: Low]
This isn't a bug, but could queue_index go before correlator here, so it
matches the other RX buffer helpers in this patch?

ibmveth_rxq_correlator_valid(), ibmveth_rxq_get_buffer() and
ibmveth_rxq_harvest_buffer() all take (queue_index, correlator).
ibmveth_remove_buffer_from_pool() takes (correlator, queue_index), and its
kernel-doc also lists @correlator before @queue_index.

Because of this, ibmveth_rxq_harvest_buffer() has to swap the arguments
when it passes them on:

    rc = ibmveth_remove_buffer_from_pool(adapter, correlator, queue_index,
                                         reuse);

int and u64 convert to each other without a warning. A future caller that
follows the sibling order would compile cleanly, but it would index
adapter->rx_buff_pool[queue_index][...] with a truncated correlator.

All current callers use the correct order, including the KUnit tests. The
later patch in this series, "ibmveth: Split RX poll into per-slot helpers
for MQ", keeps the same order.

[ ... ]

-- 
Sashiko AI review · 
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119000711.18093-1-mmc%40linux.ibm.com

Reply via email to