Skip to contentSkip to conversation

net/bnxt: vector mode enhancements

PATCH In review Lance Richardson 4 participants 23 messages Jun 18, 2020 – Jul 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover net/bnxt: vector mode enhancements

- Switch to non-vector receive function when "mark" action is requested.
- Add support for rx_burst_mode_get()/tx_burst_mode_get() to return currently active receive/transmit mode.
- Add vector mode support for ARM64.

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/features/bnxt.ini       |   1 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 13 files changed, 614 insertions(+), 64 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/3 net/bnxt: disable vector receive for mark action

The bnxt vector mode receive handler does not support the rte_flow 'mark' action. Since we cannot know in advance whether this action will be required, add support for dynamically switching from vector to non-vector receive when the first flow create request with a mark action is processed.

Fixes 94eb699bc82e ("net/bnxt: support flow mark action")

---
v2: no change

 drivers/net/bnxt/bnxt_flow.c | 20 ++++++++------------
 drivers/net/bnxt/bnxt_rxr.c  | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 12 deletions(-)
drivers/net/bnxt/bnxt_flow.c +8 -12
index 84a21dba9..19bc66a5a 100644
@@ -18,6 +18,7 @@
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_rxq.h"
+#include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
 
@@ -1403,18 +1404,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
 		break;
 	case RTE_FLOW_ACTION_TYPE_MARK:
-		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
-			PMD_DRV_LOG(DEBUG,
-				    "Disable vector processing for mark\n");
-			rte_flow_error_set(error,
-					   ENOTSUP,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Disable vector processing for mark");
-			rc = -rte_errno;
-			goto ret;
-		}
-
 		if (bp->mark_table == NULL) {
 			rte_flow_error_set(error,
 					   ENOMEM,
@@ -1425,6 +1414,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 			goto ret;
 		}
 
+		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
+			PMD_DRV_LOG(DEBUG,
+				    "Disabling vector processing for mark\n");
+			bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
+			bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
+		}
+
 		filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
 		filter->mark = ((const struct rte_flow_action_mark *)
 				act->conf)->id;
drivers/net/bnxt/bnxt_rxr.c +18 -0
index 91ff72904..eeb0aeefc 100644
@@ -747,6 +747,24 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
+#if defined(RTE_ARCH_X86)
+	/*
+	 * Replenish buffers if needed when a transition has been made from
+	 * vector- to non-vector- receive processing.
+	 */
+	while (unlikely(rxq->rxrearm_nb)) {
+		if (!bnxt_alloc_rx_data(rxq, rxr, rxq->rxrearm_start)) {
+			rxr->rx_prod = rxq->rxrearm_start;
+			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
+			rxq->rxrearm_start++;
+			rxq->rxrearm_nb--;
+		} else {
+			/* Retry allocation on next call. */
+			break;
+		}
+	}
+#endif
+
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 2/3 net/bnxt: support Rx/Tx burst mode info

In reply to Lance Richardson

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

---
v2: no change

 doc/guides/nics/features/bnxt.ini |  1 +
 drivers/net/bnxt/bnxt_ethdev.c    | 46 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
doc/guides/nics/features/bnxt.ini +1 -0
index 37a99e336..f1f300c8b 100644
@@ -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
drivers/net/bnxt/bnxt_ethdev.c +46 -0

58 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 3/3 net/bnxt: add ARM64 vector support

In reply to Lance Richardson

Add bnxt vector PMD support using NEON SIMD instructions.

---
v2:
- Use rte_vect.h instead of including arm_neon.h directly in bnxt_rxtx_vec_neon.c.

 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  10 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |   2 +-
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 11 files changed, 544 insertions(+), 55 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
drivers/net/bnxt/Makefile +3 -0
index 2a39ed139..98be7b28e 100644
@@ -42,6 +42,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
+ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
+endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD), y)
 CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/tf_core -I$(SRCDIR)/tf_ulp
drivers/net/bnxt/bnxt_ethdev.c +5 -5
index edb650bbc..10d70ab0b 100644
@@ -1075,7 +1075,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	/*
 	 * Vector mode receive can be enabled only if scatter rx is not
@@ -1115,7 +1115,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 static eth_tx_burst_t
 bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	/*
 	 * Vector mode transmit can be enabled only if not using scatter rx
@@ -2593,7 +2593,7 @@ bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_recv_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2615,7 +2615,7 @@ bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_xmit_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2644,7 +2644,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	new_pkt_size = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
 		       VLAN_TAG_SIZE * BNXT_NUM_VLANS;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * If vector-mode tx/rx is active, disallow any MTU change that would
 	 * require scattered receive support.
drivers/net/bnxt/bnxt_ring.c +2 -2
index 24a947f27..54f654744 100644
@@ -608,7 +608,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 	}
 	rxq->index = queue_index;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	bnxt_rxq_vec_setup(rxq);
 #endif
 
@@ -713,7 +713,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 		rxq->index = i;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 		bnxt_rxq_vec_setup(rxq);
 #endif
 	}
drivers/net/bnxt/bnxt_rxq.h +1 -1
index 4f5182d9e..d5ce3b6d5 100644
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
drivers/net/bnxt/bnxt_rxr.c +1 -1
index eeb0aeefc..ea9c3c399 100644
@@ -747,7 +747,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
-#if defined(RTE_ARCH_X86)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * Replenish buffers if needed when a transition has been made from
 	 * vector- to non-vector- receive processing.
drivers/net/bnxt/bnxt_rxr.h +1 -1
index 811dcd86b..52ad297c8 100644
@@ -220,7 +220,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
drivers/net/bnxt/bnxt_rxtx_vec_common.h new file +57 -0

57 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_neon.c new file +469 -0

469 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -44

68 lines not on this page · raw message

drivers/net/bnxt/bnxt_txr.h +1 -1
index e7f43f9d1..7715c11b8 100644
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
drivers/net/bnxt/meson.build +2 -0
index 59dda6932..e9197b79e 100644
@@ -47,4 +47,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
+elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+	sources += files('bnxt_rxtx_vec_neon.c')
 endif
Signature · 1 line
2.25.1
Reviewed-by on v2 3/3
#4 lore raw

Re: [dpdk-dev] [PATCH 3/3] net/bnxt: add ARM64 vector support

Quoted 33 lines

-----Original Message-----
From: Lance Richardson <[email protected]>
Sent: Thursday, June 18, 2020 10:36 PM
To: [email protected]; Ajit Khaparde ([email protected]) <[email protected]>; Ruifeng Wang <[email protected]>
Subject: [PATCH 3/3] net/bnxt: add ARM64 vector support

Add bnxt vector PMD support using NEON SIMD instructions.

---
v2:
- Use rte_vect.h instead of including arm_neon.h directly in bnxt_rxtx_vec_neon.c.

 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  10 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |   2 +-
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469
++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 11 files changed, 544 insertions(+), 55 deletions(-)  create mode 100644
drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c

<snip>

#5 lore raw
In reply to Lance Richardson
Quoted 6 lines · Lance Richardson

- Switch to non-vector receive function when "mark" action is requested.
- Add support for rx_burst_mode_get()/tx_burst_mode_get() to return currently active receive/transmit mode.
- Add vector mode support for ARM64.

Patches applied to dpdk-next-net-brcm. Thanks

Quoted 27 lines

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/features/bnxt.ini       |   1 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 13 files changed, 614 insertions(+), 64 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c

--
2.25.1

#6 lore raw

v3 cover net/bnxt: vector mode enhancements

In reply to Lance Richardson

- Switch to non-vector receive function when "mark" action is requested.
- Add support for rx_burst_mode_get()/tx_burst_mode_get() to return currently active receive/transmit mode.
- Add vector mode support for ARM64.

v2->v3:
- update bnxt doc
- update 20.08 release notes

Ajit Khaparde (1):
doc: update release notes

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/bnxt.rst                |   6 +-
 doc/guides/nics/features/bnxt.ini       |   1 +
 doc/guides/rel_notes/release_20_08.rst  |   2 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 15 files changed, 619 insertions(+), 67 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
Signature · 1 line
2.21.1 (Apple Git-122.3)
#7 lore raw

PATCH v3 1/4 net/bnxt: disable vector receive for mark action

From: Lance Richardson <[email protected]>

The bnxt vector mode receive handler does not support the rte_flow 'mark' action. Since we cannot know in advance whether this action will be required, add support for dynamically switching from vector to non-vector receive when the first flow create request with a mark action is processed.

Fixes 94eb699bc82e ("net/bnxt: support flow mark action")
---
 drivers/net/bnxt/bnxt_flow.c | 20 ++++++++------------
 drivers/net/bnxt/bnxt_rxr.c  | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 12 deletions(-)
drivers/net/bnxt/bnxt_flow.c +8 -12
index 84a21dba9..19bc66a5a 100644
@@ -18,6 +18,7 @@
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_rxq.h"
+#include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
 
@@ -1403,18 +1404,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
 		break;
 	case RTE_FLOW_ACTION_TYPE_MARK:
-		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
-			PMD_DRV_LOG(DEBUG,
-				    "Disable vector processing for mark\n");
-			rte_flow_error_set(error,
-					   ENOTSUP,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Disable vector processing for mark");
-			rc = -rte_errno;
-			goto ret;
-		}
-
 		if (bp->mark_table == NULL) {
 			rte_flow_error_set(error,
 					   ENOMEM,
@@ -1425,6 +1414,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 			goto ret;
 		}
 
+		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
+			PMD_DRV_LOG(DEBUG,
+				    "Disabling vector processing for mark\n");
+			bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
+			bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
+		}
+
 		filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
 		filter->mark = ((const struct rte_flow_action_mark *)
 				act->conf)->id;
drivers/net/bnxt/bnxt_rxr.c +18 -0
index 64058879e..eb6f33c7b 100644
@@ -782,6 +782,24 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
+#if defined(RTE_ARCH_X86)
+	/*
+	 * Replenish buffers if needed when a transition has been made from
+	 * vector- to non-vector- receive processing.
+	 */
+	while (unlikely(rxq->rxrearm_nb)) {
+		if (!bnxt_alloc_rx_data(rxq, rxr, rxq->rxrearm_start)) {
+			rxr->rx_prod = rxq->rxrearm_start;
+			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
+			rxq->rxrearm_start++;
+			rxq->rxrearm_nb--;
+		} else {
+			/* Retry allocation on next call. */
+			break;
+		}
+	}
+#endif
+
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
Signature · 1 line
2.21.1 (Apple Git-122.3)
#8 lore raw

PATCH v3 2/4 net/bnxt: support Rx/Tx burst mode info

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

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

---
 doc/guides/nics/features/bnxt.ini |  1 +
 drivers/net/bnxt/bnxt_ethdev.c    | 46 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
doc/guides/nics/features/bnxt.ini +1 -0
index 37a99e336..f1f300c8b 100644
@@ -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
drivers/net/bnxt/bnxt_ethdev.c +46 -0

58 lines not on this page · raw message

Signature · 1 line
2.21.1 (Apple Git-122.3)
#9 lore raw

PATCH v3 3/4 net/bnxt: add ARM64 vector support

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

Add bnxt vector PMD support using NEON SIMD instructions.

---
 doc/guides/nics/bnxt.rst                |   6 +-
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  10 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |   2 +-
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 12 files changed, 547 insertions(+), 58 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
doc/guides/nics/bnxt.rst +3 -3
index a53cdad21..6ff75d0a2 100644
@@ -774,9 +774,9 @@ Vector processing provides significantly improved performance over scalar
 processing (see Vector Processor, here).
 
 The BNXT PMD supports the vector processing using SSE (Streaming SIMD
-Extensions) instructions on x86 platforms. The BNXT vPMD (vector mode PMD) is
-currently limited to Intel/AMD CPU architecture. Support for ARM is *not*
-currently implemented.
+Extensions) instructions on x86 platforms. It also supports NEON intrinsics for
+vector processing on ARM CPUs. The BNXT vPMD (vector mode PMD) is available for
+Intel/AMD and ARM CPU architectures.
 
 This improved performance comes from several optimizations:
 
drivers/net/bnxt/Makefile +3 -0
index 6b9544b5d..c54fd108d 100644
@@ -44,6 +44,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
+ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
+endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD), y)
 CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/tf_ulp -I$(SRCDIR)/tf_core -I$(SRCDIR)/hcapi
drivers/net/bnxt/bnxt_ethdev.c +5 -5
index 21788bd77..7d03997e6 100644
@@ -1077,7 +1077,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	/*
 	 * Vector mode receive can be enabled only if scatter rx is not
@@ -1117,7 +1117,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 static eth_tx_burst_t
 bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	struct bnxt *bp = eth_dev->data->dev_private;
 
@@ -2680,7 +2680,7 @@ bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_recv_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2702,7 +2702,7 @@ bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_xmit_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2731,7 +2731,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	new_pkt_size = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
 		       VLAN_TAG_SIZE * BNXT_NUM_VLANS;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * If vector-mode tx/rx is active, disallow any MTU change that would
 	 * require scattered receive support.
drivers/net/bnxt/bnxt_ring.c +2 -2
index 24a947f27..54f654744 100644
@@ -608,7 +608,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 	}
 	rxq->index = queue_index;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	bnxt_rxq_vec_setup(rxq);
 #endif
 
@@ -713,7 +713,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 		rxq->index = i;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 		bnxt_rxq_vec_setup(rxq);
 #endif
 	}
drivers/net/bnxt/bnxt_rxq.h +1 -1
index 4f5182d9e..d5ce3b6d5 100644
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
drivers/net/bnxt/bnxt_rxr.c +1 -1
index eb6f33c7b..baf73cb25 100644
@@ -782,7 +782,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
-#if defined(RTE_ARCH_X86)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * Replenish buffers if needed when a transition has been made from
 	 * vector- to non-vector- receive processing.
drivers/net/bnxt/bnxt_rxr.h +1 -1
index e60c97fa1..2bf46cd91 100644
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
drivers/net/bnxt/bnxt_rxtx_vec_common.h new file +57 -0

57 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_neon.c new file +469 -0

469 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -44

68 lines not on this page · raw message

drivers/net/bnxt/bnxt_txr.h +1 -1
index e7f43f9d1..7715c11b8 100644
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
drivers/net/bnxt/meson.build +2 -0
index 5fb0ed380..0b93c3171 100644
@@ -68,4 +68,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
+elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+	sources += files('bnxt_rxtx_vec_neon.c')
 endif
Signature · 1 line
2.21.1 (Apple Git-122.3)
#10 lore raw

PATCH v3 4/4 doc: update release notes

In reply to Ajit Khaparde

Update release notes indicating vector mode support for ARM CPUs in Broadcom bnxt PMD.

---
 doc/guides/rel_notes/release_20_08.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/guides/rel_notes/release_20_08.rst +2 -0
index 9bcea29ba..f2a3fc23a 100644
@@ -100,6 +100,8 @@ New Features
   * Added support for new resource manager API.
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
+  * Added support for rx_burst_mode_get and tx_burst_mode_get
+  * Added vector mode support for ARM CPUs
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 
Signature · 1 line
2.21.1 (Apple Git-122.3)
#11 lore raw

v4 cover net/bnxt: vector mode enhancements

In reply to Lance Richardson

v2->v3:
- update bnxt doc
- update 20.08 release notes

v3->v4:
- rebase against latest code base

Ajit Khaparde (1):
doc: update release notes

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/bnxt.rst                |   6 +-
 doc/guides/nics/features/bnxt.ini       |   1 +
 doc/guides/rel_notes/release_20_08.rst  |   2 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 15 files changed, 619 insertions(+), 67 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
Signature · 1 line
2.21.1 (Apple Git-122.3)
#12 lore raw

PATCH v4 1/4 net/bnxt: disable vector receive for mark action

From: Lance Richardson <[email protected]>

The bnxt vector mode receive handler does not support the rte_flow 'mark' action. Since we cannot know in advance whether this action will be required, add support for dynamically switching from vector to non-vector receive when the first flow create request with a mark action is processed.

Fixes 94eb699bc82e ("net/bnxt: support flow mark action")
---
 drivers/net/bnxt/bnxt_flow.c | 20 ++++++++------------
 drivers/net/bnxt/bnxt_rxr.c  | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 12 deletions(-)
drivers/net/bnxt/bnxt_flow.c +8 -12
index 84a21dba9..19bc66a5a 100644
@@ -18,6 +18,7 @@
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_rxq.h"
+#include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
 
@@ -1403,18 +1404,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
 		break;
 	case RTE_FLOW_ACTION_TYPE_MARK:
-		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
-			PMD_DRV_LOG(DEBUG,
-				    "Disable vector processing for mark\n");
-			rte_flow_error_set(error,
-					   ENOTSUP,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Disable vector processing for mark");
-			rc = -rte_errno;
-			goto ret;
-		}
-
 		if (bp->mark_table == NULL) {
 			rte_flow_error_set(error,
 					   ENOMEM,
@@ -1425,6 +1414,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 			goto ret;
 		}
 
+		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
+			PMD_DRV_LOG(DEBUG,
+				    "Disabling vector processing for mark\n");
+			bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
+			bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
+		}
+
 		filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
 		filter->mark = ((const struct rte_flow_action_mark *)
 				act->conf)->id;
drivers/net/bnxt/bnxt_rxr.c +18 -0
index 64058879e..eb6f33c7b 100644
@@ -782,6 +782,24 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
+#if defined(RTE_ARCH_X86)
+	/*
+	 * Replenish buffers if needed when a transition has been made from
+	 * vector- to non-vector- receive processing.
+	 */
+	while (unlikely(rxq->rxrearm_nb)) {
+		if (!bnxt_alloc_rx_data(rxq, rxr, rxq->rxrearm_start)) {
+			rxr->rx_prod = rxq->rxrearm_start;
+			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
+			rxq->rxrearm_start++;
+			rxq->rxrearm_nb--;
+		} else {
+			/* Retry allocation on next call. */
+			break;
+		}
+	}
+#endif
+
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
Signature · 1 line
2.21.1 (Apple Git-122.3)
#13 lore raw

PATCH v4 2/4 net/bnxt: support Rx/Tx burst mode info

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

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

---
 doc/guides/nics/features/bnxt.ini |  1 +
 drivers/net/bnxt/bnxt_ethdev.c    | 46 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
doc/guides/nics/features/bnxt.ini +1 -0
index 37a99e336..f1f300c8b 100644
@@ -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
drivers/net/bnxt/bnxt_ethdev.c +46 -0

58 lines not on this page · raw message

Signature · 1 line
2.21.1 (Apple Git-122.3)
#14 lore raw

PATCH v4 3/4 net/bnxt: add ARM64 vector support

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

Add bnxt vector PMD support using NEON SIMD instructions.

---
 doc/guides/nics/bnxt.rst                |   6 +-
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  10 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |   2 +-
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 12 files changed, 547 insertions(+), 58 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
doc/guides/nics/bnxt.rst +3 -3
index a53cdad21..6ff75d0a2 100644
@@ -774,9 +774,9 @@ Vector processing provides significantly improved performance over scalar
 processing (see Vector Processor, here).
 
 The BNXT PMD supports the vector processing using SSE (Streaming SIMD
-Extensions) instructions on x86 platforms. The BNXT vPMD (vector mode PMD) is
-currently limited to Intel/AMD CPU architecture. Support for ARM is *not*
-currently implemented.
+Extensions) instructions on x86 platforms. It also supports NEON intrinsics for
+vector processing on ARM CPUs. The BNXT vPMD (vector mode PMD) is available for
+Intel/AMD and ARM CPU architectures.
 
 This improved performance comes from several optimizations:
 
drivers/net/bnxt/Makefile +3 -0
index 6b9544b5d..c54fd108d 100644
@@ -44,6 +44,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
+ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
+endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD), y)
 CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/tf_ulp -I$(SRCDIR)/tf_core -I$(SRCDIR)/hcapi
drivers/net/bnxt/bnxt_ethdev.c +5 -5
index 7c2727a08..eb6ad14de 100644
@@ -1076,7 +1076,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	/*
 	 * Vector mode receive can be enabled only if scatter rx is not
@@ -1116,7 +1116,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 static eth_tx_burst_t
 bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	struct bnxt *bp = eth_dev->data->dev_private;
 
@@ -2679,7 +2679,7 @@ bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_recv_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2701,7 +2701,7 @@ bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_xmit_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2730,7 +2730,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	new_pkt_size = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
 		       VLAN_TAG_SIZE * BNXT_NUM_VLANS;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * If vector-mode tx/rx is active, disallow any MTU change that would
 	 * require scattered receive support.
drivers/net/bnxt/bnxt_ring.c +2 -2
index 24a947f27..54f654744 100644
@@ -608,7 +608,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 	}
 	rxq->index = queue_index;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	bnxt_rxq_vec_setup(rxq);
 #endif
 
@@ -713,7 +713,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 		rxq->index = i;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 		bnxt_rxq_vec_setup(rxq);
 #endif
 	}
drivers/net/bnxt/bnxt_rxq.h +1 -1
index 4f5182d9e..d5ce3b6d5 100644
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
drivers/net/bnxt/bnxt_rxr.c +1 -1
index eb6f33c7b..baf73cb25 100644
@@ -782,7 +782,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
-#if defined(RTE_ARCH_X86)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * Replenish buffers if needed when a transition has been made from
 	 * vector- to non-vector- receive processing.
drivers/net/bnxt/bnxt_rxr.h +1 -1
index e60c97fa1..2bf46cd91 100644
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
drivers/net/bnxt/bnxt_rxtx_vec_common.h new file +57 -0

57 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_neon.c new file +469 -0

469 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -44

68 lines not on this page · raw message

drivers/net/bnxt/bnxt_txr.h +1 -1
index e7f43f9d1..7715c11b8 100644
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
drivers/net/bnxt/meson.build +2 -0
index 5fb0ed380..0b93c3171 100644
@@ -68,4 +68,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
+elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+	sources += files('bnxt_rxtx_vec_neon.c')
 endif
Signature · 1 line
2.21.1 (Apple Git-122.3)
#15 lore raw

PATCH v4 4/4 doc: update release notes

In reply to Ajit Khaparde

Update release notes indicating vector mode support for ARM CPUs in Broadcom bnxt PMD.

---
 doc/guides/rel_notes/release_20_08.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/guides/rel_notes/release_20_08.rst +2 -0
index 17b35e066..1f6055441 100644
@@ -101,6 +101,8 @@ New Features
   * Added support for new resource manager API.
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
+  * Added support for rx_burst_mode_get and tx_burst_mode_get
+  * Added vector mode support for ARM CPUs
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 
Signature · 1 line
2.21.1 (Apple Git-122.3)
#16 lore raw

Re: [dpdk-dev] [PATCH v4 4/4] doc: update release notes

Quoted 13 lines · Ajit Khaparde

Update release notes indicating vector mode support for ARM CPUs in Broadcom bnxt PMD.

---
 doc/guides/rel_notes/release_20_08.rst | 2 ++
 1 file changed, 2 insertions(+)
doc/guides/rel_notes/release_20_08.rst +0 -0
index 17b35e066..1f6055441 100644

doc/guides/rel_notes/release_20_08.rst New Features · line 108

Quoted 8 lines
doc/guides/rel_notes/release_20_08.rst +2 -0
@@ -101,6 +101,8 @@ New Features
   * Added support for new resource manager API.
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
+  * Added support for rx_burst_mode_get and tx_burst_mode_get
+  * Added vector mode support for ARM CPUs
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 

Hi Ajit,

Can you please distribute these updates to the patches that adds the feature in this set, instead of having document as a separate patch?

Thanks,
ferruh

#17 lore raw

Re: [dpdk-dev] [PATCH v4 4/4] doc: update release notes

Quoted 27 lines · Ferruh Yigit

Review

Quoted 9 lines · Ajit Khaparde

Update release notes indicating vector mode support for ARM CPUs in Broadcom bnxt PMD.

---
 doc/guides/rel_notes/release_20_08.rst | 2 ++
 1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/doc/guides/rel_notes/release_20_08.rst

doc/guides/rel_notes/release_20_08.rst New Features · line 108

Quoted 12 lines

index 17b35e066..1f6055441 100644

doc/guides/rel_notes/release_20_08.rst +2 -0
@@ -101,6 +101,8 @@ New Features
   * Added support for new resource manager API.
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
+  * Added support for rx_burst_mode_get and tx_burst_mode_get
+  * Added vector mode support for ARM CPUs
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 

Hi Ajit,

Quoted 4 lines

Can you please distribute these updates to the patches that adds the feature in
this set, instead of having document as a separate patch?

Sure Ferruh can do.
v5 on the way.

Quoted 5 lines

Thanks,
ferruh

#18 lore raw

v5 cover net/bnxt: vector mode enhancements

v2->v3:
- update bnxt doc
- update 20.08 release notes

v3->v4:
- rebase against latest code base

v4->v5:
- distribute release notes updates to the patches that adds the feature

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/bnxt.rst                |   6 +-
 doc/guides/nics/features/bnxt.ini       |   1 +
 doc/guides/rel_notes/release_20_08.rst  |   2 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 15 files changed, 619 insertions(+), 67 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
Signature · 1 line
2.21.1 (Apple Git-122.3)
#19 lore raw

PATCH v5 1/3 net/bnxt: disable vector receive for mark action

From: Lance Richardson <[email protected]>

The bnxt vector mode receive handler does not support the rte_flow 'mark' action. Since we cannot know in advance whether this action will be required, add support for dynamically switching from vector to non-vector receive when the first flow create request with a mark action is processed.

Fixes 94eb699bc82e ("net/bnxt: support flow mark action")
---
 drivers/net/bnxt/bnxt_flow.c | 20 ++++++++------------
 drivers/net/bnxt/bnxt_rxr.c  | 18 ++++++++++++++++++
 2 files changed, 26 insertions(+), 12 deletions(-)
drivers/net/bnxt/bnxt_flow.c +8 -12
index 84a21dba9..19bc66a5a 100644
@@ -18,6 +18,7 @@
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
 #include "bnxt_rxq.h"
+#include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
 #include "hsi_struct_def_dpdk.h"
 
@@ -1403,18 +1404,6 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 		bnxt_update_filter_flags_en(filter, filter1, use_ntuple);
 		break;
 	case RTE_FLOW_ACTION_TYPE_MARK:
-		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
-			PMD_DRV_LOG(DEBUG,
-				    "Disable vector processing for mark\n");
-			rte_flow_error_set(error,
-					   ENOTSUP,
-					   RTE_FLOW_ERROR_TYPE_ACTION,
-					   act,
-					   "Disable vector processing for mark");
-			rc = -rte_errno;
-			goto ret;
-		}
-
 		if (bp->mark_table == NULL) {
 			rte_flow_error_set(error,
 					   ENOMEM,
@@ -1425,6 +1414,13 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
 			goto ret;
 		}
 
+		if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
+			PMD_DRV_LOG(DEBUG,
+				    "Disabling vector processing for mark\n");
+			bp->eth_dev->rx_pkt_burst = bnxt_recv_pkts;
+			bp->flags &= ~BNXT_FLAG_RX_VECTOR_PKT_MODE;
+		}
+
 		filter->valid_flags |= BNXT_FLOW_MARK_FLAG;
 		filter->mark = ((const struct rte_flow_action_mark *)
 				act->conf)->id;
drivers/net/bnxt/bnxt_rxr.c +18 -0
index 64058879e..eb6f33c7b 100644
@@ -782,6 +782,24 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
+#if defined(RTE_ARCH_X86)
+	/*
+	 * Replenish buffers if needed when a transition has been made from
+	 * vector- to non-vector- receive processing.
+	 */
+	while (unlikely(rxq->rxrearm_nb)) {
+		if (!bnxt_alloc_rx_data(rxq, rxr, rxq->rxrearm_start)) {
+			rxr->rx_prod = rxq->rxrearm_start;
+			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
+			rxq->rxrearm_start++;
+			rxq->rxrearm_nb--;
+		} else {
+			/* Retry allocation on next call. */
+			break;
+		}
+	}
+#endif
+
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
Signature · 1 line
2.21.1 (Apple Git-122.3)
#20 lore raw

PATCH v5 2/3 net/bnxt: support Rx/Tx burst mode info

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

Retrieve burst mode options according to the selected Rx/Tx burst function name.
Update 20.08 release notes with this information.

---
 doc/guides/nics/features/bnxt.ini      |  1 +
 doc/guides/rel_notes/release_20_08.rst |  1 +
 drivers/net/bnxt/bnxt_ethdev.c         | 46 ++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)
doc/guides/nics/features/bnxt.ini +1 -0
index 37a99e336..f1f300c8b 100644
@@ -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
doc/guides/rel_notes/release_20_08.rst +1 -0
index 02fa2235a..e84258a13 100644
@@ -101,6 +101,7 @@ New Features
   * Added support for new resource manager API.
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
+  * Added support for rx_burst_mode_get and tx_burst_mode_get.
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 
drivers/net/bnxt/bnxt_ethdev.c +46 -0

58 lines not on this page · raw message

Signature · 1 line
2.21.1 (Apple Git-122.3)
#21 lore raw

PATCH v5 3/3 net/bnxt: add ARM64 vector support

In reply to Ajit Khaparde

From: Lance Richardson <[email protected]>

Add bnxt vector PMD support using NEON SIMD instructions. Also update the 20.08 release notes with this information.

---
 doc/guides/nics/bnxt.rst                |   6 +-
 doc/guides/rel_notes/release_20_08.rst  |   1 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  10 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |   2 +-
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 13 files changed, 548 insertions(+), 58 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c
doc/guides/nics/bnxt.rst +3 -3
index a53cdad21..6ff75d0a2 100644
@@ -774,9 +774,9 @@ Vector processing provides significantly improved performance over scalar
 processing (see Vector Processor, here).
 
 The BNXT PMD supports the vector processing using SSE (Streaming SIMD
-Extensions) instructions on x86 platforms. The BNXT vPMD (vector mode PMD) is
-currently limited to Intel/AMD CPU architecture. Support for ARM is *not*
-currently implemented.
+Extensions) instructions on x86 platforms. It also supports NEON intrinsics for
+vector processing on ARM CPUs. The BNXT vPMD (vector mode PMD) is available for
+Intel/AMD and ARM CPU architectures.
 
 This improved performance comes from several optimizations:
 
doc/guides/rel_notes/release_20_08.rst +1 -0
index e84258a13..887ed5b40 100644
@@ -102,6 +102,7 @@ New Features
   * Added support for VXLAN encap/decap.
   * Added support for rte_flow_query for COUNT action.
   * Added support for rx_burst_mode_get and tx_burst_mode_get.
+  * Added vector mode support for ARM CPUs.
 
 * **Added support for BPF_ABS/BPF_IND load instructions.**
 
drivers/net/bnxt/Makefile +3 -0
index 6b9544b5d..c54fd108d 100644
@@ -44,6 +44,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
+ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
+endif
 
 ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD), y)
 CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/tf_ulp -I$(SRCDIR)/tf_core -I$(SRCDIR)/hcapi
drivers/net/bnxt/bnxt_ethdev.c +5 -5
index 1dc85e6df..3b9d3fbe7 100644
@@ -1076,7 +1076,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	/*
 	 * Vector mode receive can be enabled only if scatter rx is not
@@ -1116,7 +1116,7 @@ bnxt_receive_function(struct rte_eth_dev *eth_dev)
 static eth_tx_burst_t
 bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev)
 {
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 #ifndef RTE_LIBRTE_IEEE1588
 	struct bnxt *bp = eth_dev->data->dev_private;
 
@@ -2679,7 +2679,7 @@ bnxt_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_recv_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2701,7 +2701,7 @@ bnxt_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id,
 			 "Scalar");
 		return 0;
 	}
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (pkt_burst == bnxt_xmit_pkts_vec) {
 		snprintf(mode->info, sizeof(mode->info), "%s",
 			 "Vector SSE");
@@ -2730,7 +2730,7 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 	new_pkt_size = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN +
 		       VLAN_TAG_SIZE * BNXT_NUM_VLANS;
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * If vector-mode tx/rx is active, disallow any MTU change that would
 	 * require scattered receive support.
drivers/net/bnxt/bnxt_ring.c +2 -2
index 24a947f27..54f654744 100644
@@ -608,7 +608,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 	}
 	rxq->index = queue_index;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	bnxt_rxq_vec_setup(rxq);
 #endif
 
@@ -713,7 +713,7 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 		bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
 		rxq->index = i;
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 		bnxt_rxq_vec_setup(rxq);
 #endif
 	}
drivers/net/bnxt/bnxt_rxq.h +1 -1
index 4f5182d9e..d5ce3b6d5 100644
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
drivers/net/bnxt/bnxt_rxr.c +1 -1
index eb6f33c7b..baf73cb25 100644
@@ -782,7 +782,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		     !rte_spinlock_trylock(&rxq->lock)))
 		return 0;
 
-#if defined(RTE_ARCH_X86)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/*
 	 * Replenish buffers if needed when a transition has been made from
 	 * vector- to non-vector- receive processing.
drivers/net/bnxt/bnxt_rxr.h +1 -1
index e60c97fa1..2bf46cd91 100644
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
drivers/net/bnxt/bnxt_rxtx_vec_common.h new file +57 -0

57 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_neon.c new file +469 -0

469 lines not on this page · raw message

drivers/net/bnxt/bnxt_rxtx_vec_sse.c +2 -44

68 lines not on this page · raw message

drivers/net/bnxt/bnxt_txr.h +1 -1
index e7f43f9d1..7715c11b8 100644
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#ifdef RTE_ARCH_X86
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
drivers/net/bnxt/meson.build +2 -0
index 5fb0ed380..0b93c3171 100644
@@ -68,4 +68,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
+elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+	sources += files('bnxt_rxtx_vec_neon.c')
 endif
Signature · 1 line
2.21.1 (Apple Git-122.3)
#22 lore raw
In reply to Ajit Khaparde
Quoted 7 lines · Ajit Khaparde

v2->v3:
- update bnxt doc
- update 20.08 release notes

v3->v4:
- rebase against latest code base

Patchset applied to dpdk-next-net-brcm. Thanks

Quoted 32 lines

Ajit Khaparde (1):
doc: update release notes

Lance Richardson (3):
net/bnxt: disable vector receive for mark action net/bnxt: support Rx/Tx burst mode info net/bnxt: add ARM64 vector support

 doc/guides/nics/bnxt.rst                |   6 +-
 doc/guides/nics/features/bnxt.ini       |   1 +
 doc/guides/rel_notes/release_20_08.rst  |   2 +
 drivers/net/bnxt/Makefile               |   3 +
 drivers/net/bnxt/bnxt_ethdev.c          |  52 ++-
 drivers/net/bnxt/bnxt_flow.c            |  20 +-
 drivers/net/bnxt/bnxt_ring.c            |   4 +-
 drivers/net/bnxt/bnxt_rxq.h             |   2 +-
 drivers/net/bnxt/bnxt_rxr.c             |  18 +
 drivers/net/bnxt/bnxt_rxr.h             |   2 +-
 drivers/net/bnxt/bnxt_rxtx_vec_common.h |  57 +++
 drivers/net/bnxt/bnxt_rxtx_vec_neon.c   | 469 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c    |  46 +--
 drivers/net/bnxt/bnxt_txr.h             |   2 +-
 drivers/net/bnxt/meson.build            |   2 +
 15 files changed, 619 insertions(+), 67 deletions(-)
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_common.h
 create mode 100644 drivers/net/bnxt/bnxt_rxtx_vec_neon.c

--
2.21.1 (Apple Git-122.3)