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] The commit message presents this patch as moving existing code
into helpers and changing the order of open().
--
ibmveth: Add RX queue register helpers for MQ
This moves logical LAN registration and teardown out of ibmveth_open() and
ibmveth_close() into the new helpers ibmveth_register_rx_queues() and
ibmveth_free_all_queues(). The H_FREE_LOGICAL_LAN busy loops now share
ibmveth_free_logical_lan(). open() also allocates the buffer pools before
registering the LAN.
> diff --git a/drivers/net/ethernet/ibm/ibmveth.c
> b/drivers/net/ethernet/ibm/ibmveth.c
> index 8f32f75f2d7fd..ab8c5f6a265b4 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c
[ ... ]
> +static long ibmveth_register_logical_lan(struct ibmveth_adapter *adapter,
> + union ibmveth_buf_desc rxq_desc,
> + u64 mac_address)
> +{
> + long rc;
> + int try_again = 1;
> + unsigned long ua = adapter->vdev->unit_address;
> + unsigned long buf_dma = adapter->buffer_list_dma[0];
> + unsigned long filter_dma = adapter->filter_list_dma;
[ ... ]
> +static void ibmveth_free_all_queues(struct ibmveth_adapter *adapter)
> +{
> + long lpar_rc;
> +
> + lpar_rc = ibmveth_free_logical_lan(adapter);
> + if (lpar_rc != H_SUCCESS)
> + netdev_err(adapter->netdev,
> + "h_free_logical_lan failed: %ld\n", lpar_rc);
> +}
[ ... ]
> + rc = ibmveth_disable_irq(adapter, 0);
> + if (rc)
> + netdev_dbg(netdev,
> + "Failed to disable IRQ for queue 0 before
> registration, rc=%d\n",
> + rc);
[Severity: Low]
This isn't a bug, but the commit message describes the patch as moving code
into helpers and reordering open(). The patch also changes some logging that
the message doesn't mention.
In ibmveth_close(), the old message was:
"h_free_logical_lan failed with %lx, continuing\n"
ibmveth_free_all_queues() now prints it in decimal with new wording:
"h_free_logical_lan failed: %ld\n"
Anything that greps logs for the old string will no longer match.
The open() error path after a successful registration (a failure in
ibmveth_setup_rx_interrupts() or ibmveth_alloc_tx_resources()) used to free
the LAN without logging anything. It now goes through
ibmveth_free_all_queues(), so it calls netdev_err() if H_FREE_LOGICAL_LAN
fails.
The new netdev_dbg() above also seems to repeat a message that
ibmveth_toggle_irq() already prints before it returns -EIO:
dev_err_ratelimited(&adapter->netdev->dev,
"Failed to %s IRQ for queue %d, rc=0x%lx\n",
action, queue_index, h_rc);
The old code ignored the return value of ibmveth_disable_irq(). Is the extra
debug message needed?
Two other changes are unrelated to the move: ibmveth_register_logical_lan()
now returns long instead of int, and the adapter fields are copied into
local variables.
Could these changes either go in a separate patch or be mentioned in the
commit message?
> +
> + lpar_rc = ibmveth_register_logical_lan(adapter, rxq_desc, mac_address);
[ ... ]
> @@ -1232,14 +1295,7 @@ static int ibmveth_close(struct net_device *netdev)
>
> ibmveth_cleanup_rx_interrupts(adapter);
>
> - do {
> - lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
> - } while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY));
> - if (lpar_rc != H_SUCCESS) {
> - netdev_err(adapter->netdev,
> - "h_free_logical_lan failed with %lx, continuing\n",
> - lpar_rc);
> - }
> + ibmveth_free_all_queues(adapter);
[ ... ]
--
Sashiko AI review ยท
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119000711.18093-1-mmc%40linux.ibm.com