net/i40e: update parsing inner packet info
authorBeilei Xing <beilei.xing@intel.com>
Fri, 20 Oct 2017 03:23:15 +0000 (11:23 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000 (02:33 +0200)
Since meta data in profile is updated, parsing inner
packet information needs to be updated, too.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/i40e_ethdev.c

index e809613..48db2dd 100644 (file)
@@ -11131,30 +11131,32 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
                                        ptype_mapping[i].sw_ptype |=
                                                RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
                                        inner_ip = true;
-                               } else if (!strncmp(name, "IPV4", 4) &&
+                               } else if (!strncmp(name, "IPV4FRAG", 8) &&
                                           inner_ip) {
                                        ptype_mapping[i].sw_ptype |=
                                            RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
-                               } else if (!strncmp(name, "IPV6", 4) &&
-                                          !inner_ip) {
+                                       ptype_mapping[i].sw_ptype |=
+                                               RTE_PTYPE_INNER_L4_FRAG;
+                               } else if (!strncmp(name, "IPV4", 4) &&
+                                          inner_ip)
+                                       ptype_mapping[i].sw_ptype |=
+                                           RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
+                               else if (!strncmp(name, "IPV6", 4) &&
+                                        !inner_ip) {
                                        ptype_mapping[i].sw_ptype |=
                                                RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
                                        inner_ip = true;
-                               } else if (!strncmp(name, "IPV6", 4) &&
+                               } else if (!strncmp(name, "IPV6FRAG", 8) &&
                                           inner_ip) {
                                        ptype_mapping[i].sw_ptype |=
                                            RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN;
-                               } else if (!strncmp(name, "IPV4FRAG", 8)) {
-                                       ptype_mapping[i].sw_ptype |=
-                                           RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
                                        ptype_mapping[i].sw_ptype |=
                                                RTE_PTYPE_INNER_L4_FRAG;
-                               } else if (!strncmp(name, "IPV6FRAG", 8)) {
+                               } else if (!strncmp(name, "IPV6", 4) &&
+                                          inner_ip)
                                        ptype_mapping[i].sw_ptype |=
                                            RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN;
-                                       ptype_mapping[i].sw_ptype |=
-                                               RTE_PTYPE_INNER_L4_FRAG;
-                               } else if (!strncmp(name, "GTPC", 4))
+                               else if (!strncmp(name, "GTPC", 4))
                                        ptype_mapping[i].sw_ptype |=
                                                RTE_PTYPE_TUNNEL_GTPC;
                                else if (!strncmp(name, "GTPU", 4))