From: Eric Blake <eblake@redhat.com>
To: Ed Swierk <eswierk@skyportsystems.com>,
Jason Wang <jasowang@redhat.com>,
"Daniel P . Berrange" <berrange@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Dmitry Fleytman <dmitry@daynix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] net: Transmit zero UDP checksum as 0xFFFF
Date: Wed, 15 Nov 2017 21:55:50 -0600 [thread overview]
Message-ID: <5e211649-ccf6-efd9-cabd-a346af7e501d@redhat.com> (raw)
In-Reply-To: <1510801633-115970-1-git-send-email-eswierk@skyportsystems.com>
[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]
On 11/15/2017 09:07 PM, Ed Swierk via Qemu-devel wrote:
[meta-comment]
> The checksum algorithm used by IPv4, TCP and UDP allows a zero value
> to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
> UDP checksum must be transmitted as 0xFFFF, as 0x0000 is a special
> value meaning no checksum.
>
> Substitute 0xFFFF whenever a checksum is computed as zero when
> modifying a UDP datagram header. Doing this on IPv4 packets and TCP
> segments is unnecessary but legal. Add a wrapper for
> net_checksum_finish() that makes the substitution.
>
> (We can't just change net_checksum_finish(), as that function is also
> used by receivers to verify checksums, and in that case the expected
> value is always 0x0000.)
This part below...
>
> v3:
>
> Leave net_tx_pkt_update_ip_checksums() alone since it's only computing
> a partial sum of the IP pseudo-header.
>
> Rename wrapper to net_checksum_finish_nozero() for clarity.
>
> v2:
>
> Add a wrapper net_checksum_finish_hdr() rather than duplicating the
> logic at every caller.
...through here, belongs...
>
> Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
> ---
...here, after the --- separator (you can have more than one ---; 'git
am' stops parsing at the first). It is data that is useful to
reviewers, but will be meaningless a year from now when browsing git
history (at which point we won't care how many revisions the patch went
through on the list, but only what was checked in).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-11-16 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 3:07 [Qemu-devel] [PATCH v3] net: Transmit zero UDP checksum as 0xFFFF Ed Swierk
2017-11-16 3:55 ` Eric Blake [this message]
2017-11-16 13:55 ` Ed Swierk
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=5e211649-ccf6-efd9-cabd-a346af7e501d@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=dmitry@daynix.com \
--cc=eswierk@skyportsystems.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).