From: Stephen Hemminger <stephen@networkplumber.org>
To: Tom Herbert <therbert@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 9/9 v2] net: Add sysctl to trust checksum_complete
Date: Sat, 26 Apr 2014 19:31:35 -0700 [thread overview]
Message-ID: <20140426193135.7390d306@samsung-9> (raw)
In-Reply-To: <alpine.DEB.2.02.1404261402390.27405@tomh.mtv.corp.google.com>
On Sat, 26 Apr 2014 14:26:35 -0700 (PDT)
Tom Herbert <therbert@google.com> wrote:
> Currently if a device provides CHECKSUM_COMPLETE but the checksum
> is calculated to be invalid we recompute the checksum and try
> again in software. On the other hand, if device returns
> CHECKSUM_UNNECESSARY we implicitly trust it and don't verify what it
> did. This seems backwards!
>
> Add a sysctl to trust the device and report an invalid checksum when
> CHECKSUM_COMPLETE shows it is incorrect. sysctl defaults to enabled.
>
> Signed-off-by: Tom Herbert <therbert@google.com>
> ---
NO. Make one choice and do it consistently.
Papering over driver bugs or design confusion with a sysctl is not a
reasonable choice.
If some device (or code path) has invalid checksum logic, it should
be reported once and go ahead and fix it in software. The problem with
CHECKSUM_UNNECESSARY is that there is no way to check that the device
is broken without computing the checksum (catch-22).
next prev parent reply other threads:[~2014-04-27 2:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-26 21:26 [PATCH 9/9 v2] net: Add sysctl to trust checksum_complete Tom Herbert
2014-04-26 21:58 ` Ben Hutchings
2014-04-27 2:31 ` Stephen Hemminger [this message]
2014-04-27 17:03 ` Tom Herbert
2014-04-28 3:32 ` David Miller
2014-04-28 4:07 ` Tom Herbert
2014-04-28 4:15 ` David Miller
2014-04-28 4:22 ` 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=20140426193135.7390d306@samsung-9 \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--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).