All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
	Network Development <netdev@vger.kernel.org>,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH RFC net-next 00/11] udp gso
Date: Wed, 18 Apr 2018 09:51:50 -0400	[thread overview]
Message-ID: <CAF=yD-LkTpVQ_8F2oTLeEDKcNWYuvn3QoSrSa0y5j7zgB6Em9A@mail.gmail.com> (raw)
In-Reply-To: <20180418134706.GD19633@oracle.com>

On Wed, Apr 18, 2018 at 9:47 AM, Sowmini Varadhan
<sowmini.varadhan@oracle.com> wrote:
> On (04/18/18 06:35), Eric Dumazet wrote:
>>
>> There is no change at all.
>>
>> This will only be used as a mechanism to send X packets of same size.
>>
>> So instead of X system calls , one system call.
>>
>> One traversal of some expensive part of the host stack.
>>
>> The content on the wire should be the same.
>
> I'm sorry that's not how I interpret Willem's email below
> (and maybe I misunderstood)
>
> the following taken from https://www.spinics.net/lists/netdev/msg496150.html
>
> Sowmini> If yes, how will the recvmsg differentiate between the case
> Sowmini> (2000 byte message followed by 512 byte message) and
> Sowmini> (1472 byte message, 526 byte message, then 512 byte message),
> Sowmini> in other words, how are UDP message boundary semantics preserved?
>
> Willem> They aren't. This is purely an optimization to amortize the cost of
> Willem> repeated tx stack traversal. Unlike UFO, which would preserve the
> Willem> boundaries of the original larger than MTU datagram.
>
> As I understand Willem's explanation, if I do a sendmsg of 2000 bytes,
> - classic UDP will send 2 IP fragments, the first one with a full UDP
>   header, and the IP header indicating that this is the first frag for
>   that ipid, with more frags to follow. The second frag will have the
>   rest with the same ipid, it will not have a udp header,
>   and it will indicatet that it is the last frag (no more frags).
>
>   The receiver can thus use the ipid, "more-frags" bit, frag offset etc
>   to stitch the 2000 byte udp message together and pass it up on the udp
>   socket.
>
> - in the "GSO" proposal my 2000  bytes of data are sent as *two*
>   udp packets, each of them with a unique udp header, and uh_len set
>   to 1476 (for first) and 526 (for second). The receiver has no clue
>   that they are both part of the same UDP datagram, So wire format
>   is not the same, am I mistaken?

Eric is correct. If the application sets a segment size with UDP_SEGMENT
this is an instruction to the kernel to split the payload along that border into
separate discrete datagrams.

It does not matter what the behavior is without setting this option. If a
process wants to send a larger than MTU datagram and rely on the
kernel to fragment, then it should not set the option.

  reply	other threads:[~2018-04-18 13:52 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 20:00 [PATCH RFC net-next 00/11] udp gso Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 01/11] udp: expose inet cork to udp Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 02/11] udp: add gso Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 03/11] udp: better wmem accounting on gso Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 04/11] udp: paged allocation with gso Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 05/11] udp: add gso segment cmsg Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 06/11] udp: add gso support to virtual devices Willem de Bruijn
2018-04-18  0:43   ` Dimitris Michailidis
2018-04-18  3:27     ` Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 07/11] udp: zerocopy Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 08/11] selftests: udp gso Willem de Bruijn
2018-04-17 20:00 ` [PATCH RFC net-next 09/11] selftests: udp gso with connected sockets Willem de Bruijn
2018-04-17 20:15 ` [PATCH RFC net-next 00/11] udp gso Sowmini Varadhan
2018-04-17 20:23   ` Willem de Bruijn
2018-04-17 20:48     ` Sowmini Varadhan
2018-04-17 21:07       ` Willem de Bruijn
2018-04-18  2:25         ` Samudrala, Sridhar
2018-04-18  3:33           ` Willem de Bruijn
2018-04-18 12:31             ` Sowmini Varadhan
2018-04-18 13:35               ` Eric Dumazet
2018-04-18 13:47                 ` Sowmini Varadhan
2018-04-18 13:51                   ` Willem de Bruijn [this message]
2018-04-18 15:08                     ` Samudrala, Sridhar
2018-04-18 17:40                     ` David Miller
2018-04-18 17:34                   ` David Miller
2018-04-18 13:59               ` Willem de Bruijn
2018-04-18 14:28                 ` Willem de Bruijn
2018-04-18 17:28               ` David Miller
2018-04-18 18:12                 ` Alexander Duyck
2018-04-18 18:22                   ` Willem de Bruijn
2018-04-20 17:38                     ` Alexander Duyck
2018-04-20 21:58                       ` Willem de Bruijn
2018-04-21  2:08                         ` Alexander Duyck
2018-04-18 19:33                   ` David Miller
2018-04-20 18:27                   ` Tushar Dave
2018-04-20 20:08                     ` Alexander Duyck
2018-04-21  3:11                       ` Tushar Dave
2018-08-31  9:09         ` Paolo Abeni
2018-08-31 10:09           ` Eric Dumazet
2018-08-31 13:08           ` Willem de Bruijn
2018-08-31 13:44             ` Paolo Abeni
2018-08-31 15:11               ` Willem de Bruijn
2018-09-03  8:02             ` Steffen Klassert
2018-09-03 11:45               ` Sowmini Varadhan
2018-04-18 11:17 ` Paolo Abeni
2018-04-18 13:49   ` Willem de Bruijn
2018-05-24  0:02     ` Marcelo Ricardo Leitner
2018-05-24  1:15       ` Willem de Bruijn
2018-04-18 17:24   ` David Miller
2018-04-18 17:50 ` David Miller
2018-04-18 18:12   ` Willem de Bruijn
2018-04-19 17:45     ` David Miller

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='CAF=yD-LkTpVQ_8F2oTLeEDKcNWYuvn3QoSrSa0y5j7zgB6Em9A@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sowmini.varadhan@oracle.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=willemb@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 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.