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 275DCC55ABF for ; Thu, 6 Aug 2026 11:29:30 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 877C640A71; Thu, 6 Aug 2026 13:28:49 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id BEBD04064F for ; Thu, 6 Aug 2026 13:28:43 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A27C31A00AE; Thu, 6 Aug 2026 13:28:43 +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 6B35A1A009D; Thu, 6 Aug 2026 13:28:43 +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 DFACC18000B0; Thu, 6 Aug 2026 19:28:42 +0800 (+08) From: Gagandeep Singh To: dev@dpdk.org, Sachin Saxena , Vanshika Shukla Cc: hemant.agrawal@nxp.com Subject: [PATCH 07/14] net/enetc: support ethtool ring parameters Date: Thu, 6 Aug 2026 16:58:29 +0530 Message-Id: <20260806112836.707921-8-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260806112836.707921-1-g.singh@nxp.com> References: <20260806112836.707921-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 deb3bc5d52..9e333edf4f 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -66,6 +66,7 @@ New Features * Extended the PF-to-VF link speed code field from 4-bit to 8-bit in ENETC4. * 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 73404308fe..367d350dde 100644 --- a/drivers/net/enetc/enetc.h +++ b/drivers/net/enetc/enetc.h @@ -339,6 +339,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 681bac3ecc..afee0b90a3 100644 --- a/drivers/net/enetc/enetc4_ethdev.c +++ b/drivers/net/enetc/enetc4_ethdev.c @@ -1125,7 +1125,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) { @@ -1139,7 +1139,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 8af22f069b..7623a66e98 100644 --- a/drivers/net/enetc/enetc4_vf.c +++ b/drivers/net/enetc/enetc4_vf.c @@ -1508,10 +1508,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, }; @@ -1537,10 +1539,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, };