DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: Lance Richardson <lance.richardson@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH v4 2/4] net/bnxt: support Rx/Tx burst mode info
Date: Mon,  6 Jul 2020 10:26:34 -0700
Message-ID: <20200706172636.79081-3-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20200706172636.79081-1-ajit.khaparde@broadcom.com>

From: Lance Richardson <lance.richardson@broadcom.com>

Retrieve burst mode options according to the selected Rx/Tx burst
function name.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 doc/guides/nics/features/bnxt.ini |  1 +
 drivers/net/bnxt/bnxt_ethdev.c    | 46 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini
index 37a99e336..f1f300c8b 100644
--- a/doc/guides/nics/features/bnxt.ini
+++ b/doc/guides/nics/features/bnxt.ini
@@ -9,6 +9,7 @@ Link status          = Y
 Link status event    = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
+Burst mode info      = Y
 MTU update           = Y
 Jumbo frame          = Y
 Scattered Rx         = Y
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b21f85095..7c2727a08 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2668,6 +2668,50 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->conf.tx_deferred_start = txq->tx_deferred_start;
 }
 
+static int
+bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
+		       struct rte_eth_burst_mode *mode)
+{
+	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
+
+	if (pkt_burst == bnxt_recv_pkts) {
+		snprintf(mode->info, sizeof(mode->info), "%s",
+			 "Scalar");
+		return 0;
+	}
+#ifdef RTE_ARCH_X86
+	if (pkt_burst == bnxt_recv_pkts_vec) {
+		snprintf(mode->info, sizeof(mode->info), "%s",
+			 "Vector SSE");
+		return 0;
+	}
+#endif
+
+	return -EINVAL;
+}
+
+static int
+bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
+		       struct rte_eth_burst_mode *mode)
+{
+	eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
+
+	if (pkt_burst == bnxt_xmit_pkts) {
+		snprintf(mode->info, sizeof(mode->info), "%s",
+			 "Scalar");
+		return 0;
+	}
+#ifdef RTE_ARCH_X86
+	if (pkt_burst == bnxt_xmit_pkts_vec) {
+		snprintf(mode->info, sizeof(mode->info), "%s",
+			 "Vector SSE");
+		return 0;
+	}
+#endif
+
+	return -EINVAL;
+}
+
 int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
@@ -4244,6 +4288,8 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.set_mc_addr_list = bnxt_dev_set_mc_addr_list_op,
 	.rxq_info_get = bnxt_rxq_info_get_op,
 	.txq_info_get = bnxt_txq_info_get_op,
+	.rx_burst_mode_get = bnxt_rx_burst_mode_get,
+	.tx_burst_mode_get = bnxt_tx_burst_mode_get,
 	.dev_led_on = bnxt_dev_led_on_op,
 	.dev_led_off = bnxt_dev_led_off_op,
 	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
-- 
2.21.1 (Apple Git-122.3)


  parent reply	other threads:[~2020-07-06 17:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 14:35 [dpdk-dev] [PATCH v2 0/3] net/bnxt: vector mode enhancements Lance Richardson
2020-06-18 14:35 ` [dpdk-dev] [PATCH 1/3] net/bnxt: disable vector receive for mark action Lance Richardson
2020-06-18 14:35 ` [dpdk-dev] [PATCH 2/3] net/bnxt: support Rx/Tx burst mode info Lance Richardson
2020-06-18 14:35 ` [dpdk-dev] [PATCH 3/3] net/bnxt: add ARM64 vector support Lance Richardson
2020-06-22  1:29   ` Ruifeng Wang
2020-07-01 15:13 ` [dpdk-dev] [PATCH v2 0/3] net/bnxt: vector mode enhancements Ajit Khaparde
2020-07-02  6:21 ` [dpdk-dev] [PATCH v3 0/4] " Ajit Khaparde
2020-07-02  6:21   ` [dpdk-dev] [PATCH v3 1/4] net/bnxt: disable vector receive for mark action Ajit Khaparde
2020-07-02  6:21   ` [dpdk-dev] [PATCH v3 2/4] net/bnxt: support Rx/Tx burst mode info Ajit Khaparde
2020-07-02  6:21   ` [dpdk-dev] [PATCH v3 3/4] net/bnxt: add ARM64 vector support Ajit Khaparde
2020-07-02  6:21   ` [dpdk-dev] [PATCH v3 4/4] doc: update release notes Ajit Khaparde
2020-07-06 17:26 ` [dpdk-dev] [PATCH v4 0/4] net/bnxt: vector mode enhancements Ajit Khaparde
2020-07-06 17:26   ` [dpdk-dev] [PATCH v4 1/4] net/bnxt: disable vector receive for mark action Ajit Khaparde
2020-07-06 17:26   ` Ajit Khaparde [this message]
2020-07-06 17:26   ` [dpdk-dev] [PATCH v4 3/4] net/bnxt: add ARM64 vector support Ajit Khaparde
2020-07-06 17:26   ` [dpdk-dev] [PATCH v4 4/4] doc: update release notes Ajit Khaparde
2020-07-07 22:05     ` Ferruh Yigit
2020-07-07 22:08       ` Ajit Khaparde
2020-07-07 22:22         ` [dpdk-dev] [PATCH v5 0/3] net/bnxt: vector mode enhancements Ajit Khaparde
2020-07-07 22:22           ` [dpdk-dev] [PATCH v5 1/3] net/bnxt: disable vector receive for mark action Ajit Khaparde
2020-07-07 22:22           ` [dpdk-dev] [PATCH v5 2/3] net/bnxt: support Rx/Tx burst mode info Ajit Khaparde
2020-07-07 22:22           ` [dpdk-dev] [PATCH v5 3/3] net/bnxt: add ARM64 vector support Ajit Khaparde
2020-07-07 18:29   ` [dpdk-dev] [PATCH v4 0/4] net/bnxt: vector mode enhancements Ajit Khaparde

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=20200706172636.79081-3-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=lance.richardson@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git