DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/i40e: fix packet type parser issue
@ 2018-01-11 10:03 Beilei Xing
  2018-01-12  8:41 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  0 siblings, 1 reply; 14+ messages in thread
From: Beilei Xing @ 2018-01-11 10:03 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, stable

Ptype mapping table will fail to update when loading
PPP profile, fix the issue via modifying metadata and
adding check.

Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c  | 2 +-
 drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a8e9ab2..b5ab036 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11254,7 +11254,7 @@ 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)) {
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 55ae2fe..af33a7c 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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 &&
-- 
2.5.5

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

* [dpdk-dev] [PATCH v2] net/i40e: fix packet type parser issue
  2018-01-11 10:03 [dpdk-dev] [PATCH v1] net/i40e: fix packet type parser issue Beilei Xing
@ 2018-01-12  8:41 ` Beilei Xing
  2018-01-14  4:02   ` Zhang, Qi Z
  2018-01-15 13:51   ` [dpdk-dev] [PATCH v3] " Beilei Xing
  0 siblings, 2 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-12  8:41 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, stable

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>
---

v2 changes:
 - Add parser for IPV4FRAG and IPV6FRAG.

 drivers/net/i40e/i40e_ethdev.c  | 44 ++++++++++++++++++++++++++---------------
 drivers/net/i40e/rte_pmd_i40e.c |  6 ++++--
 2 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d80671a..69704e3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11283,43 +11283,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, "IPV4", 4) &&
+					   !in_tunnel)
+					ptype_mapping[i].sw_ptype |=
+						RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
+				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)
 					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)
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 55ae2fe..af33a7c 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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 &&
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix packet type parser issue
  2018-01-12  8:41 ` [dpdk-dev] [PATCH v2] " Beilei Xing
@ 2018-01-14  4:02   ` Zhang, Qi Z
  2018-01-15  7:26     ` Xing, Beilei
  2018-01-15 13:51   ` [dpdk-dev] [PATCH v3] " Beilei Xing
  1 sibling, 1 reply; 14+ messages in thread
From: Zhang, Qi Z @ 2018-01-14  4:02 UTC (permalink / raw)
  To: Xing, Beilei; +Cc: dev, stable



> -----Original Message-----
> From: Xing, Beilei
> Sent: Friday, January 12, 2018 4:42 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH v2] 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>
> ---
> 
> v2 changes:
>  - Add parser for IPV4FRAG and IPV6FRAG.
> 
>  drivers/net/i40e/i40e_ethdev.c  | 44
> ++++++++++++++++++++++++++---------------
>  drivers/net/i40e/rte_pmd_i40e.c |  6 ++++--
>  2 files changed, 32 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index d80671a..69704e3 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -11283,43 +11283,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, "IPV4", 4) &&
> +					   !in_tunnel)
> +					ptype_mapping[i].sw_ptype |=
> +						RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> +				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)
Since you are doing some reordering here, it's better to move IPV4 && in_tunnel case above OIPV4, to match IPV4 && !in_tunnel case.

Regards
Qi

>  					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) diff --git
> a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c index
> 55ae2fe..af33a7c 100644
> --- a/drivers/net/i40e/rte_pmd_i40e.c
> +++ b/drivers/net/i40e/rte_pmd_i40e.c
> @@ -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 &&
> --
> 2.5.5

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

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix packet type parser issue
  2018-01-14  4:02   ` Zhang, Qi Z
@ 2018-01-15  7:26     ` Xing, Beilei
  0 siblings, 0 replies; 14+ messages in thread
From: Xing, Beilei @ 2018-01-15  7:26 UTC (permalink / raw)
  To: Zhang, Qi Z; +Cc: dev, stable



> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Sunday, January 14, 2018 12:02 PM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/i40e: fix packet type parser issue
> 
> 
> 
> > -----Original Message-----
> > From: Xing, Beilei
> > Sent: Friday, January 12, 2018 4:42 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [PATCH v2] 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>
> > ---
> >
> > v2 changes:
> >  - Add parser for IPV4FRAG and IPV6FRAG.
> >
> >  drivers/net/i40e/i40e_ethdev.c  | 44
> > ++++++++++++++++++++++++++---------------
> >  drivers/net/i40e/rte_pmd_i40e.c |  6 ++++--
> >  2 files changed, 32 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index d80671a..69704e3 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -11283,43 +11283,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, "IPV4", 4) &&
> > +					   !in_tunnel)
> > +					ptype_mapping[i].sw_ptype |=
> > +
> 	RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> > +				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)
> Since you are doing some reordering here, it's better to move IPV4 &&
> in_tunnel case above OIPV4, to match IPV4 && !in_tunnel case.

OK, will update in next version, thanks.

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

* [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser issue
  2018-01-12  8:41 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  2018-01-14  4:02   ` Zhang, Qi Z
@ 2018-01-15 13:51   ` Beilei Xing
  2018-01-15 23:55     ` Zhang, Qi Z
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
  1 sibling, 2 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-15 13:51 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, stable

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(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7796e9e..0503645 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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)
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 2cb22d4..5436db4 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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 &&
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser issue
  2018-01-15 13:51   ` [dpdk-dev] [PATCH v3] " Beilei Xing
@ 2018-01-15 23:55     ` Zhang, Qi Z
  2018-01-17 14:56       ` Zhang, Helin
  2018-01-20  9:45       ` Zhang, Helin
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
  1 sibling, 2 replies; 14+ messages in thread
From: Zhang, Qi Z @ 2018-01-15 23:55 UTC (permalink / raw)
  To: Xing, Beilei; +Cc: dev, stable



> -----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>

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser issue
  2018-01-15 23:55     ` Zhang, Qi Z
@ 2018-01-17 14:56       ` Zhang, Helin
  2018-01-20  9:45       ` Zhang, Helin
  1 sibling, 0 replies; 14+ messages in thread
From: Zhang, Helin @ 2018-01-17 14:56 UTC (permalink / raw)
  To: Zhang, Qi Z, Xing, Beilei; +Cc: dev, stable



> -----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

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

* [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser
  2018-01-15 13:51   ` [dpdk-dev] [PATCH v3] " Beilei Xing
  2018-01-15 23:55     ` Zhang, Qi Z
@ 2018-01-19  7:50     ` Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: fix fail to update ptype table Beilei Xing
                         ` (3 more replies)
  1 sibling, 4 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-19  7:50 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, andrey.chilikin

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

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

* [dpdk-dev] [PATCH v4 1/3] net/i40e: fix fail to update ptype table
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
@ 2018-01-19  7:50       ` Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 2/3] net/i40e: add parser for IPV4FRAG and IPV6FRAG Beilei Xing
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-19  7:50 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, andrey.chilikin, stable

Fail to update SW ptype mapping table when loading
PPP profile, though profile can be loaded successfully.
It will cause fail to parse SW ptype during receiving
packets. This patch fixes this issue.

Fixes: 11556c915a08 ("net/i40e: improve packet type parser")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 2cb22d4..5436db4 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -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 &&
-- 
2.5.5

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

* [dpdk-dev] [PATCH v4 2/3] net/i40e: add parser for IPV4FRAG and IPV6FRAG
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: fix fail to update ptype table Beilei Xing
@ 2018-01-19  7:50       ` Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 3/3] net/i40e: replace strncmp with strncasecmp Beilei Xing
  2018-01-20 13:18       ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Zhang, Qi Z
  3 siblings, 0 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-19  7:50 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, andrey.chilikin

There're new metadata IPV4FRAG and IPV6FRAG in PPP
profile, this patch improves ptype parser to support
IPV4FRAG and IPV6FRAG.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 44 +++++++++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 9626c6a..b197c53 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11329,40 +11329,52 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
 				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)
-- 
2.5.5

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

* [dpdk-dev] [PATCH v4 3/3] net/i40e: replace strncmp with strncasecmp
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: fix fail to update ptype table Beilei Xing
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 2/3] net/i40e: add parser for IPV4FRAG and IPV6FRAG Beilei Xing
@ 2018-01-19  7:50       ` Beilei Xing
  2018-01-20 13:18       ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Zhang, Qi Z
  3 siblings, 0 replies; 14+ messages in thread
From: Beilei Xing @ 2018-01-19  7:50 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, andrey.chilikin

Replace strncmp with strncasecmp in i40e_update_customized_ptype
function for compatibility.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 55 +++++++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 25 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b197c53..a0f0d92 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11326,99 +11326,104 @@ 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 (!strncasecmp(name, "PPPOE", 5))
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L2_ETHER_PPPOE;
-				else if (!strncmp(name, "IPV4FRAG", 8) &&
+				else if (!strncasecmp(name, "IPV4FRAG", 8) &&
 					 !in_tunnel) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_FRAG;
-				} else if (!strncmp(name, "IPV4FRAG", 8) &&
+				} else if (!strncasecmp(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)) {
+				} else if (!strncasecmp(name, "OIPV4", 5)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
 					in_tunnel = true;
-				} else if (!strncmp(name, "IPV4", 4) &&
+				} else if (!strncasecmp(name, "IPV4", 4) &&
 					   !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
-				else if (!strncmp(name, "IPV4", 4) &&
+				else if (!strncasecmp(name, "IPV4", 4) &&
 					 in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 					    RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
-				else if (!strncmp(name, "IPV6FRAG", 8) &&
+				else if (!strncasecmp(name, "IPV6FRAG", 8) &&
 					 !in_tunnel) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_FRAG;
-				} else if (!strncmp(name, "IPV6FRAG", 8) &&
+				} else if (!strncasecmp(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)) {
+				} else if (!strncasecmp(name, "OIPV6", 5)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
 					in_tunnel = true;
-				} else if (!strncmp(name, "IPV6", 4) &&
+				} else if (!strncasecmp(name, "IPV6", 4) &&
 					   !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
-				else if (!strncmp(name, "IPV6", 4) &&
+				else if (!strncasecmp(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)
+				else if (!strncasecmp(name, "UDP", 3) &&
+					 !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_UDP;
-				else if (!strncmp(name, "UDP", 3) && in_tunnel)
+				else if (!strncasecmp(name, "UDP", 3) &&
+					 in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_INNER_L4_UDP;
-				else if (!strncmp(name, "TCP", 3) && !in_tunnel)
+				else if (!strncasecmp(name, "TCP", 3) &&
+					 !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_TCP;
-				else if (!strncmp(name, "TCP", 3) && in_tunnel)
+				else if (!strncasecmp(name, "TCP", 3) &&
+					 in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_INNER_L4_TCP;
-				else if (!strncmp(name, "SCTP", 4) &&
+				else if (!strncasecmp(name, "SCTP", 4) &&
 					 !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_SCTP;
-				else if (!strncmp(name, "SCTP", 4) && in_tunnel)
+				else if (!strncasecmp(name, "SCTP", 4) &&
+					 in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_INNER_L4_SCTP;
-				else if ((!strncmp(name, "ICMP", 4) ||
-					  !strncmp(name, "ICMPV6", 6)) &&
+				else if ((!strncasecmp(name, "ICMP", 4) ||
+					  !strncasecmp(name, "ICMPV6", 6)) &&
 					 !in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_L4_ICMP;
-				else if ((!strncmp(name, "ICMP", 4) ||
-					  !strncmp(name, "ICMPV6", 6)) &&
+				else if ((!strncasecmp(name, "ICMP", 4) ||
+					  !strncasecmp(name, "ICMPV6", 6)) &&
 					 in_tunnel)
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_INNER_L4_ICMP;
-				else if (!strncmp(name, "GTPC", 4)) {
+				else if (!strncasecmp(name, "GTPC", 4)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_GTPC;
 					in_tunnel = true;
-				} else if (!strncmp(name, "GTPU", 4)) {
+				} else if (!strncasecmp(name, "GTPU", 4)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_GTPU;
 					in_tunnel = true;
-				} else if (!strncmp(name, "GRENAT", 6)) {
+				} else if (!strncasecmp(name, "GRENAT", 6)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_GRENAT;
 					in_tunnel = true;
-				} else if (!strncmp(name, "L2TPv2CTL", 9)) {
+				} else if (!strncasecmp(name, "L2TPV2CTL", 9)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_L2TP;
 					in_tunnel = true;
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v3] net/i40e: fix packet type parser issue
  2018-01-15 23:55     ` Zhang, Qi Z
  2018-01-17 14:56       ` Zhang, Helin
@ 2018-01-20  9:45       ` Zhang, Helin
  1 sibling, 0 replies; 14+ messages in thread
From: Zhang, Helin @ 2018-01-20  9:45 UTC (permalink / raw)
  To: Zhang, Qi Z, Xing, Beilei; +Cc: dev, stable



> -----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

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

* Re: [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser
  2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
                         ` (2 preceding siblings ...)
  2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 3/3] net/i40e: replace strncmp with strncasecmp Beilei Xing
@ 2018-01-20 13:18       ` Zhang, Qi Z
  2018-01-20 13:32         ` Zhang, Helin
  3 siblings, 1 reply; 14+ messages in thread
From: Zhang, Qi Z @ 2018-01-20 13:18 UTC (permalink / raw)
  To: Xing, Beilei; +Cc: dev, Chilikin, Andrey



> -----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>	

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

* Re: [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser
  2018-01-20 13:18       ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Zhang, Qi Z
@ 2018-01-20 13:32         ` Zhang, Helin
  0 siblings, 0 replies; 14+ messages in thread
From: Zhang, Helin @ 2018-01-20 13:32 UTC (permalink / raw)
  To: Zhang, Qi Z, Xing, Beilei; +Cc: dev, Yigit, Ferruh



> -----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

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

end of thread, other threads:[~2018-01-20 13:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11 10:03 [dpdk-dev] [PATCH v1] net/i40e: fix packet type parser issue Beilei Xing
2018-01-12  8:41 ` [dpdk-dev] [PATCH v2] " Beilei Xing
2018-01-14  4:02   ` Zhang, Qi Z
2018-01-15  7:26     ` Xing, Beilei
2018-01-15 13:51   ` [dpdk-dev] [PATCH v3] " Beilei Xing
2018-01-15 23:55     ` Zhang, Qi Z
2018-01-17 14:56       ` Zhang, Helin
2018-01-20  9:45       ` Zhang, Helin
2018-01-19  7:50     ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Beilei Xing
2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 1/3] net/i40e: fix fail to update ptype table Beilei Xing
2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 2/3] net/i40e: add parser for IPV4FRAG and IPV6FRAG Beilei Xing
2018-01-19  7:50       ` [dpdk-dev] [PATCH v4 3/3] net/i40e: replace strncmp with strncasecmp Beilei Xing
2018-01-20 13:18       ` [dpdk-dev] [PATCH v4 0/3] net/i40e: change for ptype parser Zhang, Qi Z
2018-01-20 13:32         ` Zhang, Helin

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).