From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix TSO header size in case of VLAN insertion
Date: Fri, 24 Mar 2017 09:25:32 +0100 [thread overview]
Message-ID: <20170324082532.GX12013@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <1490272931-145077-1-git-send-email-shahafs@mellanox.com>
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
next prev parent reply other threads:[~2017-03-24 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 12:42 Shahaf Shuler
2017-03-24 8:25 ` Nélio Laranjeiro [this message]
2017-03-28 16:02 ` Ferruh Yigit
2017-03-29 5:23 ` Shahaf Shuler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170324082532.GX12013@autoinstall.dev.6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=shahafs@mellanox.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).