From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
michael.chan@broadcom.com, sdf@fomichev.me,
almasrymina@google.com, dtatulea@nvidia.com,
asml.silence@gmail.com, dw@davidwei.uk, daniel@iogearbox.net,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 6/6] eth: bnxt: plug bnxt_validate_qcfg() into qops
Date: Wed, 21 Jan 2026 16:51:13 -0800 [thread overview]
Message-ID: <20260122005113.2476634-7-kuba@kernel.org> (raw)
In-Reply-To: <20260122005113.2476634-1-kuba@kernel.org>
Plug bnxt_validate_qcfg() back into qops, where it was in my old RFC.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d57e833ce690..8fc0720c3057 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -15983,8 +15983,12 @@ static void bnxt_queue_default_qcfg(struct net_device *dev,
qcfg->rx_page_size = BNXT_RX_PAGE_SIZE;
}
-static int bnxt_validate_qcfg(struct bnxt *bp, struct netdev_queue_config *qcfg)
+static int bnxt_validate_qcfg(struct net_device *dev,
+ struct netdev_queue_config *qcfg,
+ struct netlink_ext_ack *extack)
{
+ struct bnxt *bp = netdev_priv(dev);
+
/* Older chips need MSS calc so rx_page_size is not supported */
if (!(bp->flags & BNXT_FLAG_CHIP_P5_PLUS) &&
qcfg->rx_page_size != BNXT_RX_PAGE_SIZE)
@@ -16012,10 +16016,6 @@ static int bnxt_queue_mem_alloc(struct net_device *dev,
if (!bp->rx_ring)
return -ENETDOWN;
- rc = bnxt_validate_qcfg(bp, qcfg);
- if (rc < 0)
- return rc;
-
rxr = &bp->rx_ring[idx];
clone = qmem;
memcpy(clone, rxr, sizeof(*rxr));
@@ -16311,6 +16311,7 @@ static const struct netdev_queue_mgmt_ops bnxt_queue_mgmt_ops = {
.ndo_queue_start = bnxt_queue_start,
.ndo_queue_stop = bnxt_queue_stop,
.ndo_default_qcfg = bnxt_queue_default_qcfg,
+ .ndo_validate_qcfg = bnxt_validate_qcfg,
.supported_params = QCFG_RX_PAGE_SIZE,
};
--
2.52.0
next prev parent reply other threads:[~2026-01-22 0:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 0:51 [PATCH net-next 0/6] net: restore the structure of driver-facing qcfg API Jakub Kicinski
2026-01-22 0:51 ` [PATCH net-next 1/6] eth: bnxt: always set the queue mgmt ops Jakub Kicinski
2026-01-22 8:04 ` Subbaraya Sundeep
2026-01-22 15:36 ` Jakub Kicinski
2026-01-22 16:31 ` Subbaraya Sundeep
2026-01-22 0:51 ` [PATCH net-next 2/6] net: introduce a trivial netdev_queue_config() Jakub Kicinski
2026-01-22 8:12 ` Subbaraya Sundeep
2026-01-22 15:36 ` Jakub Kicinski
2026-01-22 0:51 ` [PATCH net-next 3/6] net: move mp->rx_page_size validation to __net_mp_open_rxq() Jakub Kicinski
2026-01-22 0:51 ` [PATCH net-next 4/6] net: use netdev_queue_config() for mp restart Jakub Kicinski
2026-01-22 15:06 ` Dragos Tatulea
2026-01-22 15:46 ` Jakub Kicinski
2026-01-22 16:28 ` Dragos Tatulea
2026-01-23 1:41 ` Jakub Kicinski
2026-01-22 0:51 ` [PATCH net-next 5/6] net: add queue config validation callback Jakub Kicinski
2026-01-22 0:51 ` Jakub Kicinski [this message]
2026-01-23 21:20 ` [PATCH net-next 0/6] net: restore the structure of driver-facing qcfg API patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260122005113.2476634-7-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=asml.silence@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox