netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Or Gerlitz <gerlitz.or@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: Jesse Gross <jesse@nicira.com>,
	David Miller <davem@davemloft.net>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 net-next 0/7] net: foo-over-udp (fou)
Date: Tue, 16 Sep 2014 22:14:21 +0300	[thread overview]
Message-ID: <CAJ3xEMghyiuo3TOdsiSBOBBOk21zSfso6fdt-jEqY5ifA2Q1vg@mail.gmail.com> (raw)
In-Reply-To: <CA+mtBx-B-25-nS1pVgeCiuykdFydCiay0QCwiE75P37Q3ODRCQ@mail.gmail.com>

On Tue, Sep 16, 2014 at 9:34 PM, Tom Herbert <therbert@google.com> wrote:
> On Tue, Sep 16, 2014 at 5:44 AM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
>> On Tue, Sep 16, 2014 at 1:44 AM, Jesse Gross <jesse@nicira.com> wrote:
>>> On Mon, Sep 15, 2014 at 12:15 PM, Tom Herbert <therbert@google.com> wrote:
>>
>>>> My interpretation is that NETIF_F_GSO_UDP_TUNNEL means L3/L4
>>>> encapsulation over UDP, not VXLAN.
>>>> If the NIC implements things properly following the generic interface then I believe it should work
>>>> with various flavors of UDP encapsulation (FOU, GUE, VXLAN, VXLAN-gpe,
>>>> geneve, LISP, L2TP, nvgre, or whatever else people might dream up).
>>>> This presumes that any encapsulation headers doesn't require any per
>>>> segment update (so no GRE csum for instance). The stack will set up
>>>> inner headers as needed, which should enough to provide to devices the
>>>> offsets inner IP and TCP header which are needed for the the TSO
>>>> operation (outer IP and UDP can be deduced also).
>>
>>
>>
>>> From the NICs that I am familiar with this is mostly true. The main
>>> part that is missing from the current implementation is a length
>>> limit: just because the hardware can skip over headers to an offset
>>> doesn't mean that it can do so to an arbitrary depth. For example, in
>>> the NICs that are exposing VXLAN as NETIF_F_GSO_UDP_TUNNEL we can
>>> probably assume that this is limited to 8 bytes. With the Intel NICs
>>> that were just announced with Geneve support, this limit has been
>>> increased to 64. If we add a parameter to the driver interface to
>>> expose this then it should be generic across tunnels.
>>
>> I'm not sure to see why the length limit became our primary concern here...

> Like Jesse mentioned above, looks like some NICs may have assumed all
> encapsulation headers are eight bytes (which allows HW to implement
> everything in fixed offsets). But this length is not a universal
> constant: FOU is zero length encapsulation headers, GUE or geneve is
> variable. The driver should really be checking if NIC can handle the
> length and if it can't perform GSO in software-- I don't think we'll
> need to expose this in the features.

I understand that for some NICs there's a claim saying the essence of
the limitation lies in an assumption on fixed length of the
encapsulation headers  -- and BTW for VXLAN it's 50 (= 14 + 20 + 8 +
8) bytes, not eight. So newer NICs  or new brands of existing NICs
should be more flexible.

If I correctly read your comment "The driver should really be checking
if NIC can handle the length and if it can't perform GSO in software"
as saying that a SW GSO call should be made from within the driver
when they can't serve GSO under some encap scheme -- I don't think
this is the correct track, the driver should advertize up what they
can do in HW so the stack does in SW what's not supported.

Another clarification - so FOU doesn't supersedes GUE? what's their
difference...?

Or.

  reply	other threads:[~2014-09-16 19:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15  3:07 [PATCH v2 net-next 0/7] net: foo-over-udp (fou) Tom Herbert
2014-09-15  3:07 ` [PATCH v2 net-next 1/7] net: Export inet_offloads and inet6_offloads Tom Herbert
2014-09-15 13:33   ` Or Gerlitz
2014-09-15 15:13     ` Tom Herbert
2014-09-15 17:15       ` Or Gerlitz
2014-09-15 17:32         ` Tom Herbert
2014-09-15 18:21   ` David Miller
2014-09-15  3:07 ` [PATCH v2 net-next 2/7] fou: Support for foo-over-udp RX path Tom Herbert
2014-09-15  3:07 ` [PATCH v2 net-next 3/7] fou: Add GRO support Tom Herbert
2014-09-15 15:00   ` Or Gerlitz
2014-09-15 15:10     ` Tom Herbert
2014-09-15 17:03       ` Or Gerlitz
2014-09-15 17:21         ` Tom Herbert
2014-09-15 18:22   ` David Miller
2014-09-15  3:08 ` [PATCH v2 net-next 4/7] net: Changes to ip_tunnel to support foo-over-udp encapsulation Tom Herbert
2014-09-15  3:08 ` [PATCH v2 net-next 5/7] sit: TX path for sit/UDP " Tom Herbert
2014-09-15  3:08 ` [PATCH v2 net-next 6/7] ipip: TX path for IPIP/UDP " Tom Herbert
2014-09-15  3:08 ` [PATCH v2 net-next 7/7] gre: TX path for GRE/UDP " Tom Herbert
2014-09-15 18:08 ` [PATCH v2 net-next 0/7] net: foo-over-udp (fou) Or Gerlitz
2014-09-15 19:15   ` Tom Herbert
2014-09-15 22:44     ` Jesse Gross
2014-09-15 22:59       ` Tom Herbert
2014-09-16  0:15         ` Jesse Gross
2014-09-16 12:44       ` Or Gerlitz
2014-09-16 18:34         ` Tom Herbert
2014-09-16 19:14           ` Or Gerlitz [this message]
2014-09-16 20:31             ` Tom Herbert
2014-09-16 13:35     ` Or Gerlitz
2014-09-16 15:00       ` Tom Herbert
2014-09-16 20:04         ` Or Gerlitz
2014-09-16 20:16           ` David Miller
2014-09-17 15:22             ` Or Gerlitz
2014-09-16 20:35           ` Tom Herbert

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=CAJ3xEMghyiuo3TOdsiSBOBBOk21zSfso6fdt-jEqY5ifA2Q1vg@mail.gmail.com \
    --to=gerlitz.or@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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 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).