Skip to contentSkip to conversation

add Rx/Tx offload paths for ICE AVX2

PATCH Superseded Wenzhuo Lu 4 participants 12 messages Jun 2, 2021 – Jul 6, 2021 Network drivers

lore
Share & tools
lore

Wenzhuo Lu

author
#0 lore raw

cover add Rx/Tx offload paths for ICE AVX2

Add specific paths for RX/TX AVX2, called offload paths.
In these paths, support the HW offload features, like, checksum, VLAN, RSS offload. These paths are chosen automatically according to the configuration.

Wenzhuo Lu (2):
net/ice: add Tx AVX2 offload path
net/ice: add Rx AVX2 offload path

 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  86 +++++--
 drivers/net/ice/ice_rxtx.h             |   7 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 402 +++++++++++++++++++--------------
 4 files changed, 307 insertions(+), 194 deletions(-)
Signature · 1 line
1.9.3
author
#1 lore raw

PATCH 1/2 net/ice: add Tx AVX2 offload path

Add a specific path for TX AVX2.
In this path, support the HW offload features, like, checksum insertion, VLAN insertion.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 drivers/net/ice/ice_rxtx.c          | 36 ++++++++++++++++---------
 drivers/net/ice/ice_rxtx.h          |  2 ++
 drivers/net/ice/ice_rxtx_vec_avx2.c | 54 ++++++++++++++++++++++++++-----------
 3 files changed, 64 insertions(+), 28 deletions(-)
drivers/net/ice/ice_rxtx.c +23 -13
index 49abcb2..7c9474e 100644
@@ -3294,7 +3294,7 @@
 #ifdef RTE_ARCH_X86
 	struct ice_tx_queue *txq;
 	int i;
-	int tx_check_ret;
+	int tx_check_ret = -1;
 	bool use_avx512 = false;
 	bool use_avx2 = false;
 
@@ -3313,13 +3313,13 @@
 			PMD_DRV_LOG(NOTICE,
 				"AVX512 is not supported in build env");
 #endif
-			if (!use_avx512 && tx_check_ret == ICE_VECTOR_PATH &&
-			(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
-			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
-			rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
+			if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
+			     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
+			    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
 				use_avx2 = true;
 
-			if (!use_avx512 && tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
+			if (!use_avx2 && !use_avx512 &&
+			    tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
 				ad->tx_vec_allowed = false;
 
 			if (ad->tx_vec_allowed) {
@@ -3337,6 +3337,7 @@
 	}
 
 	if (ad->tx_vec_allowed) {
+		dev->tx_pkt_prepare = NULL;
 		if (use_avx512) {
 #ifdef CC_AVX512_SUPPORT
 			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
@@ -3345,6 +3346,7 @@
 					    dev->data->port_id);
 				dev->tx_pkt_burst =
 					ice_xmit_pkts_vec_avx512_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
 			} else {
 				PMD_DRV_LOG(NOTICE,
 					    "Using AVX512 Vector Tx (port %d).",
@@ -3353,14 +3355,22 @@
 			}
 #endif
 		} else {
-			PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
-				    use_avx2 ? "avx2 " : "",
-				    dev->data->port_id);
-			dev->tx_pkt_burst = use_avx2 ?
-					    ice_xmit_pkts_vec_avx2 :
-					    ice_xmit_pkts_vec;
+			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+				PMD_DRV_LOG(NOTICE,
+					    "Using AVX2 OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
+				dev->tx_pkt_burst =
+					ice_xmit_pkts_vec_avx2_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
+			} else {
+				PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
+					    use_avx2 ? "avx2 " : "",
+					    dev->data->port_id);
+				dev->tx_pkt_burst = use_avx2 ?
+						    ice_xmit_pkts_vec_avx2 :
+						    ice_xmit_pkts_vec;
+			}
 		}
-		dev->tx_pkt_prepare = NULL;
 
 		return;
 	}
drivers/net/ice/ice_rxtx.h +2 -0
index b29387c..595dc66 100644
@@ -255,6 +255,8 @@ uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
 				  uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512_offload(void *rx_queue,
drivers/net/ice/ice_rxtx_vec_avx2.c +39 -15

138 lines not on this page · raw message

Signature · 1 line
1.9.3
author
#2 lore raw

PATCH 2/2 net/ice: add Rx AVX2 offload path

In reply to Wenzhuo Lu

Add a specific path for RX AVX2.
In this path, support the HW offload features, like, checksum, VLAN stripping, RSS hash.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  50 +++--
 drivers/net/ice/ice_rxtx.h             |   5 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 348 ++++++++++++++++++---------------
 4 files changed, 243 insertions(+), 166 deletions(-)
doc/guides/rel_notes/release_21_08.rst +6 -0
index a6ecfdf..203b772 100644
@@ -55,6 +55,12 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Updated Intel ice driver.**
+
+  * In AVX2 code, added the new RX and TX paths to use the HW offload
+    features. When the HW offload features are configured to be used, the
+    offload paths are chosen automatically. In parallel the support for HW
+    offload features was removed from the legacy AVX2 paths.
 
 Removed Items
 -------------
drivers/net/ice/ice_rxtx.c +38 -12

87 lines not on this page · raw message

drivers/net/ice/ice_rxtx.h +5 -0
index 595dc66..bd28a68 100644
@@ -250,9 +250,14 @@ uint16_t ice_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			   uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_recv_pkts_vec_avx2_offload(void *rx_queue, struct rte_mbuf **rx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  struct rte_mbuf **rx_pkts,
 					  uint16_t nb_pkts);
+uint16_t ice_recv_scattered_pkts_vec_avx2_offload(void *rx_queue,
+						  struct rte_mbuf **rx_pkts,
+						  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
drivers/net/ice/ice_rxtx_vec_avx2.c +194 -154

426 lines not on this page · raw message

Signature · 1 line
1.9.3
author
#3 lore raw

v2 cover add Rx/Tx offload paths for ICE AVX2

In reply to Wenzhuo Lu

Add specific paths for RX/TX AVX2, called offload paths.
In these paths, support the HW offload features, like, checksum, VLAN, RSS offload. These paths are chosen automatically according to the configuration.

v2:
- fdir should be supported by offload and normal path.

Wenzhuo Lu (2):
net/ice: add Tx AVX2 offload path
net/ice: add Rx AVX2 offload path

 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  96 ++++++---
 drivers/net/ice/ice_rxtx.h             |   7 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 350 +++++++++++++++++++--------------
 4 files changed, 286 insertions(+), 173 deletions(-)
Signature · 1 line
1.8.3.1
author
#4 lore raw

PATCH v2 1/2 net/ice: add Tx AVX2 offload path

Add a specific path for TX AVX2.
In this path, support the HW offload features, like, checksum insertion, VLAN insertion.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 drivers/net/ice/ice_rxtx.c          | 46 ++++++++++++++++++-------------
 drivers/net/ice/ice_rxtx.h          |  2 ++
 drivers/net/ice/ice_rxtx_vec_avx2.c | 54 ++++++++++++++++++++++++++-----------
 3 files changed, 69 insertions(+), 33 deletions(-)
drivers/net/ice/ice_rxtx.c +28 -18
index 49abcb2..5d7ca60 100644
@@ -3294,9 +3294,9 @@
 #ifdef RTE_ARCH_X86
 	struct ice_tx_queue *txq;
 	int i;
-	int tx_check_ret;
-	bool use_avx512 = false;
-	bool use_avx2 = false;
+	int tx_check_ret = -1;
+	bool cap_avx512 = false;
+	bool cap_avx2 = false;
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		tx_check_ret = ice_tx_vec_dev_check(dev);
@@ -3308,18 +3308,18 @@
 			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
 			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1)
 #ifdef CC_AVX512_SUPPORT
-				use_avx512 = true;
+				cap_avx512 = true;
 #else
 			PMD_DRV_LOG(NOTICE,
 				"AVX512 is not supported in build env");
 #endif
-			if (!use_avx512 && tx_check_ret == ICE_VECTOR_PATH &&
-			(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
-			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
-			rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
-				use_avx2 = true;
+			if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
+			     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
+			    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
+				cap_avx2 = true;
 
-			if (!use_avx512 && tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
+			if (!cap_avx2 && !cap_avx512 &&
+			    tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
 				ad->tx_vec_allowed = false;
 
 			if (ad->tx_vec_allowed) {
@@ -3337,7 +3337,8 @@
 	}
 
 	if (ad->tx_vec_allowed) {
-		if (use_avx512) {
+		dev->tx_pkt_prepare = NULL;
+		if (cap_avx512) {
 #ifdef CC_AVX512_SUPPORT
 			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
 				PMD_DRV_LOG(NOTICE,
@@ -3345,6 +3346,7 @@
 					    dev->data->port_id);
 				dev->tx_pkt_burst =
 					ice_xmit_pkts_vec_avx512_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
 			} else {
 				PMD_DRV_LOG(NOTICE,
 					    "Using AVX512 Vector Tx (port %d).",
@@ -3353,14 +3355,22 @@
 			}
 #endif
 		} else {
-			PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
-				    use_avx2 ? "avx2 " : "",
-				    dev->data->port_id);
-			dev->tx_pkt_burst = use_avx2 ?
-					    ice_xmit_pkts_vec_avx2 :
-					    ice_xmit_pkts_vec;
+			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+				PMD_DRV_LOG(NOTICE,
+					    "Using AVX2 OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
+				dev->tx_pkt_burst =
+					ice_xmit_pkts_vec_avx2_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
+			} else {
+				PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
+					    cap_avx2 ? "avx2 " : "",
+					    dev->data->port_id);
+				dev->tx_pkt_burst = cap_avx2 ?
+						    ice_xmit_pkts_vec_avx2 :
+						    ice_xmit_pkts_vec;
+			}
 		}
-		dev->tx_pkt_prepare = NULL;
 
 		return;
 	}
drivers/net/ice/ice_rxtx.h +2 -0
index b29387c..595dc66 100644
@@ -255,6 +255,8 @@ uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
 				  uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512_offload(void *rx_queue,
drivers/net/ice/ice_rxtx_vec_avx2.c +39 -15

138 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author
#5 lore raw

PATCH v2 2/2 net/ice: add Rx AVX2 offload path

In reply to Wenzhuo Lu

Add a specific path for RX AVX2.
In this path, support the HW offload features, like, checksum, VLAN stripping, RSS hash.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  50 ++++--
 drivers/net/ice/ice_rxtx.h             |   5 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 296 +++++++++++++++++++--------------
 4 files changed, 217 insertions(+), 140 deletions(-)
doc/guides/rel_notes/release_21_08.rst +6 -0
index a6ecfdf..203b772 100644
@@ -55,6 +55,12 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Updated Intel ice driver.**
+
+  * In AVX2 code, added the new RX and TX paths to use the HW offload
+    features. When the HW offload features are configured to be used, the
+    offload paths are chosen automatically. In parallel the support for HW
+    offload features was removed from the legacy AVX2 paths.
 
 Removed Items
 -------------
drivers/net/ice/ice_rxtx.c +38 -12

87 lines not on this page · raw message

drivers/net/ice/ice_rxtx.h +5 -0
index 595dc66..bd28a68 100644
@@ -250,9 +250,14 @@ uint16_t ice_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			   uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_recv_pkts_vec_avx2_offload(void *rx_queue, struct rte_mbuf **rx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  struct rte_mbuf **rx_pkts,
 					  uint16_t nb_pkts);
+uint16_t ice_recv_scattered_pkts_vec_avx2_offload(void *rx_queue,
+						  struct rte_mbuf **rx_pkts,
+						  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
drivers/net/ice/ice_rxtx_vec_avx2.c +168 -128

363 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author
#6 lore raw

v3 cover add Rx/Tx offload paths for ICE AVX2

In reply to Wenzhuo Lu

Add specific paths for RX/TX AVX2, called offload paths.
In these paths, support the HW offload features, like, checksum, VLAN, RSS offload. These paths are chosen automatically according to the configuration.

v2:
- fdir should be supported by offload and normal path.

v3:
- rebased on the newest code.

Wenzhuo Lu (2):
net/ice: add Tx AVX2 offload path
net/ice: add Rx AVX2 offload path

 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  87 +++++---
 drivers/net/ice/ice_rxtx.h             |   7 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 350 +++++++++++++++++++--------------
 4 files changed, 282 insertions(+), 168 deletions(-)
Signature · 1 line
1.8.3.1
author
#7 lore raw

PATCH v3 1/2 net/ice: add Tx AVX2 offload path

Add a specific path for TX AVX2.
In this path, support the HW offload features, like, checksum insertion, VLAN insertion.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 drivers/net/ice/ice_rxtx.c          | 37 ++++++++++++++++---------
 drivers/net/ice/ice_rxtx.h          |  2 ++
 drivers/net/ice/ice_rxtx_vec_avx2.c | 54 ++++++++++++++++++++++++++-----------
 3 files changed, 65 insertions(+), 28 deletions(-)
drivers/net/ice/ice_rxtx.c +24 -13
index fc9bb5a..5419047 100644
@@ -3288,7 +3288,7 @@
 #ifdef RTE_ARCH_X86
 	struct ice_tx_queue *txq;
 	int i;
-	int tx_check_ret = 0;
+	int tx_check_ret = -1;
 
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		ad->tx_use_avx2 = false;
@@ -3307,13 +3307,14 @@
 			PMD_DRV_LOG(NOTICE,
 				"AVX512 is not supported in build env");
 #endif
-			if (!ad->tx_use_avx512 && tx_check_ret == ICE_VECTOR_PATH &&
-			(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
-			rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
-			rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
+			if (!ad->tx_use_avx512 &&
+				(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
+				rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
+				rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
 				ad->tx_use_avx2 = true;
 
-			if (!ad->tx_use_avx512 && tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
+			if (!ad->tx_use_avx2 && !ad->tx_use_avx512 &&
+				tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
 				ad->tx_vec_allowed = false;
 
 			if (ad->tx_vec_allowed) {
@@ -3331,6 +3332,7 @@
 	}
 
 	if (ad->tx_vec_allowed) {
+		dev->tx_pkt_prepare = NULL;
 		if (ad->tx_use_avx512) {
 #ifdef CC_AVX512_SUPPORT
 			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
@@ -3339,6 +3341,7 @@
 					    dev->data->port_id);
 				dev->tx_pkt_burst =
 					ice_xmit_pkts_vec_avx512_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
 			} else {
 				PMD_DRV_LOG(NOTICE,
 					    "Using AVX512 Vector Tx (port %d).",
@@ -3347,14 +3350,22 @@
 			}
 #endif
 		} else {
-			PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
-				    ad->tx_use_avx2 ? "avx2 " : "",
-				    dev->data->port_id);
-			dev->tx_pkt_burst = ad->tx_use_avx2 ?
-					    ice_xmit_pkts_vec_avx2 :
-					    ice_xmit_pkts_vec;
+			if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
+				PMD_DRV_LOG(NOTICE,
+					    "Using AVX2 OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
+				dev->tx_pkt_burst =
+					ice_xmit_pkts_vec_avx2_offload;
+				dev->tx_pkt_prepare = ice_prep_pkts;
+			} else {
+				PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
+					    ad->tx_use_avx2 ? "avx2 " : "",
+					    dev->data->port_id);
+				dev->tx_pkt_burst = ad->tx_use_avx2 ?
+						    ice_xmit_pkts_vec_avx2 :
+						    ice_xmit_pkts_vec;
+			}
 		}
-		dev->tx_pkt_prepare = NULL;
 
 		return;
 	}
drivers/net/ice/ice_rxtx.h +2 -0
index 86b6f3d..f0536f7 100644
@@ -255,6 +255,8 @@ uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
 				  uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx512_offload(void *rx_queue,
drivers/net/ice/ice_rxtx_vec_avx2.c +39 -15

138 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author
#8 lore raw

PATCH v3 2/2 net/ice: add Rx AVX2 offload path

In reply to Wenzhuo Lu

Add a specific path for RX AVX2.
In this path, support the HW offload features, like, checksum, VLAN stripping, RSS hash.
This path is chosen automatically according to the configuration.

'inline' is used, then the duplicate code is generated by the compiler.

---
 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  50 ++++--
 drivers/net/ice/ice_rxtx.h             |   5 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 296 +++++++++++++++++++--------------
 4 files changed, 217 insertions(+), 140 deletions(-)
doc/guides/rel_notes/release_21_08.rst +6 -0
index a6ecfdf..203b772 100644
@@ -55,6 +55,12 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Updated Intel ice driver.**
+
+  * In AVX2 code, added the new RX and TX paths to use the HW offload
+    features. When the HW offload features are configured to be used, the
+    offload paths are chosen automatically. In parallel the support for HW
+    offload features was removed from the legacy AVX2 paths.
 
 Removed Items
 -------------
drivers/net/ice/ice_rxtx.c +38 -12

87 lines not on this page · raw message

drivers/net/ice/ice_rxtx.h +5 -0
index f0536f7..b10db08 100644
@@ -250,9 +250,14 @@ uint16_t ice_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			   uint16_t nb_pkts);
 uint16_t ice_recv_pkts_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 				uint16_t nb_pkts);
+uint16_t ice_recv_pkts_vec_avx2_offload(void *rx_queue, struct rte_mbuf **rx_pkts,
+					uint16_t nb_pkts);
 uint16_t ice_recv_scattered_pkts_vec_avx2(void *rx_queue,
 					  struct rte_mbuf **rx_pkts,
 					  uint16_t nb_pkts);
+uint16_t ice_recv_scattered_pkts_vec_avx2_offload(void *rx_queue,
+						  struct rte_mbuf **rx_pkts,
+						  uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
 				uint16_t nb_pkts);
 uint16_t ice_xmit_pkts_vec_avx2_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
drivers/net/ice/ice_rxtx_vec_avx2.c +168 -128

363 lines not on this page · raw message

Signature · 1 line
1.8.3.1
Acked-by on the v3 series
#9 lore raw
In reply to Wenzhuo Lu
Quoted 23 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Wenzhuo Lu
Sent: Tuesday, June 29, 2021 10:29 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>
Subject: [dpdk-dev] [PATCH v3 0/2] add Rx/Tx offload paths for ICE AVX2

Add specific paths for RX/TX AVX2, called offload paths.
In these paths, support the HW offload features, like, checksum, VLAN, RSS offload.
These paths are chosen automatically according to the configuration.

v2:
- fdir should be supported by offload and normal path.

v3:
- rebased on the newest code.

Wenzhuo Lu (2):
net/ice: add Tx AVX2 offload path
net/ice: add Rx AVX2 offload path

Quoted 8 lines
 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  87 +++++---
 drivers/net/ice/ice_rxtx.h             |   7 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 350 +++++++++++++++++++--------------
 4 files changed, 282 insertions(+), 168 deletions(-)

--
1.8.3.1

Applied
#10 lore raw
Quoted 37 lines

-----Original Message-----
From: Rong, Leyi <[email protected]>
Sent: Friday, July 2, 2021 4:04 PM
To: Lu, Wenzhuo <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v3 0/2] add Rx/Tx offload paths for ICE AVX2

Quoted 19 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Wenzhuo Lu
Sent: Tuesday, June 29, 2021 10:29 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>
Subject: [dpdk-dev] [PATCH v3 0/2] add Rx/Tx offload paths for ICE AVX2

Add specific paths for RX/TX AVX2, called offload paths.
In these paths, support the HW offload features, like, checksum, VLAN, RSS offload.
These paths are chosen automatically according to the configuration.

v2:
- fdir should be supported by offload and normal path.

v3:
- rebased on the newest code.

Quoted 8 lines

Wenzhuo Lu (2):
net/ice: add Tx AVX2 offload path
net/ice: add Rx AVX2 offload path

 doc/guides/rel_notes/release_21_08.rst |   6 +
 drivers/net/ice/ice_rxtx.c             |  87 +++++---
 drivers/net/ice/ice_rxtx.h             |   7 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 350
Quoted 7 lines

+++++++++++++++++++--------------

Quoted 4 lines
 4 files changed, 282 insertions(+), 168 deletions(-)

--
1.8.3.1

Applied to dpdk-next-net-intel.

Thanks
Qi