patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/mlx: fix IPv4 and IPv6 packet type
@ 2017-01-11 16:44 Olivier Matz
  2017-01-16 14:03 ` Adrien Mazarguil
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Matz @ 2017-01-11 16:44 UTC (permalink / raw)
  To: dev, adrien.mazarguil
  Cc: Matthieu Ternisien d'Ouville, stable, Samuel Gauthier

From: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>

Mellanox PMDs do not differentiate IP header with or without options, so
the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
which explicitly means "does not contain any header option".

Change the driver to set
RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
received.

Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type")
Fixes: 67fa62bc672d ("mlx5: support checksum offload")

CC: stable@dpdk.org
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 drivers/net/mlx4/mlx4.c      | 18 ++++++++++++------
 drivers/net/mlx5/mlx5_rxtx.c | 12 ++++++------
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 941176c..79efaaa 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -2961,19 +2961,25 @@ rxq_cq_to_pkt_type(uint32_t flags)
 	if (flags & IBV_EXP_CQ_RX_TUNNEL_PACKET)
 		pkt_type =
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_OUTER_IPV4_PACKET, RTE_PTYPE_L3_IPV4) |
+				  IBV_EXP_CQ_RX_OUTER_IPV4_PACKET,
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_OUTER_IPV6_PACKET, RTE_PTYPE_L3_IPV6) |
+				  IBV_EXP_CQ_RX_OUTER_IPV6_PACKET,
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV4_PACKET, RTE_PTYPE_INNER_L3_IPV4) |
+				  IBV_EXP_CQ_RX_IPV4_PACKET,
+				  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_INNER_L3_IPV6);
+				  IBV_EXP_CQ_RX_IPV6_PACKET,
+				  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN);
 	else
 		pkt_type =
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV4_PACKET, RTE_PTYPE_L3_IPV4) |
+				  IBV_EXP_CQ_RX_IPV4_PACKET,
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
-			          IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_L3_IPV6);
+				  IBV_EXP_CQ_RX_IPV6_PACKET,
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN);
 	return pkt_type;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index e0ee2f2..9415720 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1112,24 +1112,24 @@ rxq_cq_to_pkt_type(volatile struct mlx5_cqe *cqe)
 		pkt_type =
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_OUTER_IPV4_PACKET,
-				  RTE_PTYPE_L3_IPV4) |
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_OUTER_IPV6_PACKET,
-				  RTE_PTYPE_L3_IPV6) |
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_IPV4_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV4) |
+				  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_RX_IPV6_PACKET,
-				  RTE_PTYPE_INNER_L3_IPV6);
+				  RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN);
 	else
 		pkt_type =
 			TRANSPOSE(flags,
 				  MLX5_CQE_L3_HDR_TYPE_IPV6,
-				  RTE_PTYPE_L3_IPV6) |
+				  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN) |
 			TRANSPOSE(flags,
 				  MLX5_CQE_L3_HDR_TYPE_IPV4,
-				  RTE_PTYPE_L3_IPV4);
+				  RTE_PTYPE_L3_IPV4_EXT_UNKNOWN);
 	return pkt_type;
 }
 
-- 
2.8.1

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

* Re: [dpdk-stable] [PATCH] net/mlx: fix IPv4 and IPv6 packet type
  2017-01-11 16:44 [dpdk-stable] [PATCH] net/mlx: fix IPv4 and IPv6 packet type Olivier Matz
@ 2017-01-16 14:03 ` Adrien Mazarguil
  2017-01-16 20:03   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Adrien Mazarguil @ 2017-01-16 14:03 UTC (permalink / raw)
  To: Olivier Matz
  Cc: dev, Matthieu Ternisien d'Ouville, stable, Samuel Gauthier

On Wed, Jan 11, 2017 at 05:44:33PM +0100, Olivier Matz wrote:
> From: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
> 
> Mellanox PMDs do not differentiate IP header with or without options, so
> the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
> which explicitly means "does not contain any header option".
> 
> Change the driver to set
> RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
> RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
> received.
> 
> Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type")
> Fixes: 67fa62bc672d ("mlx5: support checksum offload")
> 
> CC: stable@dpdk.org
> Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
> Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
>  drivers/net/mlx4/mlx4.c      | 18 ++++++++++++------
>  drivers/net/mlx5/mlx5_rxtx.c | 12 ++++++------
>  2 files changed, 18 insertions(+), 12 deletions(-)

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-stable] [PATCH] net/mlx: fix IPv4 and IPv6 packet type
  2017-01-16 14:03 ` Adrien Mazarguil
@ 2017-01-16 20:03   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-01-16 20:03 UTC (permalink / raw)
  To: Adrien Mazarguil, Olivier Matz
  Cc: dev, Matthieu Ternisien d'Ouville, stable, Samuel Gauthier

On 1/16/2017 2:03 PM, Adrien Mazarguil wrote:
> On Wed, Jan 11, 2017 at 05:44:33PM +0100, Olivier Matz wrote:
>> From: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
>>
>> Mellanox PMDs do not differentiate IP header with or without options, so
>> the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
>> which explicitly means "does not contain any header option".
>>
>> Change the driver to set
>> RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
>> RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
>> received.
>>
>> Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type")
>> Fixes: 67fa62bc672d ("mlx5: support checksum offload")
>>
>> CC: stable@dpdk.org
>> Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
>> Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>> ---
>>  drivers/net/mlx4/mlx4.c      | 18 ++++++++++++------
>>  drivers/net/mlx5/mlx5_rxtx.c | 12 ++++++------
>>  2 files changed, 18 insertions(+), 12 deletions(-)
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2017-01-16 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 16:44 [dpdk-stable] [PATCH] net/mlx: fix IPv4 and IPv6 packet type Olivier Matz
2017-01-16 14:03 ` Adrien Mazarguil
2017-01-16 20:03   ` Ferruh Yigit

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