From: David Miller <davem@davemloft.net>
To: kubakici@wp.pl
Cc: daniel@iogearbox.net, ecree@solarflare.com, tom@herbertland.com,
netdev@vger.kernel.org, ast@kernel.org
Subject: Re: RFC: Checksum offload and XDP
Date: Tue, 11 Apr 2017 15:00:48 -0400 (EDT) [thread overview]
Message-ID: <20170411.150048.966246483547817859.davem@davemloft.net> (raw)
In-Reply-To: <20170411113402.48614665@cakuba.lan>
From: Jakub Kicinski <kubakici@wp.pl>
Date: Tue, 11 Apr 2017 11:34:25 -0700
> On Tue, 11 Apr 2017 18:43:47 +0200, Daniel Borkmann wrote:
>> cls_bpf has a couple of helpers like bpf_l3_csum_replace(), bpf_l4_csum_replace()
>> bpf_csum_diff(), bpf_csum_update(), where we (cilium at least) use checksum
>> diffs extensively. You can then also leave the option to the user to feed
>> pre-computed diffs from a map, etc, or, to just not care at all when not
>> necessary. Pushing this via return code seems a bit odd, perhaps a xdp->csum
>> member could be populated before calling into the program and the resulting
>> xdp->csum processed further upon exit.
>
> +1 on exposing xdp->csum. I think having the csum complete available
> in the eBPF program (rather than diff) may be useful for apps doing
> encap to a csumed tunnel (e.g. UDP). If the header is pre-calculated
> in the map, having csum complete makes calculating the outer csum
> extremely easy, right?
The outer checksum is constant because when the inner checksum is
installed the inner frame checksums to zero.
I really want to see how people are actually changing fields in XDP
that requires special checksum facilities, that isn't already handled
using the csum helpers Daniel mentioned.
next prev parent reply other threads:[~2017-04-11 19:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 18:26 RFC: Checksum offload and XDP Tom Herbert
2017-04-11 15:55 ` Edward Cree
2017-04-11 16:43 ` Daniel Borkmann
2017-04-11 18:34 ` Jakub Kicinski
2017-04-11 19:00 ` David Miller [this message]
2017-04-11 16:46 ` Tom Herbert
2017-04-11 17:13 ` Edward Cree
2017-04-11 17:26 ` Tom Herbert
2017-04-11 18:43 ` Jakub Kicinski
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=20170411.150048.966246483547817859.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=ecree@solarflare.com \
--cc=kubakici@wp.pl \
--cc=netdev@vger.kernel.org \
--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 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).