[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170411113402.48614665@cakuba.lan>
Date: Tue, 11 Apr 2017 11:34:25 -0700
From: Jakub Kicinski <kubakici@...pl>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Edward Cree <ecree@...arflare.com>,
Tom Herbert <tom@...bertland.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>
Subject: Re: RFC: Checksum offload and XDP
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?
Powered by blists - more mailing lists