All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
To: dev@dpdk.org
Subject: [PATCHv2 2/5] i40e: add support for eth_(rxq|txq)_info_get
Date: Thu, 18 Jun 2015 14:18:45 +0100	[thread overview]
Message-ID: <1434633528-23329-3-git-send-email-konstantin.ananyev@intel.com> (raw)
In-Reply-To: <1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com>

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c |  2 ++
 drivers/net/i40e/i40e_ethdev.h |  5 +++++
 drivers/net/i40e/i40e_rxtx.c   | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2ada502..c691fd6 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -262,6 +262,8 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.udp_tunnel_add               = i40e_dev_udp_tunnel_add,
 	.udp_tunnel_del               = i40e_dev_udp_tunnel_del,
 	.filter_ctrl                  = i40e_dev_filter_ctrl,
+	.rxq_info_get                 = i40e_rxq_info_get,
+	.txq_info_get                 = i40e_txq_info_get,
 };
 
 static struct eth_driver rte_i40e_pmd = {
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 587ee71..c012cda 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -479,6 +479,11 @@ int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 			  enum rte_filter_op filter_op,
 			  void *arg);
 
+void i40e_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_rxq_info *qinfo);
+void i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_txq_info *qinfo);
+
 /* I40E_DEV_PRIVATE_TO */
 #define I40E_DEV_PRIVATE_TO_PF(adapter) \
 	(&((struct i40e_adapter *)adapter)->pf)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 2de0ac4..e31b99d 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2706,3 +2706,45 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
 
 	return I40E_SUCCESS;
 }
+
+void
+i40e_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_rxq_info *qinfo)
+{
+	struct i40e_rx_queue *rxq;
+
+	rxq = dev->data->rx_queues[queue_id];
+
+	qinfo->mp = rxq->mp;
+	qinfo->scattered_rx = dev->data->scattered_rx;
+
+	qinfo->nb_desc = rxq->nb_rx_desc;
+	qinfo->max_desc = I40E_MAX_RING_DESC;
+	qinfo->min_desc = I40E_MIN_RING_DESC;
+
+	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
+	qinfo->conf.rx_drop_en = rxq->drop_en;
+	qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
+}
+
+void
+i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
+	struct rte_eth_txq_info *qinfo)
+{
+	struct i40e_tx_queue *txq;
+
+	txq = dev->data->tx_queues[queue_id];
+
+	qinfo->nb_desc = txq->nb_tx_desc;
+	qinfo->max_desc = I40E_MAX_RING_DESC;
+	qinfo->min_desc = I40E_MIN_RING_DESC;
+
+	qinfo->conf.tx_thresh.pthresh = txq->pthresh;
+	qinfo->conf.tx_thresh.hthresh = txq->hthresh;
+	qinfo->conf.tx_thresh.wthresh = txq->wthresh;
+
+	qinfo->conf.tx_free_thresh = txq->tx_free_thresh;
+	qinfo->conf.tx_rs_thresh = txq->tx_rs_thresh;
+	qinfo->conf.txq_flags = txq->txq_flags;
+	qinfo->conf.tx_deferred_start = txq->tx_deferred_start;
+}
-- 
1.8.5.3

  parent reply	other threads:[~2015-06-18 13:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 16:54 [PATCH 0/5] ethdev: add new API to retrieve RX/TX queue information Konstantin Ananyev
2015-06-17 16:54 ` [PATCH 1/5] " Konstantin Ananyev
2015-06-18 13:18   ` [PATCHv2 0/5] " Konstantin Ananyev
2015-06-18 13:18     ` [PATCHv2 1/5] " Konstantin Ananyev
2015-07-20  0:12       ` Thomas Monjalon
2015-07-20  9:52         ` Ananyev, Konstantin
2015-06-18 13:18     ` Konstantin Ananyev [this message]
2015-06-18 13:18     ` [PATCHv2 3/5] ixgbe: add support for eth_(rxq|txq)_info_get Konstantin Ananyev
2015-06-18 13:18     ` [PATCHv2 4/5] e1000: " Konstantin Ananyev
2015-06-18 13:18     ` [PATCHv2 5/5] testpmd: add new command to display RX/TX queue information Konstantin Ananyev
2015-06-18 13:30     ` [PATCHv2 0/5] ethdev: add new API to retrieve " Walukiewicz, Miroslaw
2015-06-18 13:39       ` Bruce Richardson
2015-06-18 13:56         ` Walukiewicz, Miroslaw
2015-06-18 14:13           ` Bruce Richardson
2015-06-18 14:17       ` Ananyev, Konstantin
2015-06-18 14:37         ` Walukiewicz, Miroslaw
2015-06-18 13:58     ` Bruce Richardson
2015-06-19  3:18     ` Zhang, Helin
2015-06-23 12:35     ` David Harton (dharton)
2015-06-17 16:54 ` [PATCH 2/5] i40e: add support for eth_(rx|tx)_qinfo_get Konstantin Ananyev
2015-06-17 16:54 ` [PATCH 3/5] ixgbe: " Konstantin Ananyev
2015-06-17 16:54 ` [PATCH 4/5] e1000: " Konstantin Ananyev
2015-06-17 16:54 ` [PATCH 5/5] testpmd: add new command to display RX/TX queue information Konstantin Ananyev

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=1434633528-23329-3-git-send-email-konstantin.ananyev@intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.