From: Daniel Borkmann <daniel@iogearbox.net>
To: Lorenz Bauer <lmb@cloudflare.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Alan Maguire <alan.maguire@oracle.com>, bpf <bpf@vger.kernel.org>,
Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf 3/3] bpf, selftests: Adapt cls_redirect to call csum_level helper
Date: Tue, 2 Jun 2020 17:48:54 +0200 [thread overview]
Message-ID: <65cde627-96af-b99e-7a6f-a688c2c6dbdd@iogearbox.net> (raw)
In-Reply-To: <CACAyw998Yy6NBJbSi+RfUofpKQYjYA78HGmWEqDTm1B+BkvuOw@mail.gmail.com>
On 6/2/20 5:13 PM, Lorenz Bauer wrote:
> On Tue, 2 Jun 2020 at 15:58, Daniel Borkmann <daniel@iogearbox.net> wrote:
>>
>> Adapt bpf_skb_adjust_room() to pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET flag and
>> use the new bpf_csum_level() helper to inc/dec the checksum level by one after
>> the encap/decap.
>
> Just to be on the safe side: we go from
> | ETH | IP | UDP | GUE | IP | TCP |
> to
> | ETH | IP | TCP |
> by cutting | IP | UDP | GUE | after the Ethernet header.
>
> Since IP is never included in csum_level and because GUE is not eligible for
> CHECKSUM_UNNECESSARY we only need to do csum_level-- once, not twice.
Yes, that is correct.
next prev parent reply other threads:[~2020-06-02 15:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 14:58 [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 1/3] bpf: Fix up bpf_skb_adjust_room helper's skb csum setting Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 2/3] bpf: Add csum_level helper for fixing up csum levels Daniel Borkmann
2020-06-02 15:19 ` Lorenz Bauer
2020-06-02 15:35 ` Daniel Borkmann
2020-06-02 16:41 ` Alan Maguire
2020-06-02 17:43 ` Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 3/3] bpf, selftests: Adapt cls_redirect to call csum_level helper Daniel Borkmann
2020-06-02 15:13 ` Lorenz Bauer
2020-06-02 15:48 ` Daniel Borkmann [this message]
2020-06-02 15:19 ` [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room Lorenz Bauer
2020-06-02 18:59 ` Alexei Starovoitov
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=65cde627-96af-b99e-7a6f-a688c2c6dbdd@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=alan.maguire@oracle.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
/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).