[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZqZkDB8EJh3K3TpT7N556hxCRqMF7x_Y8D05wmBGDdvA@mail.gmail.com>
Date: Wed, 27 Apr 2022 15:22:55 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Maxim Mikityanskiy <maximmi@...dia.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Networking <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...dia.com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Petar Penkov <ppenkov@...gle.com>,
Lorenz Bauer <lmb@...udflare.com>,
Eric Dumazet <edumazet@...gle.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Joe Stringer <joe@...ium.io>,
Florent Revest <revest@...omium.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Toke Høiland-Jørgensen <toke@...e.dk>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Florian Westphal <fw@...len.de>, pabeni@...hat.com
Subject: Re: [PATCH bpf-next v6 5/6] bpf: Add selftests for raw syncookie helpers
On Wed, Apr 27, 2022 at 10:19 AM Maxim Mikityanskiy <maximmi@...dia.com> wrote:
>
> On 2022-04-27 01:11, Andrii Nakryiko wrote:
> > On Tue, Apr 26, 2022 at 11:29 AM Maxim Mikityanskiy <maximmi@...dia.com> wrote:
> >>
> >> On 2022-04-26 09:26, Andrii Nakryiko wrote:
> >>> On Mon, Apr 25, 2022 at 5:12 PM Alexei Starovoitov
> >>> <alexei.starovoitov@...il.com> wrote:
> >>>>
> >>>> On Fri, Apr 22, 2022 at 08:24:21PM +0300, Maxim Mikityanskiy wrote:
> >>>>> +void test_xdp_synproxy(void)
> >>>>> +{
> >>>>> + int server_fd = -1, client_fd = -1, accept_fd = -1;
> >>>>> + struct nstoken *ns = NULL;
> >>>>> + FILE *ctrl_file = NULL;
> >>>>> + char buf[1024];
> >>>>> + size_t size;
> >>>>> +
> >>>>> + SYS("ip netns add synproxy");
> >>>>> +
> >>>>> + SYS("ip link add tmp0 type veth peer name tmp1");
> >>>>> + SYS("ip link set tmp1 netns synproxy");
> >>>>> + SYS("ip link set tmp0 up");
> >>>>> + SYS("ip addr replace 198.18.0.1/24 dev tmp0");
> >>>>> +
> >>>>> + // When checksum offload is enabled, the XDP program sees wrong
> >>>>> + // checksums and drops packets.
> >>>>> + SYS("ethtool -K tmp0 tx off");
> >>>>
> >>>> BPF CI image doesn't have ethtool installed.
> >>>> It will take some time to get it updated. Until then we cannot land the patch set.
> >>>> Can you think of a way to run this test without shelling to ethtool?
> >>>
> >>> Good news: we got updated CI image with ethtool, so that shouldn't be
> >>> a problem anymore.
> >>>
> >>> Bad news: this selftest still fails, but in different place:
> >>>
> >>> test_synproxy:FAIL:iptables -t raw -I PREROUTING -i tmp1 -p tcp -m tcp
> >>> --syn --dport 8080 -j CT --notrack unexpected error: 512 (errno 2)
> >>
> >> That's simply a matter of missing kernel config options:
> >>
> >> CONFIG_NETFILTER_SYNPROXY=y
> >> CONFIG_NETFILTER_XT_TARGET_CT=y
> >> CONFIG_NETFILTER_XT_MATCH_STATE=y
> >> CONFIG_IP_NF_FILTER=y
> >> CONFIG_IP_NF_TARGET_SYNPROXY=y
> >> CONFIG_IP_NF_RAW=y
> >>
> >> Shall I create a pull request on github to add these options to
> >> https://github.com/libbpf/libbpf/tree/master/travis-ci/vmtest/configs?
> >>
> >
> > Yes, please. But also for [0], that's the one that tests all the
> > not-yet-applied patches
> >
> > [0] https://github.com/kernel-patches/vmtest/
>
> Created pull requests:
>
> https://github.com/kernel-patches/vmtest/pull/79
> https://github.com/libbpf/libbpf/pull/490
>
Merged both, thanks.
> >>> See [0].
> >>>
> >>> [0] https://github.com/kernel-patches/bpf/runs/6169439612?check_suite_focus=true
> >>
>
Powered by blists - more mailing lists