Skip to contentSkip to conversation

net/iavf: enable tx outer checksum offload on avx512

PATCH Superseded Zhichao Zeng 3 participants 8 messages Dec 22, 2022 – Feb 22, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: enable tx outer checksum offload on avx512

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

---
 drivers/net/iavf/iavf_rxtx.c            |  21 +-
 drivers/net/iavf/iavf_rxtx.h            |  22 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 324 ++++++++++++++++++++++--
 drivers/net/iavf/iavf_rxtx_vec_common.h |  47 +++-
 4 files changed, 376 insertions(+), 38 deletions(-)
drivers/net/iavf/iavf_rxtx.c +17 -4
index cf87a6beda..9c8c80b4a6 100644
@@ -781,10 +781,13 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		else
 			insertion_cap = insertion_support->inner;
 
-		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1)
+		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
-		else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2)
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG1");
+		} else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2;
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG2");
+		}
 	} else {
 		txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
 	}
@@ -3215,7 +3218,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 	if (check_ret >= 0 &&
 	    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
 		/* SSE and AVX2 not support offload path yet. */
-		if (check_ret == IAVF_VECTOR_PATH) {
+		if (check_ret >= IAVF_VECTOR_PATH) {
 			use_sse = true;
 			if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
 			     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
@@ -3247,11 +3250,21 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 Vector Tx (port %d).",
 					    dev->data->port_id);
-			} else {
+			} else if (check_ret == IAVF_VECTOR_OFFLOAD_PATH) {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_offload;
 				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
+			} else if (check_ret == IAVF_VECTOR_CTX_PATH) {
+				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT Vector Tx (port %d).",
+					    dev->data->port_id);
+			} else {
+				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx_offload;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
 			}
 		}
 #endif
drivers/net/iavf/iavf_rxtx.h +20 -2
index a6ad88885b..c0eb6bd9a7 100644
@@ -26,8 +26,6 @@
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
-		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
@@ -38,14 +36,29 @@
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_CKSUM)
 
+#define IAVF_TX_VECTOR_OFFLOAD_CTX (			\
+		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
+
 #define IAVF_RX_VECTOR_OFFLOAD (				 \
 		RTE_ETH_RX_OFFLOAD_CHECKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_VLAN |		 \
 		RTE_ETH_RX_OFFLOAD_RSS_HASH)
 
+/**
+ * According to the vlan capabilities returned by the driver and FW, the vlan tci
+ * needs to be inserted to the L2TAG1 or L2TAG2 fields.
+ * If L2TAG1, it should be inserted to the L2TAG1 field in data desc.
+ * if L2TAG2, it should be inserted to the L2TAG2 field in ctx desc.
+ * Besides, tunneling parameters and other fields need be configured in ctx desc
+ * if the outer checksum offload is enabled.
+ */
+
 #define IAVF_VECTOR_PATH 0
 #define IAVF_VECTOR_OFFLOAD_PATH 1
+#define IAVF_VECTOR_CTX_PATH 2
+#define IAVF_VECTOR_CTX_OFFLOAD_PATH 3
 
 #define DEFAULT_TX_RS_THRESH     32
 #define DEFAULT_TX_FREE_THRESH   32
@@ -281,6 +294,7 @@ struct iavf_tx_queue {
 #define IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2	BIT(1)
 	uint8_t vlan_flag;
 	uint8_t tc;
+	uint8_t use_ctx:1;            /* if use the ctx desc, a packet needs two descriptors */
 };
 
 /* Offload features */
@@ -713,6 +727,10 @@ uint16_t iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 uint16_t iavf_xmit_pkts_vec_avx512_offload(void *tx_queue,
 					   struct rte_mbuf **tx_pkts,
 					   uint16_t nb_pkts);
+uint16_t iavf_xmit_pkts_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
+				  uint16_t nb_pkts);
+uint16_t iavf_xmit_pkts_vec_avx512_ctx_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+				  uint16_t nb_pkts);
 int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
 
 uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
drivers/net/iavf/iavf_rxtx_vec_avx512.c +303 -21

418 lines not on this page · raw message

drivers/net/iavf/iavf_rxtx_vec_common.h +36 -11

74 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 net/iavf: enable tx outer checksum offload on avx512

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

---
v2: fix path select logic

---
 drivers/net/iavf/iavf_rxtx.c            |  21 +-
 drivers/net/iavf/iavf_rxtx.h            |  22 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 324 ++++++++++++++++++++++--
 drivers/net/iavf/iavf_rxtx_vec_common.h |  47 +++-
 4 files changed, 376 insertions(+), 38 deletions(-)
drivers/net/iavf/iavf_rxtx.c +17 -4
index 3d9224b38d..3d60978901 100644
@@ -781,10 +781,13 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		else
 			insertion_cap = insertion_support->inner;
 
-		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1)
+		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
-		else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2)
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG1");
+		} else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2;
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG2");
+		}
 	} else {
 		txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
 	}
@@ -3229,7 +3232,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 	if (check_ret >= 0 &&
 	    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
 		/* SSE and AVX2 not support offload path yet. */
-		if (check_ret == IAVF_VECTOR_PATH) {
+		if (check_ret == IAVF_VECTOR_PATH || check_ret == IAVF_VECTOR_CTX_PATH) {
 			use_sse = true;
 			if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
 			     rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
@@ -3261,11 +3264,21 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 Vector Tx (port %d).",
 					    dev->data->port_id);
-			} else {
+			} else if (check_ret == IAVF_VECTOR_OFFLOAD_PATH) {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_offload;
 				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
+			} else if (check_ret == IAVF_VECTOR_CTX_PATH) {
+				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT Vector Tx (port %d).",
+					    dev->data->port_id);
+			} else {
+				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx_offload;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
 			}
 		}
 #endif
drivers/net/iavf/iavf_rxtx.h +20 -2
index a6ad88885b..3e030d1ffc 100644
@@ -26,8 +26,6 @@
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
-		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
@@ -38,14 +36,29 @@
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_CKSUM)
 
+#define IAVF_TX_VECTOR_OFFLOAD_CTX (			\
+		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
+
 #define IAVF_RX_VECTOR_OFFLOAD (				 \
 		RTE_ETH_RX_OFFLOAD_CHECKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_VLAN |		 \
 		RTE_ETH_RX_OFFLOAD_RSS_HASH)
 
+/**
+ * According to the vlan capabilities returned by the driver and FW, the vlan tci
+ * needs to be inserted to the L2TAG1 or L2TAG2 fields.
+ * If L2TAG1, it should be inserted to the L2TAG1 field in data desc.
+ * If L2TAG2, it should be inserted to the L2TAG2 field in ctx desc.
+ * Besides, tunneling parameters and other fields need be configured in ctx desc
+ * if the outer checksum offload is enabled.
+ */
+
 #define IAVF_VECTOR_PATH 0
 #define IAVF_VECTOR_OFFLOAD_PATH 1
+#define IAVF_VECTOR_CTX_PATH 2
+#define IAVF_VECTOR_CTX_OFFLOAD_PATH 3
 
 #define DEFAULT_TX_RS_THRESH     32
 #define DEFAULT_TX_FREE_THRESH   32
@@ -281,6 +294,7 @@ struct iavf_tx_queue {
 #define IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2	BIT(1)
 	uint8_t vlan_flag;
 	uint8_t tc;
+	uint8_t use_ctx:1;            /* if use the ctx desc, a packet needs two descriptors */
 };
 
 /* Offload features */
@@ -713,6 +727,10 @@ uint16_t iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 uint16_t iavf_xmit_pkts_vec_avx512_offload(void *tx_queue,
 					   struct rte_mbuf **tx_pkts,
 					   uint16_t nb_pkts);
+uint16_t iavf_xmit_pkts_vec_avx512_ctx(void *tx_queue, struct rte_mbuf **tx_pkts,
+				  uint16_t nb_pkts);
+uint16_t iavf_xmit_pkts_vec_avx512_ctx_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+				  uint16_t nb_pkts);
 int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
 
 uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
drivers/net/iavf/iavf_rxtx_vec_avx512.c +303 -21

418 lines not on this page · raw message

drivers/net/iavf/iavf_rxtx_vec_common.h +36 -11

74 lines not on this page · raw message

Signature · 1 line
2.25.1
Tested-by on v2 1/1
#2 lore raw
Quoted 12 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Thursday, February 2, 2023 1:59 PM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Zhou, YidingX <[email protected]>; Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: [PATCH v2] net/iavf: enable tx outer checksum offload on avx512

Quoted 6 lines

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

V2 Patch functional tested passed.

Regards,

Quoted 10 lines

---
v2: fix path select logic

---
 drivers/net/iavf/iavf_rxtx.c            |  21 +-
 drivers/net/iavf/iavf_rxtx.h            |  22 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 324 ++++++++++++++++++++++--
drivers/net/iavf/iavf_rxtx_vec_common.h |  47 +++-
 4 files changed, 376 insertions(+), 38 deletions(-)
Acked-by Applied
#3 lore raw
Quoted 29 lines

-----Original Message-----
From: Xu, Ke1 <[email protected]>
Sent: Thursday, February 2, 2023 2:25 PM
To: Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Zhou, YidingX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: RE: [PATCH v2] net/iavf: enable tx outer checksum offload on avx512

Quoted 17 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Thursday, February 2, 2023 1:59 PM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Zhou, YidingX <[email protected]>; Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: [PATCH v2] net/iavf: enable tx outer checksum offload on avx512

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

Quoted 7 lines
Quoted 2 lines

V2 Patch functional tested passed.

Regards,

Applied to dpdk-next-net-intel.

Thanks
Qi

#4 lore raw

PATCH v3 1/1 net/iavf: enable Tx outer checksum offload on avx512

In reply to Zhichao Zeng

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

---
v3: fix tunneling parameters
---
v2: fix path select logic

---
 drivers/net/iavf/iavf_rxtx.c            |  14 +-
 drivers/net/iavf/iavf_rxtx.h            |  19 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 392 ++++++++++++++++++++++--
 drivers/net/iavf/iavf_rxtx_vec_common.h |  44 ++-
 4 files changed, 432 insertions(+), 37 deletions(-)
drivers/net/iavf/iavf_rxtx.c +11 -3
index 3d9224b38d..a860350919 100644
@@ -781,10 +781,13 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		else
 			insertion_cap = insertion_support->inner;
 
-		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1)
+		if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
-		else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2)
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG1");
+		} else if (insertion_cap & VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2) {
 			txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2;
+			PMD_INIT_LOG(DEBUG, "VLAN insertion_cap: L2TAG2");
+		}
 	} else {
 		txq->vlan_flag = IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG1;
 	}
@@ -3261,11 +3264,16 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 Vector Tx (port %d).",
 					    dev->data->port_id);
-			} else {
+			} else if (check_ret == IAVF_VECTOR_OFFLOAD_PATH) {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_offload;
 				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
+			} else {
+				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx512_ctx_offload;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT OFFLOAD Vector Tx (port %d).",
+					    dev->data->port_id);
 			}
 		}
 #endif
drivers/net/iavf/iavf_rxtx.h +17 -2
index a6ad88885b..09e2127db0 100644
@@ -26,8 +26,6 @@
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
-		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |    \
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
@@ -38,14 +36,28 @@
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_CKSUM)
 
+#define IAVF_TX_VECTOR_OFFLOAD_CTX (			\
+		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
+		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
+
 #define IAVF_RX_VECTOR_OFFLOAD (				 \
 		RTE_ETH_RX_OFFLOAD_CHECKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_RX_OFFLOAD_VLAN |		 \
 		RTE_ETH_RX_OFFLOAD_RSS_HASH)
 
+/**
+ * According to the vlan capabilities returned by the driver and FW, the vlan tci
+ * needs to be inserted to the L2TAG1 or L2TAG2 fields.
+ * If L2TAG1, it should be inserted to the L2TAG1 field in data desc.
+ * If L2TAG2, it should be inserted to the L2TAG2 field in ctx desc.
+ * Besides, tunneling parameters and other fields need be configured in ctx desc
+ * if the outer checksum offload is enabled.
+ */
+
 #define IAVF_VECTOR_PATH 0
 #define IAVF_VECTOR_OFFLOAD_PATH 1
+#define IAVF_VECTOR_CTX_OFFLOAD_PATH 2
 
 #define DEFAULT_TX_RS_THRESH     32
 #define DEFAULT_TX_FREE_THRESH   32
@@ -281,6 +293,7 @@ struct iavf_tx_queue {
 #define IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2	BIT(1)
 	uint8_t vlan_flag;
 	uint8_t tc;
+	uint8_t use_ctx:1;            /* if use the ctx desc, a packet needs two descriptors */
 };
 
 /* Offload features */
@@ -713,6 +726,8 @@ uint16_t iavf_xmit_pkts_vec_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
 uint16_t iavf_xmit_pkts_vec_avx512_offload(void *tx_queue,
 					   struct rte_mbuf **tx_pkts,
 					   uint16_t nb_pkts);
+uint16_t iavf_xmit_pkts_vec_avx512_ctx_offload(void *tx_queue, struct rte_mbuf **tx_pkts,
+				  uint16_t nb_pkts);
 int iavf_txq_vec_setup_avx512(struct iavf_tx_queue *txq);
 
 uint8_t iavf_proto_xtr_type_to_rxdid(uint8_t xtr_type);
drivers/net/iavf/iavf_rxtx_vec_avx512.c +371 -21

486 lines not on this page · raw message

drivers/net/iavf/iavf_rxtx_vec_common.h +33 -11

71 lines not on this page · raw message

Signature · 1 line
2.25.1
Tested-by on v3 1/1
#5 lore raw

RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 14 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Friday, February 17, 2023 9:49 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 6 lines

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

V3 patch validated and passed.

Quoted 12 lines

---
v3: fix tunneling parameters
---
v2: fix path select logic

---
 drivers/net/iavf/iavf_rxtx.c            |  14 +-
 drivers/net/iavf/iavf_rxtx.h            |  19 +-
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 392 ++++++++++++++++++++++--
drivers/net/iavf/iavf_rxtx_vec_common.h |  44 ++-
 4 files changed, 432 insertions(+), 37 deletions(-)
#6 lore raw

RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 34 lines

-----Original Message-----
From: Xu, Ke1 <[email protected]>
Sent: Friday, February 17, 2023 9:51 AM
To: Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 18 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Friday, February 17, 2023 9:49 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

Quoted 6 lines
Quoted 2 lines

V3 patch validated and passed.

replaced V2 in dpdk-next-net-intel.

#7 lore raw

RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 49 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Sunday, February 19, 2023 4:16 PM
To: Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 33 lines

-----Original Message-----
From: Xu, Ke1 <[email protected]>
Sent: Friday, February 17, 2023 9:51 AM
To: Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: RE: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

Quoted 18 lines

-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Friday, February 17, 2023 9:49 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zhang, Qi Z <[email protected]>; Xu, Ke1 <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>
Subject: [PATCH v3] net/iavf: enable Tx outer checksum offload on avx512

This patch is to enable outer checksum offload on avx512 Tx path for tunnel packet by adding Tx path with context descriptor and adjusting path select logic.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

V3 patch validated and passed.

replaced V2 in dpdk-next-net-intel.

As v2 already be merged into main, expect a new patch with increment.