[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+mtBx87o1Lo2zpMyUGC_P+7+DmXnZyA2NF0-GYCEWiRh6VJQg@mail.gmail.com>
Date: Thu, 6 Nov 2014 08:06:06 -0800
From: Tom Herbert <therbert@...gle.com>
To: Sathya Perla <Sathya.Perla@...lex.com>
Cc: David Miller <davem@...emloft.net>,
Joe Stringer <joestringer@...ira.com>,
Or Gerlitz <gerlitz.or@...il.com>,
Linux Netdev List <netdev@...r.kernel.org>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Amir Vadai <amirv@...lanox.com>,
"shahed.shaikh" <shahed.shaikh@...gic.com>,
dept-gelinuxnicdev <Dept-GELinuxNICDev@...gic.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 0/5] Implement ndo_gso_check() for vxlan nics
The inner headers are reset in iptunnel_handle_offloads. This called
in the xmit encapsulation function (GRE, fou, VXLAN, etc.) before
added in encapsulation headers, so the inner headers will point to the
encapsulation payload, i.e. the encapsulated packet. The headers are
only on the first encapsulation, so with nested tunnels the inner
headers point to encapsulated packet. Since VXLAN and NVGRE have same
size of encapsulation (8 UDP + 8 header), skb_inner_mac_header(skb)
- skb_transport_header(skb) should always be 16.
On Wed, Nov 5, 2014 at 10:16 PM, Sathya Perla <Sathya.Perla@...lex.com> wrote:
>> -----Original Message-----
>> From: Tom Herbert [mailto:therbert@...gle.com]
>>
>> On Wed, Nov 5, 2014 at 6:15 PM, David Miller <davem@...emloft.net>
>> wrote:
>> > From: Joe Stringer <joestringer@...ira.com>
>> > Date: Wed, 5 Nov 2014 17:06:46 -0800
>> >
>> >> My impression was that the changes are more likely to be
>> >> hardware-specific (like the i40e changes) rather than software-specific,
>> >> like changes that might be integrated into the helper.
>> >
>> > I think there is more commonality amongst hardware capabilities,
>> > and this is why I want the helper to play itself out.
>> >
>> >> That said, I can rework for one helper. The way I see it would be the
>> >> same code as these patches, as "vxlan_gso_check(struct sk_buff *)" in
>> >> drivers/net/vxlan.c which would be called from each driver. Is that what
>> >> you had in mind?
>> >
>> > Yes.
>>
>> Note that this code is not VXLAN specific, it will also accept NVGRE
>> and GRE/UDP with keyid and TEB. I imagine all these cases should be
>> indistinguishable to the hardware so they probably just work (which
>> would be cool!). It might be better to name and locate the helper
>> function to reflect that.
>
> Tom, I'm confused as to how the value of (skb_inner_mac_header(skb) - skb_transport_header(skb))
> would be the same for VxLAN and NVGRE encapsulated packets. Wouldn't this value be 16 for VxLAN
> and 8 for NVGRE?
>
The inner headers are reset in iptunnel_handle_offloads. This is
called in the xmit encapsulation functions (GRE, fou, VXLAN, etc.)
before adding in encapsulation headers (skb_push), so the
mac_inner_header will point to the encapsulation payload, i.e. the
encapsulated packet. This should not change after being set, although
inner network and inner transport can. The headers are only set on the
first encapsulation, so with nested tunnels the inner headers point to
the innermost encapsulated packet. Since VXLAN and NVGRE have same
size of encapsulation (8 UDP + 8 header), skb_inner_mac_header(skb)
- skb_transport_header(skb) should always be 16.
Tom
> thks,
> -Sathya
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists