From: Frederik Deweerdt <deweerdt.lkml@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: David Howells <dhowells@redhat.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net] splice: do not checksum AF_UNIX sockets
Date: Tue, 3 Dec 2024 14:35:38 -0800 [thread overview]
Message-ID: <Z0-Huo1aqf2OAtJi@xiberoa> (raw)
In-Reply-To: <Z098yHlrNYJsdzhM@pop-os.localdomain>
On Tue, Dec 03, 2024 at 01:48:56PM -0800, Cong Wang wrote:
> On Tue, Dec 03, 2024 at 04:30:22PM +0000, David Howells wrote:
> > Frederik Deweerdt <deweerdt.lkml@gmail.com> wrote:
> >
> > > - if (skb->ip_summed == CHECKSUM_NONE)
> > > + if (skb->ip_summed == CHECKSUM_NONE && skb->sk->sk_family != AF_UNIX)
> > > skb_splice_csum_page(skb, page, off, part);
> >
> > Should AF_UNIX set some other CHECKSUM_* constant indicating that the checksum
> > is unnecessary?
> >
>
> It already means unnecessary on TX path:
>
> * - %CHECKSUM_NONE
> *
> * The skb was already checksummed by the protocol, or a checksum is not
> * required.
>
Looking back at the patch series that introduced the checksumming [1],
it looks like `ip_output.c::ip_append_page()` was the only path doing
checksumming, it had similar looking logic:
-
- if (skb->ip_summed == CHECKSUM_NONE) {
- __wsum csum;
- csum = csum_page(page, offset, len);
- skb->csum = csum_block_add(skb->csum, csum, skb->len);
- }
-
That code in turn has been like this since the git import. I'm not sure
what that was for and how to test its intent.
Frederik
[1] https://patchwork.kernel.org/project/linux-mm/patch/20230522121125.2595254-15-dhowells@redhat.com/
prev parent reply other threads:[~2024-12-03 22:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 23:20 [PATCH net] splice: do not checksum AF_UNIX sockets Frederik Deweerdt
2024-11-30 1:43 ` Cong Wang
2024-11-30 4:05 ` Frederik Deweerdt
2024-11-30 12:08 ` David Laight
2024-12-03 16:30 ` David Howells
2024-12-03 21:48 ` Cong Wang
2024-12-03 22:35 ` Frederik Deweerdt [this message]
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=Z0-Huo1aqf2OAtJi@xiberoa \
--to=deweerdt.lkml@gmail.com \
--cc=dhowells@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@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).