DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] common/iavf: enable hash calculation based on IPv4 checksum
@ 2021-09-09  6:53 Alvin Zhang
  2021-09-09  6:53 ` [dpdk-dev] [PATCH 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
  2021-09-24  9:09 ` [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  0 siblings, 2 replies; 8+ messages in thread
From: Alvin Zhang @ 2021-09-09  6:53 UTC (permalink / raw)
  To: qi.z.zhang, junfeng.guo; +Cc: dev, Alvin Zhang

Add IPv4 header checksum field selector, it can be used in creating
FDIR or RSS rules related to IPv4 header checksum.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/common/iavf/virtchnl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 1cf0866..a14d140 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -1574,6 +1574,7 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_IPV4_DSCP,
 	VIRTCHNL_PROTO_HDR_IPV4_TTL,
 	VIRTCHNL_PROTO_HDR_IPV4_PROT,
+	VIRTCHNL_PROTO_HDR_IPV4_CHKSUM,
 	/* IPV6 */
 	VIRTCHNL_PROTO_HDR_IPV6_SRC =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6),
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/iavf: support IPv4/L4 checksum RSS offload
  2021-09-09  6:53 [dpdk-dev] [PATCH 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
@ 2021-09-09  6:53 ` Alvin Zhang
  2021-09-24  9:09 ` [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  1 sibling, 0 replies; 8+ messages in thread
From: Alvin Zhang @ 2021-09-09  6:53 UTC (permalink / raw)
  To: qi.z.zhang, junfeng.guo; +Cc: dev, Alvin Zhang

Add supports for RSS_IPV4_CHKSUM & RSS_L4_CHKSUM RSS offload types
in RSS flow.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 2b03dad..6a77378 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -342,23 +342,30 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 
 /* IPv4 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV4	(ETH_RSS_ETH | ETH_RSS_IPV4 | \
-					 ETH_RSS_FRAG_IPV4)
+					 ETH_RSS_FRAG_IPV4 | \
+					 ETH_RSS_IPV4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_UDP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_UDP)
+					 ETH_RSS_NONFRAG_IPV4_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_TCP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_TCP)
+					 ETH_RSS_NONFRAG_IPV4_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_SCTP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_SCTP)
+					 ETH_RSS_NONFRAG_IPV4_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* IPv6 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV6	(ETH_RSS_ETH | ETH_RSS_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_FRAG	(IAVF_RSS_TYPE_OUTER_IPV6 | \
 					 ETH_RSS_FRAG_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_UDP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_UDP)
+					 ETH_RSS_NONFRAG_IPV6_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_TCP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_TCP)
+					 ETH_RSS_NONFRAG_IPV6_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_SCTP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_SCTP)
+					 ETH_RSS_NONFRAG_IPV6_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* VLAN IPV4 */
 #define IAVF_RSS_TYPE_VLAN_IPV4		(IAVF_RSS_TYPE_OUTER_IPV4 | \
 					 ETH_RSS_S_VLAN | ETH_RSS_C_VLAN)
@@ -832,6 +839,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV4_FRAG:
 			if (rss_type &
@@ -844,6 +855,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV6:
 			if (rss_type &
@@ -895,6 +910,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, UDP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_TCP:
 			if (rss_type &
@@ -911,6 +929,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, TCP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_SCTP:
 			if (rss_type &
@@ -927,6 +948,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, SCTP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_S_VLAN:
 			if (!(rss_type & ETH_RSS_S_VLAN))
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum
  2021-09-09  6:53 [dpdk-dev] [PATCH 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  2021-09-09  6:53 ` [dpdk-dev] [PATCH 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
@ 2021-09-24  9:09 ` Alvin Zhang
  2021-09-24  9:09   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
  2021-09-24  9:57   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  1 sibling, 2 replies; 8+ messages in thread
From: Alvin Zhang @ 2021-09-24  9:09 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang

Add IPv4 header checksum field selector, it can be used in creating
FDIR or RSS rules related to IPv4 header checksum.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---

v2: rebase to dpdk-next-net-intel
---
 drivers/common/iavf/virtchnl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 83f51d8..067f715 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -1571,6 +1571,7 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_IPV4_DSCP,
 	VIRTCHNL_PROTO_HDR_IPV4_TTL,
 	VIRTCHNL_PROTO_HDR_IPV4_PROT,
+	VIRTCHNL_PROTO_HDR_IPV4_CHKSUM,
 	/* IPV6 */
 	VIRTCHNL_PROTO_HDR_IPV6_SRC =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6),
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v2 2/2] net/iavf: support IPv4/L4 checksum RSS offload
  2021-09-24  9:09 ` [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
@ 2021-09-24  9:09   ` Alvin Zhang
  2021-09-24  9:57   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  1 sibling, 0 replies; 8+ messages in thread
From: Alvin Zhang @ 2021-09-24  9:09 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang

Add supports for RSS_IPV4_CHKSUM & RSS_L4_CHKSUM RSS offload types
in RSS flow.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---

v2: rebase to dpdk-next-net-intel
---
 drivers/net/iavf/iavf_hash.c | 38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 03dae5d..01b8c08 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -342,23 +342,30 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 
 /* IPv4 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV4	(ETH_RSS_ETH | ETH_RSS_IPV4 | \
-					 ETH_RSS_FRAG_IPV4)
+					 ETH_RSS_FRAG_IPV4 | \
+					 ETH_RSS_IPV4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_UDP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_UDP)
+					 ETH_RSS_NONFRAG_IPV4_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_TCP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_TCP)
+					 ETH_RSS_NONFRAG_IPV4_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_SCTP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_SCTP)
+					 ETH_RSS_NONFRAG_IPV4_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* IPv6 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV6	(ETH_RSS_ETH | ETH_RSS_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_FRAG	(IAVF_RSS_TYPE_OUTER_IPV6 | \
 					 ETH_RSS_FRAG_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_UDP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_UDP)
+					 ETH_RSS_NONFRAG_IPV6_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_TCP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_TCP)
+					 ETH_RSS_NONFRAG_IPV6_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_SCTP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_SCTP)
+					 ETH_RSS_NONFRAG_IPV6_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* VLAN IPV4 */
 #define IAVF_RSS_TYPE_VLAN_IPV4		(IAVF_RSS_TYPE_OUTER_IPV4 | \
 					 ETH_RSS_S_VLAN | ETH_RSS_C_VLAN)
@@ -800,6 +807,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV4_FRAG:
 			if (rss_type &
@@ -812,6 +823,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV6:
 			if (rss_type &
@@ -863,6 +878,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, UDP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_TCP:
 			if (rss_type &
@@ -879,6 +897,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, TCP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_SCTP:
 			if (rss_type &
@@ -895,6 +916,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, SCTP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_S_VLAN:
 			if (!(rss_type & ETH_RSS_S_VLAN))
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum
  2021-09-24  9:09 ` [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  2021-09-24  9:09   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
@ 2021-09-24  9:57   ` Alvin Zhang
  2021-09-24  9:57     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
  2021-09-24 11:04     ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Zhang, Qi Z
  1 sibling, 2 replies; 8+ messages in thread
From: Alvin Zhang @ 2021-09-24  9:57 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang

Add IPv4 header checksum field selector, it can be used in creating
FDIR or RSS rules related to IPv4 header checksum.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---

v2: rebase to dpdk-next-net-intel
---
 drivers/common/iavf/virtchnl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 83f51d8..067f715 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -1571,6 +1571,7 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_IPV4_DSCP,
 	VIRTCHNL_PROTO_HDR_IPV4_TTL,
 	VIRTCHNL_PROTO_HDR_IPV4_PROT,
+	VIRTCHNL_PROTO_HDR_IPV4_CHKSUM,
 	/* IPV6 */
 	VIRTCHNL_PROTO_HDR_IPV6_SRC =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6),
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload
  2021-09-24  9:57   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
@ 2021-09-24  9:57     ` Alvin Zhang
  2021-09-24 10:57       ` Zhang, Qi Z
  2021-09-24 11:04     ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Zhang, Qi Z
  1 sibling, 1 reply; 8+ messages in thread
From: Alvin Zhang @ 2021-09-24  9:57 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang

Add supports for RSS_IPV4_CHKSUM & RSS_L4_CHKSUM RSS offload types
in RSS flow.

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---

v2: rebase to dpdk-next-net-intel
v3: add release note
---
 doc/guides/rel_notes/release_21_11.rst |  4 ++++
 drivers/net/iavf/iavf_hash.c           | 38 +++++++++++++++++++++++++++-------
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index eeb1e3d..dcff939 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -73,6 +73,10 @@ New Features
   * Implement support for tunnel offload.
   * Updated HWRM API to version 1.10.2.44
 
+* **Updated Intel iavf driver.**
+
+  * Added IPv4 and L4(TCP/UDP/SCTP) checksum hash support in RSS flow.
+
 * **Updated Intel ice driver.**
 
   * Added 1PPS out support by a devargs.
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 03dae5d..01b8c08 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -342,23 +342,30 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 
 /* IPv4 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV4	(ETH_RSS_ETH | ETH_RSS_IPV4 | \
-					 ETH_RSS_FRAG_IPV4)
+					 ETH_RSS_FRAG_IPV4 | \
+					 ETH_RSS_IPV4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_UDP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_UDP)
+					 ETH_RSS_NONFRAG_IPV4_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_TCP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_TCP)
+					 ETH_RSS_NONFRAG_IPV4_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV4_SCTP	(IAVF_RSS_TYPE_OUTER_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_SCTP)
+					 ETH_RSS_NONFRAG_IPV4_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* IPv6 outer */
 #define IAVF_RSS_TYPE_OUTER_IPV6	(ETH_RSS_ETH | ETH_RSS_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_FRAG	(IAVF_RSS_TYPE_OUTER_IPV6 | \
 					 ETH_RSS_FRAG_IPV6)
 #define IAVF_RSS_TYPE_OUTER_IPV6_UDP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_UDP)
+					 ETH_RSS_NONFRAG_IPV6_UDP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_TCP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_TCP)
+					 ETH_RSS_NONFRAG_IPV6_TCP | \
+					 ETH_RSS_L4_CHKSUM)
 #define IAVF_RSS_TYPE_OUTER_IPV6_SCTP	(IAVF_RSS_TYPE_OUTER_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_SCTP)
+					 ETH_RSS_NONFRAG_IPV6_SCTP | \
+					 ETH_RSS_L4_CHKSUM)
 /* VLAN IPV4 */
 #define IAVF_RSS_TYPE_VLAN_IPV4		(IAVF_RSS_TYPE_OUTER_IPV4 | \
 					 ETH_RSS_S_VLAN | ETH_RSS_C_VLAN)
@@ -800,6 +807,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV4_FRAG:
 			if (rss_type &
@@ -812,6 +823,10 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_IPV4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, IPV4_CHKSUM);
+
 			break;
 		case VIRTCHNL_PROTO_HDR_IPV6:
 			if (rss_type &
@@ -863,6 +878,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, UDP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_TCP:
 			if (rss_type &
@@ -879,6 +897,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, TCP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_SCTP:
 			if (rss_type &
@@ -895,6 +916,9 @@ struct virtchnl_proto_hdrs ipv4_ecpri_tmplt = {
 			} else {
 				hdr->field_selector = 0;
 			}
+
+			if (rss_type & ETH_RSS_L4_CHKSUM)
+				REFINE_PROTO_FLD(ADD, SCTP_CHKSUM);
 			break;
 		case VIRTCHNL_PROTO_HDR_S_VLAN:
 			if (!(rss_type & ETH_RSS_S_VLAN))
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload
  2021-09-24  9:57     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
@ 2021-09-24 10:57       ` Zhang, Qi Z
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang, Qi Z @ 2021-09-24 10:57 UTC (permalink / raw)
  To: Zhang, AlvinX; +Cc: dev



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Friday, September 24, 2021 5:57 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>
> Subject: [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload
> 
> Add supports for RSS_IPV4_CHKSUM & RSS_L4_CHKSUM RSS offload types in
> RSS flow.
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum
  2021-09-24  9:57   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
  2021-09-24  9:57     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
@ 2021-09-24 11:04     ` Zhang, Qi Z
  1 sibling, 0 replies; 8+ messages in thread
From: Zhang, Qi Z @ 2021-09-24 11:04 UTC (permalink / raw)
  To: Zhang, AlvinX; +Cc: dev



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Friday, September 24, 2021 5:57 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>
> Subject: [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4
> checksum
> 
> Add IPv4 header checksum field selector, it can be used in creating FDIR or RSS
> rules related to IPv4 header checksum.
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-24 11:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  6:53 [dpdk-dev] [PATCH 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
2021-09-09  6:53 ` [dpdk-dev] [PATCH 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
2021-09-24  9:09 ` [dpdk-dev] [PATCH v2 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
2021-09-24  9:09   ` [dpdk-dev] [PATCH v2 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
2021-09-24  9:57   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Alvin Zhang
2021-09-24  9:57     ` [dpdk-dev] [PATCH v3 2/2] net/iavf: support IPv4/L4 checksum RSS offload Alvin Zhang
2021-09-24 10:57       ` Zhang, Qi Z
2021-09-24 11:04     ` [dpdk-dev] [PATCH v3 1/2] common/iavf: enable hash calculation based on IPv4 checksum Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).