All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion
@ 2017-03-23 12:42 Shahaf Shuler
  2017-03-24  8:25 ` Nélio Laranjeiro
  0 siblings, 1 reply; 4+ messages in thread
From: Shahaf Shuler @ 2017-03-23 12:42 UTC (permalink / raw)
  To: nelio.laranjeiro, adrien.mazarguil; +Cc: dev, stable

When VLAN insertion is requested the vlan size must be added to the
calculation of the TSO header size, as it is not embedded within the
mbuf l2 length.

Fixes: 98083fd482a2 ("net/mlx5: add hardware TSO support")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 823aac8..9e8c6d0 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -548,10 +548,11 @@
 							buf->ol_flags &
 							(PKT_TX_TUNNEL_GRE |
 							 PKT_TX_TUNNEL_VXLAN);
+				uint8_t vlan_sz = (buf->ol_flags &
+						  PKT_TX_VLAN_PKT) ? 4 : 0;
 
-				tso_header_sz = buf->l2_len + buf->l3_len +
-						buf->l4_len;
-
+				tso_header_sz = buf->l2_len + vlan_sz +
+						buf->l3_len + buf->l4_len;
 				if (is_tunneled	&& txq->tunnel_en) {
 					tso_header_sz += buf->outer_l2_len +
 							 buf->outer_l3_len;
-- 
1.8.3.1

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

* Re: [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion
  2017-03-23 12:42 [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion Shahaf Shuler
@ 2017-03-24  8:25 ` Nélio Laranjeiro
  2017-03-28 16:02   ` [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Nélio Laranjeiro @ 2017-03-24  8:25 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: adrien.mazarguil, dev, stable

On Thu, Mar 23, 2017 at 02:42:11PM +0200, Shahaf Shuler wrote:
> When VLAN insertion is requested the vlan size must be added to the
> calculation of the TSO header size, as it is not embedded within the
> mbuf l2 length.
> 
> Fixes: 98083fd482a2 ("net/mlx5: add hardware TSO support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index 823aac8..9e8c6d0 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -548,10 +548,11 @@
>  							buf->ol_flags &
>  							(PKT_TX_TUNNEL_GRE |
>  							 PKT_TX_TUNNEL_VXLAN);
> +				uint8_t vlan_sz = (buf->ol_flags &
> +						  PKT_TX_VLAN_PKT) ? 4 : 0;
>  
> -				tso_header_sz = buf->l2_len + buf->l3_len +
> -						buf->l4_len;
> -
> +				tso_header_sz = buf->l2_len + vlan_sz +
> +						buf->l3_len + buf->l4_len;
>  				if (is_tunneled	&& txq->tunnel_en) {
>  					tso_header_sz += buf->outer_l2_len +
>  							 buf->outer_l3_len;
> -- 
> 1.8.3.1
> 

Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-stable] [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion
  2017-03-24  8:25 ` Nélio Laranjeiro
@ 2017-03-28 16:02   ` Ferruh Yigit
  2017-03-29  5:23     ` Shahaf Shuler
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-03-28 16:02 UTC (permalink / raw)
  To: Nélio Laranjeiro, Shahaf Shuler; +Cc: adrien.mazarguil, dev, stable

On 3/24/2017 8:25 AM, Nélio Laranjeiro wrote:
> On Thu, Mar 23, 2017 at 02:42:11PM +0200, Shahaf Shuler wrote:
>> When VLAN insertion is requested the vlan size must be added to the
>> calculation of the TSO header size, as it is not embedded within the
>> mbuf l2 length.
>>
>> Fixes: 98083fd482a2 ("net/mlx5: add hardware TSO support")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>

> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

In next-net, squashed into 98083fd482a2, thanks.

(There were a few conflicts, can you please confirm related commits?)

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

* Re: [dpdk-stable] [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion
  2017-03-28 16:02   ` [dpdk-stable] " Ferruh Yigit
@ 2017-03-29  5:23     ` Shahaf Shuler
  0 siblings, 0 replies; 4+ messages in thread
From: Shahaf Shuler @ 2017-03-29  5:23 UTC (permalink / raw)
  To: Ferruh Yigit, Nélio Laranjeiro; +Cc: Adrien Mazarguil, dev, stable

Tuesday, March 28, 2017 7:03 PM, Ferruh Yigit:
> On 3/24/2017 8:25 AM, Nélio Laranjeiro wrote:
> > On Thu, Mar 23, 2017 at 02:42:11PM +0200, Shahaf Shuler wrote:
> >> When VLAN insertion is requested the vlan size must be added to the
> >> calculation of the TSO header size, as it is not embedded within the
> >> mbuf l2 length.
> >>
> >> Fixes: 98083fd482a2 ("net/mlx5: add hardware TSO support")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> 
> > Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> In next-net, squashed into 98083fd482a2, thanks.
> 
> (There were a few conflicts, can you please confirm related commits?)

Yes, looks OK. 
Thanks. 

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

end of thread, other threads:[~2017-03-29  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 12:42 [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion Shahaf Shuler
2017-03-24  8:25 ` Nélio Laranjeiro
2017-03-28 16:02   ` [dpdk-stable] " Ferruh Yigit
2017-03-29  5:23     ` Shahaf Shuler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.