All of lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox.com>
To: Tom Herbert <therbert@google.com>, Or Gerlitz <or.gerlitz@gmail.com>
Cc: Jerry Chu <hkchu@google.com>, Eric Dumazet <edumazet@google.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	Linux Netdev List <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Yan Burman <yanb@mellanox.com>,
	"Shlomo Pongratz" <shlomop@mellanox.com>
Subject: Re: [PATCH net-next V2 1/3] net: Add GRO support for UDP encapsulating protocols
Date: Wed, 8 Jan 2014 18:11:05 +0200	[thread overview]
Message-ID: <52CD7899.5090707@mellanox.com> (raw)
In-Reply-To: <CA+mtBx-HRi4ttijScF8DKtdooeOyjzPXwq7T69vNaPSodZh1dQ@mail.gmail.com>

On 08/01/2014 01:04, Tom Herbert wrote:
> On Tue, Jan 7, 2014 at 12:21 PM, Or Gerlitz<or.gerlitz@gmail.com>  wrote:
>> >On Tue, Jan 7, 2014 at 8:44 PM, Tom Herbert<therbert@google.com>  wrote:
>>> >>Or, thanks for posting the patches!
>>> >>
>>> >>We should also support the case where direct encapsulation is being
>>> >>done, that is there is no encapsulation header after UDP and the
>>> >>protocol of the encapsulated packet is inferred by the port number
>>> >>(e.g. GRE/UDP, TCP/UDP, SCTP/UDP, etc.). This is probably an
>>> >>additional field in net_offload struct for next protocol, a little
>>> >>more API, and pretty trivial handlers in UDP code.
>> >
>> >The way I have set that follows your guideline under which the
>> >encapsulating method is derived from the udp destination port in the
>> >sense that the encapsulating protocol can do what they want in the
>> >gro_receive/complete handlers entry they plant per that udp port,
>> >isn't that generic enough?
> Direct encapsulation of different protocols could be done using the
> same callback functions. Somehow, we just need to pass the protocol
> number (or more generally pass private data to the callbacks). In lieu
> adding this to net_offload, we could just make the net_offload an
> argument to the callbacks and use container_of to access a private structure.
>

Tom,

OK, so I understand that you want the infrastructure to allow for direct 
udp encapsulation in the sense that there is no specific encapsulation 
header following the udp header.

Take for example encapsulating TCP over UDP port X, the layer/driver 
that wants to enable gro for such traffic will register a udp gro 
handler for port X and in their gro receive/complete
callbacks would just assume that following the UDP header there's TCP 
header and they will then issue a lookup in the inet gro handlers array 
to get the TCP gro handler, problem solved, agree?

Or.

  reply	other threads:[~2014-01-08 16:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 15:29 [PATCH net-next V2 0/3] net: Add GRO support for UDP encapsulating protocols Or Gerlitz
2014-01-07 15:29 ` [PATCH net-next V2 1/3] " Or Gerlitz
2014-01-07 16:33   ` Eric Dumazet
2014-01-07 20:19     ` Or Gerlitz
2014-01-07 20:32       ` Eric Dumazet
2014-01-07 20:37         ` Or Gerlitz
2014-01-07 21:38           ` Eric Dumazet
2014-01-08  8:04             ` Or Gerlitz
     [not found]               ` <1389182291.26646.79.camel@edumazet-glaptop2.roam.corp.google.com>
2014-01-08 12:15                 ` Or Gerlitz
2014-01-07 22:11           ` Jerry Chu
2014-01-08  8:02             ` Or Gerlitz
2014-01-09  3:12               ` Jerry Chu
2014-01-09  6:35                 ` Or Gerlitz
2014-01-09  7:19                 ` Or Gerlitz
2014-01-07 18:44   ` Tom Herbert
2014-01-07 20:21     ` Or Gerlitz
2014-01-07 23:04       ` Tom Herbert
2014-01-08 16:11         ` Or Gerlitz [this message]
2014-01-08 16:29           ` Tom Herbert
2014-01-08 16:31             ` Or Gerlitz
2014-01-07 21:19   ` David Miller
2014-01-07 21:40     ` Tom Herbert
2014-01-07 15:29 ` [PATCH net-next V2 2/3] net: Export gro_find_by_type helpers Or Gerlitz
2014-01-07 15:29 ` [PATCH net-next V2 3/3] net: Add GRO support for vxlan traffic Or Gerlitz
2014-01-07 16:34   ` Eric Dumazet
2014-01-07 19:43     ` Or Gerlitz
2014-01-07 20:04       ` Eric Dumazet
2014-01-07 20:10         ` Or Gerlitz
2014-01-07 18:08   ` Tom Herbert
2014-01-07 19:43     ` Or Gerlitz
2014-01-07 20:02       ` Eric Dumazet
2014-01-07 20:12         ` Or Gerlitz
2014-01-07 21:09           ` Tom Herbert
2014-01-08  9:45             ` Or Gerlitz
     [not found]     ` <CAJZOPZLsMvmHwmMjhsuKb__2HncMXMm=p6UFnT4XX5d8hZnGxw@mail.gmail.com>
2014-01-07 19:52       ` Tom Herbert
2014-01-07 16:45 ` [PATCH net-next V2 0/3] net: Add GRO support for UDP encapsulating protocols Eric Dumazet

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=52CD7899.5090707@mellanox.com \
    --to=ogerlitz@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hkchu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=or.gerlitz@gmail.com \
    --cc=shlomop@mellanox.com \
    --cc=therbert@google.com \
    --cc=yanb@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.