DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] common/iavf: fix wrong order of protocol header types
@ 2021-04-25  6:53 Ting Xu
  2021-04-29  0:49 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Ting Xu @ 2021-04-25  6:53 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, jingjing.wu, qi.z.zhang, Ting Xu, stable

The new virtchnl protocol header types for IPv4 and IPv6 fragment are
not added in order, which will break ABI. Move them to the end of the
list.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Fixes: e6a42fd9158b ("common/iavf: add protocol header for IP fragment")
Cc: stable@dpdk.org
---
 drivers/common/iavf/virtchnl.h | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 139569787f..42ea91a6b0 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -1415,9 +1415,7 @@ enum virtchnl_proto_hdr_type {
 	VIRTCHNL_PROTO_HDR_S_VLAN,
 	VIRTCHNL_PROTO_HDR_C_VLAN,
 	VIRTCHNL_PROTO_HDR_IPV4,
-	VIRTCHNL_PROTO_HDR_IPV4_FRAG,
 	VIRTCHNL_PROTO_HDR_IPV6,
-	VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG,
 	VIRTCHNL_PROTO_HDR_TCP,
 	VIRTCHNL_PROTO_HDR_UDP,
 	VIRTCHNL_PROTO_HDR_SCTP,
@@ -1434,6 +1432,12 @@ enum virtchnl_proto_hdr_type {
 	VIRTCHNL_PROTO_HDR_ECPRI,
 	VIRTCHNL_PROTO_HDR_L2TPV2,
 	VIRTCHNL_PROTO_HDR_PPP,
+	/* IPv4 and IPv6 Fragment header types are only associated to
+	 * VIRTCHNL_PROTO_HDR_IPV4 and VIRTCHNL_PROTO_HDR_IPV6 respectively,
+	 * cannot be used independently.
+	 */
+	VIRTCHNL_PROTO_HDR_IPV4_FRAG,
+	VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG,
 };
 
 /* Protocol header field within a protocol header. */
@@ -1456,8 +1460,6 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_IPV4_DSCP,
 	VIRTCHNL_PROTO_HDR_IPV4_TTL,
 	VIRTCHNL_PROTO_HDR_IPV4_PROT,
-	VIRTCHNL_PROTO_HDR_IPV4_FRAG_PKID =
-		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV4_FRAG),
 	/* IPV6 */
 	VIRTCHNL_PROTO_HDR_IPV6_SRC =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6),
@@ -1478,9 +1480,6 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_IPV6_PREFIX64_DST,
 	VIRTCHNL_PROTO_HDR_IPV6_PREFIX96_SRC,
 	VIRTCHNL_PROTO_HDR_IPV6_PREFIX96_DST,
-	/* IPv6 Extension Header Fragment */
-	VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG_PKID =
-		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG),
 	/* TCP */
 	VIRTCHNL_PROTO_HDR_TCP_SRC_PORT =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_TCP),
@@ -1523,6 +1522,12 @@ enum virtchnl_proto_hdr_field {
 	VIRTCHNL_PROTO_HDR_ECPRI_MSG_TYPE =
 		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_ECPRI),
 	VIRTCHNL_PROTO_HDR_ECPRI_PC_RTC_ID,
+	/* IPv4 Dummy Fragment */
+	VIRTCHNL_PROTO_HDR_IPV4_FRAG_PKID =
+		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV4_FRAG),
+	/* IPv6 Extension Fragment */
+	VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG_PKID =
+		PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_IPV6_EH_FRAG),
 };
 
 struct virtchnl_proto_hdr {
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH v2] common/iavf: fix wrong order of protocol header types
  2021-04-25  6:53 [dpdk-dev] [PATCH v2] common/iavf: fix wrong order of protocol header types Ting Xu
@ 2021-04-29  0:49 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-04-29  0:49 UTC (permalink / raw)
  To: Xu, Ting, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable



> -----Original Message-----
> From: Xu, Ting <ting.xu@intel.com>
> Sent: Sunday, April 25, 2021 2:53 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Xu, Ting <ting.xu@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] common/iavf: fix wrong order of protocol header types
> 
> The new virtchnl protocol header types for IPv4 and IPv6 fragment are not
> added in order, which will break ABI. Move them to the end of the list.
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>

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

Applied to dpdk-next-net-intel after update the base code release date in README as this is the last iavf base code update for DPDK 21.05.

Thanks
Qi

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

end of thread, other threads:[~2021-04-29  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25  6:53 [dpdk-dev] [PATCH v2] common/iavf: fix wrong order of protocol header types Ting Xu
2021-04-29  0:49 ` 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).