From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03EC9C5DF6E for ; Mon, 17 Aug 2026 06:35:49 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28BF540693; Mon, 17 Aug 2026 08:35:10 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 05D7440275 for ; Mon, 17 Aug 2026 08:35:01 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D91B41A01A7; Mon, 17 Aug 2026 08:35:00 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A1B031A01B5; Mon, 17 Aug 2026 08:35:00 +0200 (CEST) Received: from lsv03457.swis.in-blr01.nxp.com (lsv03457.swis.in-blr01.nxp.com [92.120.147.250]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 27E0F18000B0; Mon, 17 Aug 2026 14:35:00 +0800 (+08) From: Gagandeep Singh To: dev@dpdk.org Cc: hemant.agrawal@nxp.com, Gagandeep Singh Subject: [PATCH v10 07/14] net/enetc: support ethtool ring parameters Date: Mon, 17 Aug 2026 12:04:47 +0530 Message-Id: <20260817063454.3290854-8-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260817063454.3290854-1-g.singh@nxp.com> References: <20260813121358.1321196-1-g.singh@nxp.com> <20260817063454.3290854-1-g.singh@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The ethtool ring parameter query relies on the queue info ethdev ops (.rxq_info_get/.txq_info_get) together with the descriptor limits reported in dev_info. The PF already registered these ops, but the VF ops tables did not, so ring parameter queries failed on the VF. Make enetc4_rxq_info_get() and enetc4_txq_info_get() non-static and register them in both VF ops tables so ring parameters are reported for both the PF and VF. Signed-off-by: Gagandeep Singh --- doc/guides/rel_notes/release_26_11.rst | 1 + drivers/net/enetc/enetc.h | 4 ++++ drivers/net/enetc/enetc4_ethdev.c | 4 ++-- drivers/net/enetc/enetc4_vf.c | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst index 6fece98f28..ec223a93ba 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -68,6 +68,7 @@ New Features as a device argument, otherwise link speed reporting will be incorrect. * Added firmware version reporting for the ENETC4 VF. * Added register dump support for ENETC4 PF and VF. + * Added ring parameters support for the ENETC4 VF (rxq_info_get / txq_info_get). Removed Items ------------- diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h index bdcee9deb6..fb286537a6 100644 --- a/drivers/net/enetc/enetc.h +++ b/drivers/net/enetc/enetc.h @@ -338,6 +338,10 @@ int enetc4_tx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx); void enetc4_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid); const uint32_t *enetc4_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused, size_t *no_of_elements); +void enetc4_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo); +void enetc4_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_txq_info *qinfo); /* * enetc4_vf function prototype diff --git a/drivers/net/enetc/enetc4_ethdev.c b/drivers/net/enetc/enetc4_ethdev.c index 5922d8bf56..5d1c0ad828 100644 --- a/drivers/net/enetc/enetc4_ethdev.c +++ b/drivers/net/enetc/enetc4_ethdev.c @@ -1150,7 +1150,7 @@ enetc4_tx_queue_stop(struct rte_eth_dev *dev, uint16_t qidx) return 0; } -static void +void enetc4_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo) { @@ -1164,7 +1164,7 @@ enetc4_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_drop_en = 0; } -static void +void enetc4_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo) { diff --git a/drivers/net/enetc/enetc4_vf.c b/drivers/net/enetc/enetc4_vf.c index ec9a2e2bf8..3da84941a2 100644 --- a/drivers/net/enetc/enetc4_vf.c +++ b/drivers/net/enetc/enetc4_vf.c @@ -1539,10 +1539,12 @@ static const struct eth_dev_ops enetc4_vf_ops_no_vsi_m = { .rx_queue_start = enetc4_rx_queue_start, .rx_queue_stop = enetc4_rx_queue_stop, .rx_queue_release = enetc4_rx_queue_release, + .rxq_info_get = enetc4_rxq_info_get, .tx_queue_setup = enetc4_tx_queue_setup, .tx_queue_start = enetc4_tx_queue_start, .tx_queue_stop = enetc4_tx_queue_stop, .tx_queue_release = enetc4_tx_queue_release, + .txq_info_get = enetc4_txq_info_get, .dev_supported_ptypes_get = enetc4_supported_ptypes_get, }; @@ -1569,10 +1571,12 @@ static const struct eth_dev_ops enetc4_vf_ops = { .rx_queue_start = enetc4_rx_queue_start, .rx_queue_stop = enetc4_rx_queue_stop, .rx_queue_release = enetc4_rx_queue_release, + .rxq_info_get = enetc4_rxq_info_get, .tx_queue_setup = enetc4_tx_queue_setup, .tx_queue_start = enetc4_tx_queue_start, .tx_queue_stop = enetc4_tx_queue_stop, .tx_queue_release = enetc4_tx_queue_release, + .txq_info_get = enetc4_txq_info_get, .dev_supported_ptypes_get = enetc4_supported_ptypes_get, }; -- 2.25.1