All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <rick.jones2@hpe.com>, <tom@herbertland.com>, <jesse@kernel.org>,
	<aduyck@mirantis.com>, <netdev@vger.kernel.org>,
	<alexander.duyck@gmail.com>
Subject: Re: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default
Date: Tue, 23 Feb 2016 20:20:50 +0000	[thread overview]
Message-ID: <56CCBF22.6020904@solarflare.com> (raw)
In-Reply-To: <20160223.130826.608797488173024832.davem@davemloft.net>

On 23/02/16 18:08, David Miller wrote:
> From: Edward Cree <ecree@solarflare.com>
> Date: Tue, 23 Feb 2016 17:38:28 +0000
>
>> "The IPv4 ID field MUST NOT be used for purposes other than fragmentation
>>  and reassembly."(§4.1)
>> "Originating sources MAY set the IPv4 ID field of atomic datagrams to any
>>  value."(§4.1)
>> "All devices that examine IPv4 headers MUST ignore the IPv4 ID field of
>>  atomic datagrams."(§4.1)
>> Atomic datagrams are defined by "(DF==1)&&(MF==0)&&(frag_offset==0)" (§4).
>>
>> So it's OK to coalesce packets with different identifiers, as long as they
>> have DFset (and aren't fragmented already).  Also, the RFC takes pains to
>> point out that it "does not reserve any IPv4 ID values, including 0, as
>> distinguished" (§4.1), so one cannot rely on the ID always being zero.
> Just a reminder that a very long time ago we tried setting the IP ID
> field to zero for DF packets, and this broke SLHC because that expects
> a monotonically increasing IP ID field.
If I'm reading it right, Linux's SLHC implementation can cope [1] with
unchanging IP IDs (or IDs that do something other than increment), which it
encodes with the NEW_I bit.  RFC1144 supports this, remarking "note that it
may be zero or negative" (§3.2.3) of the ID delta.  So VJ implementations that
can't handle it really are buggy, not just exhibiting a difference of opinion.

So it seems like the problem case is where some sort of SLIP gateway lies
between a Linux system (say, a webserver sending with TSO) and a buggy client;
in that case, even if the client can't be fixed it seems like the gateway
could be (either to send NEW_I or just lie about the incoming IP IDs and claim
they're incrementing - the latter is entirely safe for a DF packet).

[ I really hope we can figure out a way not to change IP IDs, because I think
an inverted version of Tom's generic TSO could also work as a generic h/w GRO
accelerator.  In its simplest form, the hardware just remembers the previous
packet, then gives us the length of the common prefix.  If that ends four bytes
into a TCP header, then the packet is a candidate for GRO; otherwise not.  I
haven't worked out all the details yet, but it's clear that non-constant IP IDs
would cause problems.  (If it's only the innermost IP ID that's changing, we
can probably still cope, but the performance gain will be less and the
implementation could start to get ugly.) ]

  reply	other threads:[~2016-02-23 20:30 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 19:26 [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default Alexander Duyck
2016-02-19 19:26 ` [net-next PATCH 1/2] GENEVE: Support outer IPv4 Tx checksums " Alexander Duyck
2016-02-19 20:28   ` Tom Herbert
2016-02-19 19:26 ` [net-next PATCH 2/2] VXLAN: " Alexander Duyck
2016-02-19 20:27   ` Tom Herbert
2016-02-19 21:36     ` Jesse Gross
2016-02-19 21:53 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum " Jesse Gross
2016-02-19 23:10   ` Alex Duyck
2016-02-20  0:08     ` Jesse Gross
2016-02-20  0:14       ` Tom Herbert
2016-02-20  2:18         ` Jesse Gross
2016-02-20 19:51           ` Tom Herbert
2016-02-23  3:31             ` Jesse Gross
2016-02-23 15:18               ` Edward Cree
2016-02-23 16:47                 ` Tom Herbert
2016-02-23 17:20                   ` Rick Jones
2016-02-23 17:38                     ` Edward Cree
2016-02-23 18:08                       ` David Miller
2016-02-23 20:20                         ` Edward Cree [this message]
2016-02-23 23:11                           ` David Miller
2016-02-24  0:53                           ` Tom Herbert
2016-02-24 17:30                             ` Edward Cree
2016-02-23 18:11                       ` Tom Herbert
2016-02-23 17:31                   ` Jesse Gross
2016-02-23 17:42                     ` Tom Herbert
2016-02-23 18:18                       ` Alexander Duyck
2016-02-23 18:26                       ` David Miller
2016-02-23 18:32                         ` Tom Herbert
2016-02-23 18:24                     ` David Miller
2016-02-24  9:58                       ` David Laight
2016-02-24 15:41                         ` David Miller
2016-02-25 20:14                   ` David Miller
2016-03-11 19:20             ` Generic TSO (was Re: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default) Edward Cree
2016-03-11 19:57               ` Tom Herbert
2016-03-11 19:59                 ` Edward Cree
2016-03-11 20:16                   ` Tom Herbert
2016-03-11 20:24                     ` Edward Cree
2016-03-11 21:09                       ` Alexander Duyck
2016-03-11 21:29                         ` Edward Cree
2016-03-11 22:31                           ` Alexander Duyck
2016-03-11 22:55                             ` Tom Herbert
2016-03-12  5:40                               ` Alexander Duyck
2016-03-14 10:26                                 ` Generic TSO Edward Cree
2016-03-14 10:32                                   ` Edward Cree
2016-03-14 15:59                                     ` Alexander Duyck
2016-03-11 20:22               ` David Miller
2016-02-22  3:06 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default 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=56CCBF22.6020904@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jesse@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hpe.com \
    --cc=tom@herbertland.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.