common/iavf: fix order of protocol header types
authorTing Xu <ting.xu@intel.com>
Sun, 25 Apr 2021 06:53:04 +0000 (14:53 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 30 Apr 2021 13:11:13 +0000 (15:11 +0200)
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.

Fixes: e6a42fd9158b ("common/iavf: add protocol header for IP fragment")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/common/iavf/README
drivers/common/iavf/virtchnl.h

index 24e3fde..611fdce 100644 (file)
@@ -6,7 +6,7 @@ IntelĀ® IAVF driver
 =================
 
 This directory contains source code of FreeBSD IAVF driver of version
-cid-avf.2021.01.12.tar.gz released by the team which develops
+cid-avf.2021.04.29.tar.gz released by the team which develops
 basic drivers for any IAVF NIC. The directory of base/ contains the
 original source package.
 
index 09d4c86..3a60faf 100644 (file)
@@ -1481,9 +1481,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,
@@ -1500,6 +1498,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. */
@@ -1522,8 +1526,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),
@@ -1544,9 +1546,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),
@@ -1589,6 +1588,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 {