All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Gallatin <gallatin@myri.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>,
	ossthema@de.ibm.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, tklein@de.ibm.com,
	raisch@de.ibm.com, jb.billaud@gmail.com, hering2@de.ibm.com
Subject: Re: [PATCH] lro: IP fragment checking
Date: Tue, 02 Dec 2008 10:36:22 -0500	[thread overview]
Message-ID: <493555F6.2030900@myri.com> (raw)
In-Reply-To: <1228231128.3075.9.camel@achroite>

Ben Hutchings wrote:
> On Tue, 2008-12-02 at 09:42 -0500, Andrew Gallatin wrote:
>> Ben Hutchings wrote:
>>> On Mon, 2008-12-01 at 19:02 -0500, Andrew Gallatin wrote:
>>>> Ben Hutchings wrote:
> [...]
>>>>> If your hardware/firmware wrongly claims to be able to verify the
>>>>> TCP/UDP checksum for an IP fragment, it seems to me you should deal with
>>>>> that in your driver or fix the firmware.
>>>> We do partial checksums.
>>> So you should check for IP fragmentation in your get_frag_header() along
>>> with all the other checks you've got to do.
>> Indeed, and that is the patch I intend to submit if the fragment
>> check in inet_lro is rejected.  I still think the check belongs
>> in the inet lro code though, and I'm worried it is being rejected
>> for the wrong reasons..
> 
> There's a wide variety of capabilities of different hardware:
> 
> 1. No checksum offload. Probably not worth using LRO.
> 2. Full-checksum generation. Driver passes packets to inet_lro;
> get_frag_header() or get_skb_header() parses packets to check that they
> are TCP/IPv4 and to validate the checksum. inet_lro does further checks.
> 3. L4 packet parsing and checksum validation. Driver passes TCP/IPv4
> packets to inet_lro. inet_lro does further checks.
> 4. Hardware/firmware LRO. inet_lro not needed.
> 
> You seem to be proposing that a check that is only needed in case (2)
> should also be applied in case (3).  Maybe it would make more sense to
> define a generic implementation of get_frag_header() for full-checksum
> devices, if that's possible?

Or maybe a generic lro_check_header() that can be called from
everybody's get_frag_header()/get_skb_header().  I guess what
bothers me is the division of checks between the get_*_header()
routine and lro_tcp_ip_checks() and the inevitable code
duplication in the get_*_header routines.

I still don't understand why an unneeded check for fragmentation
in case (3) is any more objectionable than the existing tcp
flags checks in lro_tcp_ip_check(), many of which are surely
not needed in case (3) either.

Drew

  reply	other threads:[~2008-12-02 15:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01  8:58 [PATCH] lro: IP fragment checking Jan-Bernd Themann
2008-12-01  9:41 ` David Miller
2008-12-01 17:50 ` Andrew Gallatin
2008-12-01 21:18   ` David Miller
2008-12-01 21:53     ` Andrew Gallatin
2008-12-01 22:09       ` Ben Hutchings
2008-12-02  0:02         ` Andrew Gallatin
2008-12-02  0:18           ` Ben Hutchings
2008-12-02 14:42             ` Andrew Gallatin
2008-12-02 15:18               ` Ben Hutchings
2008-12-02 15:36                 ` Andrew Gallatin [this message]
2008-12-02  0:07       ` David Miller
2008-12-02  0:19         ` Andrew Gallatin

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=493555F6.2030900@myri.com \
    --to=gallatin@myri.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=hering2@de.ibm.com \
    --cc=jb.billaud@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ossthema@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=tklein@de.ibm.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.