DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yanling Song <songyl@ramaxel.com>
To: <dev@dpdk.org>
Cc: <songyl@ramaxel.com>, <yanling.song@linux.dev>,
	<yanggan@ramaxel.com>, <xuyun@ramaxel.com>,
	<ferruh.yigit@intel.com>, <stephen@networkplumber.org>,
	<lihuisong@huawei.com>
Subject: [PATCH v5 21/26] net/spnic: support getting Tx/Rx queues info
Date: Wed, 29 Dec 2021 21:37:49 +0800	[thread overview]
Message-ID: <3ef687a5b7fadabca1c10b799cb52a7aa52c5ca5.1640783513.git.songyl@ramaxel.com> (raw)
In-Reply-To: <cover.1640783513.git.songyl@ramaxel.com>

This patch implements rxq_info_get() and txq_info_get() to
support getting queue depth and mbuf pool info of specified
Tx/Rx queue.

Signed-off-by: Yanling Song <songyl@ramaxel.com>
---
 drivers/net/spnic/spnic_ethdev.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/spnic/spnic_ethdev.c b/drivers/net/spnic/spnic_ethdev.c
index c9f6612c60..e8989b9681 100644
--- a/drivers/net/spnic/spnic_ethdev.c
+++ b/drivers/net/spnic/spnic_ethdev.c
@@ -1827,6 +1827,23 @@ static int spnic_rss_reta_update(struct rte_eth_dev *dev,
 	return err;
 }
 
+static void spnic_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+			       struct rte_eth_rxq_info *rxq_info)
+{
+	struct spnic_rxq *rxq = dev->data->rx_queues[queue_id];
+
+	rxq_info->mp = rxq->mb_pool;
+	rxq_info->nb_desc = rxq->q_depth;
+}
+
+static void spnic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+			       struct rte_eth_txq_info *txq_qinfo)
+{
+	struct spnic_txq *txq = dev->data->tx_queues[queue_id];
+
+	txq_qinfo->nb_desc = txq->q_depth;
+}
+
 /**
  * Update MAC address
  *
@@ -2046,6 +2063,8 @@ static const struct eth_dev_ops spnic_pmd_ops = {
 	.rss_hash_conf_get             = spnic_rss_conf_get,
 	.reta_update                   = spnic_rss_reta_update,
 	.reta_query                    = spnic_rss_reta_query,
+	.rxq_info_get                  = spnic_rxq_info_get,
+	.txq_info_get                  = spnic_txq_info_get,
 	.mac_addr_set                  = spnic_set_mac_addr,
 	.mac_addr_remove               = spnic_mac_addr_remove,
 	.mac_addr_add                  = spnic_mac_addr_add,
@@ -2073,6 +2092,8 @@ static const struct eth_dev_ops spnic_pmd_vf_ops = {
 	.rss_hash_conf_get             = spnic_rss_conf_get,
 	.reta_update                   = spnic_rss_reta_update,
 	.reta_query                    = spnic_rss_reta_query,
+	.rxq_info_get                  = spnic_rxq_info_get,
+	.txq_info_get                  = spnic_txq_info_get,
 	.mac_addr_set                  = spnic_set_mac_addr,
 	.mac_addr_remove               = spnic_mac_addr_remove,
 	.mac_addr_add                  = spnic_mac_addr_add,
-- 
2.32.0


  parent reply	other threads:[~2021-12-29 13:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1640783513.git.songyl@ramaxel.com>
2021-12-29 13:37 ` [PATCH v5 01/26] drivers/net: introduce a new PMD driver Yanling Song
2021-12-29 13:37 ` [PATCH v5 02/26] net/spnic: initialize the HW interface Yanling Song
2021-12-29 13:37 ` [PATCH v5 03/26] net/spnic: add mbox message channel Yanling Song
2021-12-29 13:37 ` [PATCH v5 04/26] net/spnic: introduce event queue Yanling Song
2021-12-29 13:37 ` [PATCH v5 05/26] net/spnic: add mgmt module Yanling Song
2021-12-29 13:37 ` [PATCH v5 06/26] net/spnic: add cmdq and work queue Yanling Song
2021-12-29 13:37 ` [PATCH v5 07/26] net/spnic: add interface handling cmdq message Yanling Song
2021-12-29 13:37 ` [PATCH v5 08/26] net/spnic: add hardware info initialization Yanling Song
2021-12-29 13:37 ` [PATCH v5 09/26] net/spnic: support MAC and link event handling Yanling Song
2021-12-29 13:37 ` [PATCH v5 10/26] net/spnic: add function info initialization Yanling Song
2021-12-29 13:37 ` [PATCH v5 11/26] net/spnic: add queue pairs context initialization Yanling Song
2021-12-29 13:37 ` [PATCH v5 12/26] net/spnic: support mbuf handling of Tx/Rx Yanling Song
2021-12-29 13:37 ` [PATCH v5 13/26] net/spnic: support Rx congfiguration Yanling Song
2021-12-29 13:37 ` [PATCH v5 14/26] net/spnic: add port/vport enable Yanling Song
2021-12-29 13:37 ` [PATCH v5 15/26] net/spnic: support IO packets handling Yanling Song
2021-12-29 13:37 ` [PATCH v5 16/26] net/spnic: add device configure/version/info Yanling Song
2021-12-29 13:37 ` [PATCH v5 17/26] net/spnic: support RSS configuration update and get Yanling Song
2021-12-29 13:37 ` [PATCH v5 18/26] net/spnic: support VLAN filtering and offloading Yanling Song
2021-12-29 13:37 ` [PATCH v5 19/26] net/spnic: support promiscuous and allmulticast Rx modes Yanling Song
2021-12-29 13:37 ` [PATCH v5 20/26] net/spnic: support flow control Yanling Song
2021-12-29 13:37 ` Yanling Song [this message]
2021-12-29 13:37 ` [PATCH v5 22/26] net/spnic: net/spnic: support xstats statistics Yanling Song
2021-12-29 13:37 ` [PATCH v5 23/26] net/spnic: support VFIO interrupt Yanling Song
2021-12-29 13:37 ` [PATCH v5 24/26] net/spnic: support Tx/Rx queue start/stop Yanling Song
2021-12-29 13:37 ` [PATCH v5 25/26] net/spnic: add doc infrastructure Yanling Song
2021-12-29 13:37 ` [PATCH v5 26/26] net/spnic: Fix reviewers comments Yanling Song

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=3ef687a5b7fadabca1c10b799cb52a7aa52c5ca5.1640783513.git.songyl@ramaxel.com \
    --to=songyl@ramaxel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lihuisong@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=xuyun@ramaxel.com \
    --cc=yanggan@ramaxel.com \
    --cc=yanling.song@linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).