[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260122080420.GA1544331@kernel-ep2>
Date: Thu, 22 Jan 2026 13:34:20 +0530
From: Subbaraya Sundeep <sbhatta@...vell.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <andrew+netdev@...n.ch>, <horms@...nel.org>,
<michael.chan@...adcom.com>, <sdf@...ichev.me>,
<almasrymina@...gle.com>, <dtatulea@...dia.com>,
<asml.silence@...il.com>, <dw@...idwei.uk>, <daniel@...earbox.net>
Subject: Re: [PATCH net-next 1/6] eth: bnxt: always set the queue mgmt ops
On 2026-01-22 at 06:21:08, Jakub Kicinski (kuba@...nel.org) wrote:
> Core provides a centralized callback for validating per-queue settings
> but the callback is part of the queue management ops. Having the ops
> conditionally set complicates the parts of the driver which could
> otherwise lean on the core to feed it the correct settings.
>
> Always set the queue ops, but provide no restart-related callbacks if
> queue ops are not supported by the device. This should maintain current
> behavior, the check in netdev_rx_queue_restart() looks both at op struct
> and individual ops.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> --
> v1:
> - reflow code
> - typo fix
> rfc: https://lore.kernel.org/20250421222827.283737-15-kuba@kernel.org
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 0e0c88c122f8..0b95100a7c36 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -16314,6 +16314,9 @@ static const struct netdev_queue_mgmt_ops bnxt_queue_mgmt_ops = {
> .supported_params = QCFG_RX_PAGE_SIZE,
> };
>
> +static const struct netdev_queue_mgmt_ops bnxt_queue_mgmt_ops_unsupp = {
> +};
> +
> static void bnxt_remove_one(struct pci_dev *pdev)
> {
> struct net_device *dev = pci_get_drvdata(pdev);
> @@ -16966,9 +16969,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> if (BNXT_SUPPORTS_NTUPLE_VNIC(bp))
> bp->rss_cap |= BNXT_RSS_CAP_MULTI_RSS_CTX;
> +
> + dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops_unsupp;
> if (BNXT_SUPPORTS_QUEUE_API(bp))
> dev->queue_mgmt_ops = &bnxt_queue_mgmt_ops;
> - dev->request_ops_lock = true;
Can we also mention that driver with queue_mgmt_ops set makes it as ops locked
driver in Documentation/networking/netdevices.rst ?
Thanks,
Sundeep
> dev->netmem_tx = true;
>
> rc = register_netdev(dev);
> --
> 2.52.0
>
Powered by blists - more mailing lists