[dpdk-dev,v3] net/i40e: fix packet type parser issue
Checks
Commit Message
Ptype mapping table will fail to update when loading
PPP profile, fix the issue via modifying metadata and
adding check.
This patch also adds parser for IPV4FRAG and IPV6FRAG.
Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
v3 changes:
- Reorder IPv4 case.
v2 changes:
- Add parser for IPV4FRAG and IPV6FRAG.
drivers/net/i40e/i40e_ethdev.c | 46 ++++++++++++++++++++++++++---------------
drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
2 files changed, 33 insertions(+), 19 deletions(-)
Comments
> -----Original Message-----
> From: Xing, Beilei
> Sent: Monday, January 15, 2018 9:51 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH v3] net/i40e: fix packet type parser issue
>
> Ptype mapping table will fail to update when loading PPP profile, fix the issue
> via modifying metadata and adding check.
> This patch also adds parser for IPV4FRAG and IPV6FRAG.
>
> Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
> Cc: stable@dpdk.org
>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> Sent: Tuesday, January 16, 2018 7:56 AM
> To: Xing, Beilei
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser issue
>
>
>
> > -----Original Message-----
> > From: Xing, Beilei
> > Sent: Monday, January 15, 2018 9:51 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [PATCH v3] net/i40e: fix packet type parser issue
> >
> > Ptype mapping table will fail to update when loading PPP profile, fix
> > the issue via modifying metadata and adding check.
> > This patch also adds parser for IPV4FRAG and IPV6FRAG.
> >
> > Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied into dpdk-next-net-intel, with minor commit log corrections. Thanks!
/Helin
This patchset is mainly for fixing fail to update SW ptype
table and adding parser for IPV4FRAG and IPV6FRAG.
v4 changes:
- Slipt patchset and replace strncmp with strncasecmp.
v3 changes:
- Reorder IPv4 case.
v2 changes:
- Add parser for IPV4FRAG and IPV6FRAG.
Beilei Xing (3):
net/i40e: fix fail to update ptype table
net/i40e: add parser for IPV4FRAG and IPV6FRAG
net/i40e: replace strncmp with strncasecmp
drivers/net/i40e/i40e_ethdev.c | 83 +++++++++++++++++++++++++----------------
drivers/net/i40e/rte_pmd_i40e.c | 6 ++-
2 files changed, 54 insertions(+), 35 deletions(-)
> -----Original Message-----
> From: Zhang, Helin
> Sent: Wednesday, January 17, 2018 10:57 PM
> To: Zhang, Qi Z; Xing, Beilei
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v3] net/i40e: fix packet type parser issue
>
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> > Sent: Tuesday, January 16, 2018 7:56 AM
> > To: Xing, Beilei
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser
> > issue
> >
> >
> >
> > > -----Original Message-----
> > > From: Xing, Beilei
> > > Sent: Monday, January 15, 2018 9:51 PM
> > > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > > Cc: dev@dpdk.org; stable@dpdk.org
> > > Subject: [PATCH v3] net/i40e: fix packet type parser issue
> > >
> > > Ptype mapping table will fail to update when loading PPP profile,
> > > fix the issue via modifying metadata and adding check.
> > > This patch also adds parser for IPV4FRAG and IPV6FRAG.
> > >
> > > Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> >
> > Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> Applied into dpdk-next-net-intel, with minor commit log corrections. Thanks!
Removed from dpdk-next-net-intel, as new version was sent. Thanks!
/Helin
>
> /Helin
> -----Original Message-----
> From: Xing, Beilei
> Sent: Friday, January 19, 2018 3:50 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Chilikin, Andrey <andrey.chilikin@intel.com>
> Subject: [PATCH v4 0/3] net/i40e: change for ptype parser
>
> This patchset is mainly for fixing fail to update SW ptype table and adding
> parser for IPV4FRAG and IPV6FRAG.
>
> v4 changes:
> - Slipt patchset and replace strncmp with strncasecmp.
> v3 changes:
> - Reorder IPv4 case.
> v2 changes:
> - Add parser for IPV4FRAG and IPV6FRAG.
>
> Beilei Xing (3):
> net/i40e: fix fail to update ptype table
> net/i40e: add parser for IPV4FRAG and IPV6FRAG
> net/i40e: replace strncmp with strncasecmp
>
> drivers/net/i40e/i40e_ethdev.c | 83
> +++++++++++++++++++++++++----------------
> drivers/net/i40e/rte_pmd_i40e.c | 6 ++-
> 2 files changed, 54 insertions(+), 35 deletions(-)
>
> --
> 2.5.5
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> Sent: Saturday, January 20, 2018 9:19 PM
> To: Xing, Beilei
> Cc: dev@dpdk.org; Chilikin, Andrey
> Subject: Re: [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser
>
>
>
> > -----Original Message-----
> > From: Xing, Beilei
> > Sent: Friday, January 19, 2018 3:50 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Chilikin, Andrey <andrey.chilikin@intel.com>
> > Subject: [PATCH v4 0/3] net/i40e: change for ptype parser
> >
> > This patchset is mainly for fixing fail to update SW ptype table and
> > adding parser for IPV4FRAG and IPV6FRAG.
> >
> > v4 changes:
> > - Slipt patchset and replace strncmp with strncasecmp.
> > v3 changes:
> > - Reorder IPv4 case.
> > v2 changes:
> > - Add parser for IPV4FRAG and IPV6FRAG.
> >
> > Beilei Xing (3):
> > net/i40e: fix fail to update ptype table
> > net/i40e: add parser for IPV4FRAG and IPV6FRAG
> > net/i40e: replace strncmp with strncasecmp
> >
> > drivers/net/i40e/i40e_ethdev.c | 83
> > +++++++++++++++++++++++++----------------
> > drivers/net/i40e/rte_pmd_i40e.c | 6 ++-
> > 2 files changed, 54 insertions(+), 35 deletions(-)
> >
> > --
> > 2.5.5
>
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied the series into dpdk-next-net-intel, thanks!
/Helin
@@ -11323,43 +11323,55 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
continue;
memset(name, 0, sizeof(name));
strcpy(name, proto[n].name);
- if (!strncmp(name, "PPPOE", 5))
+ if (!strncmp(name, "PPPoE", 5))
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_L2_ETHER_PPPOE;
- else if (!strncmp(name, "OIPV4", 5)) {
+ else if (!strncmp(name, "IPV4FRAG", 8) &&
+ !in_tunnel) {
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- in_tunnel = true;
- } else if (!strncmp(name, "IPV4", 4) &&
- !in_tunnel)
ptype_mapping[i].sw_ptype |=
- RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (!strncmp(name, "IPV4FRAG", 8) &&
- in_tunnel) {
+ RTE_PTYPE_L4_FRAG;
+ } else if (!strncmp(name, "IPV4FRAG", 8) &&
+ in_tunnel) {
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, "OIPV4", 5)) {
+ ptype_mapping[i].sw_ptype |=
+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
+ in_tunnel = true;
} else if (!strncmp(name, "IPV4", 4) &&
- in_tunnel)
+ !in_tunnel)
+ ptype_mapping[i].sw_ptype |=
+ RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
+ else if (!strncmp(name, "IPV4", 4) &&
+ in_tunnel)
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
- else if (!strncmp(name, "OIPV6", 5)) {
+ else if (!strncmp(name, "IPV6FRAG", 8) &&
+ !in_tunnel) {
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
- in_tunnel = true;
- } else if (!strncmp(name, "IPV6", 4) &&
- !in_tunnel)
ptype_mapping[i].sw_ptype |=
- RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
- else if (!strncmp(name, "IPV6FRAG", 8) &&
- in_tunnel) {
+ RTE_PTYPE_L4_FRAG;
+ } else if (!strncmp(name, "IPV6FRAG", 8) &&
+ in_tunnel) {
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, "OIPV6", 5)) {
+ ptype_mapping[i].sw_ptype |=
+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
+ in_tunnel = true;
} else if (!strncmp(name, "IPV6", 4) &&
- in_tunnel)
+ !in_tunnel)
+ ptype_mapping[i].sw_ptype |=
+ RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
+ else if (!strncmp(name, "IPV6", 4) &&
+ in_tunnel)
ptype_mapping[i].sw_ptype |=
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN;
else if (!strncmp(name, "UDP", 3) && !in_tunnel)
@@ -2053,7 +2053,8 @@ static int check_invalid_pkt_type(uint32_t pkt_type)
l2 != RTE_PTYPE_L2_ETHER_LLDP &&
l2 != RTE_PTYPE_L2_ETHER_NSH &&
l2 != RTE_PTYPE_L2_ETHER_VLAN &&
- l2 != RTE_PTYPE_L2_ETHER_QINQ)
+ l2 != RTE_PTYPE_L2_ETHER_QINQ &&
+ l2 != RTE_PTYPE_L2_ETHER_PPPOE)
return -1;
if (l3 &&
@@ -2082,7 +2083,8 @@ static int check_invalid_pkt_type(uint32_t pkt_type)
tnl != RTE_PTYPE_TUNNEL_GENEVE &&
tnl != RTE_PTYPE_TUNNEL_GRENAT &&
tnl != RTE_PTYPE_TUNNEL_GTPC &&
- tnl != RTE_PTYPE_TUNNEL_GTPU)
+ tnl != RTE_PTYPE_TUNNEL_GTPU &&
+ tnl != RTE_PTYPE_TUNNEL_L2TP)
return -1;
if (il2 &&