All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: Saeed Mahameed <saeedm@dev.mellanox.co.il>
Cc: netdev <netdev@vger.kernel.org>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Or Gerlitz <ogerlitz@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Gal Pressman <galp@mellanox.com>
Subject: Re: [BUG] mlx5 have problems with ipv4-ipv6 tunnels in linux 4.4
Date: Tue, 10 Jul 2018 12:19:02 +0300	[thread overview]
Message-ID: <e5258c3f-aeca-a8ab-33c8-6e1411a16a87@yandex-team.ru> (raw)
In-Reply-To: <CALzJLG8wWzfddbnbsjfMKPcsP-byCcKeWmmBYWvpfbDX1m6yqg@mail.gmail.com>

On 10.07.2018 01:31, Saeed Mahameed wrote:
> On Tue, Jul 3, 2018 at 10:45 PM, Konstantin Khlebnikov
> <khlebnikov@yandex-team.ru> wrote:
>> I'm seeing problems with tunnelled traffic with Mellanox Technologies
>> MT27710 Family [ConnectX-4 Lx] using vanilla driver from linux 4.4.y
>>
>> Packets with payload bigger than 116 bytes are not exmited.
>> Smaller packets and normal ipv6 works fine.
>>
> 
> Hi Konstantin,
> 
> Is this true for all ipv6 traffic or just ipv4-ipv6 tunnels ?
> 
> what is the skb_network_offset(skb) for such packet ?
> 
>> In linux 4.9, 4.14 and out-of-tree driver everything seems fine for now.
>> It's hard to guess or bisect commit: there are a lot of changes and
>> something wrong with driver or swiotlb in 4.7..4.8.
>> 4.6 is affected too - so this should be something between 4.6 and 4.9
>>
>> Probably this case was fixed indirectly by adding some kind of offload and
>> non-offloaded path is still broken.
>> Please give me a hint: which commit could it be.
>>
> 
> I suspect it works in a newer kernel since we introduced on 4.7/4.8:

Yes, this works. Thank you.

Problem was with VLAN rather than tunnel.

This hunk from first patch is enough:
-#define MLX5E_MIN_INLINE ETH_HLEN
+#define MLX5E_MIN_INLINE (ETH_HLEN + VLAN_HLEN)

In my case full data path looks like

( tcp -> ipip6 -> veth ) -> netns-to-host -> ( veth -> vlan at mlx5 )

Tunnelled traffic also goes to vlan, while most of other traffic goes
through non-tagged interface and worked fine.

max_inline is 226 so (226 - vlan - ethernet - ipv6 - ipv4 - tcp)
leaves exactly 116 bytes for payload.

> 
> commit e3a19b53cbb0e6738b7a547f262179065b72e3fa
> Author: Matthew Finlay <matt@mellanox.com>
> Date:   Thu Jun 30 17:34:47 2016 +0300
> 
>      net/mlx5e: Copy all L2 headers into inline segment
> 
>      ConnectX4-Lx uses an inline wqe mode that currently defaults to
>      requiring the entire L2 header be included in the wqe.
>      This patch fixes mlx5e_get_inline_hdr_size() to account for
>      all L2 headers (VLAN, QinQ, etc) using skb_network_offset(skb).
> 
>      Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files")
>      Signed-off-by: Matthew Finlay <matt@mellanox.com>
>      Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
>      Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> 
> 
> commit ae76715d153e33c249b6850361e4d8d775388b5a
> Author: Hadar Hen Zion <hadarh@mellanox.com>
> Date:   Sun Jul 24 16:12:39 2016 +0300
> 
>      net/mlx5e: Check the minimum inline header mode before xmit
> 
> and then some fixes on top of it, such as:
> 
> commit f600c6088018d1dbc5777d18daa83660f7ea4a64
> Author: Eran Ben Elisha <eranbe@mellanox.com>
> Date:   Thu Jan 25 11:18:09 2018 +0200
> 
>      net/mlx5e: Verify inline header size do not exceed SKB linear size
> 
> 
> anyhow, can you try the above patches one by one  on 4.4.y and see if it helps ?
> 
> 
> Thanks,
> Saeed
> 

  reply	other threads:[~2018-07-10  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04  5:45 [BUG] mlx5 have problems with ipv4-ipv6 tunnels in linux 4.4 Konstantin Khlebnikov
2018-07-09 22:31 ` Saeed Mahameed
2018-07-10  9:19   ` Konstantin Khlebnikov [this message]
2018-07-12 18:03     ` Or Gerlitz

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=e5258c3f-aeca-a8ab-33c8-6e1411a16a87@yandex-team.ru \
    --to=khlebnikov@yandex-team.ru \
    --cc=galp@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@dev.mellanox.co.il \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    /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 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.