From: Martin KaFai Lau <martin.lau@linux.dev>
To: Anton Protopopov <aspsk@isovalent.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jiri Olsa <jolsa@kernel.org>, Stanislav Fomichev <sdf@google.com>,
bpf@vger.kernel.org,
Rumen Telbizov <rumen.telbizov@menlosecurity.com>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next 2/3] selftests/bpf: Add BPF_FIB_LOOKUP_MARK tests
Date: Tue, 26 Mar 2024 14:51:39 -0700 [thread overview]
Message-ID: <4e5e51fb-b36e-4dae-b4b4-32ab5e05f303@linux.dev> (raw)
In-Reply-To: <20240326101742.17421-3-aspsk@isovalent.com>
On 3/26/24 3:17 AM, Anton Protopopov wrote:
> + { .desc = "IPv4 policy routing, mark points to a policy, but no flag",
> + .daddr = IPV4_REMOTE_DST, .expected_ret = BPF_FIB_LKUP_RET_SUCCESS,
> + .expected_dst = IPV4_GW1,
> + .lookup_flags = BPF_FIB_LOOKUP_SKIP_NEIGH,
> + .mark = MARK, },
[ ... ]
> + { .desc = "IPv6 policy routing, mark points to a policy, but no flag",
> + .daddr = IPV6_REMOTE_DST, .expected_ret = BPF_FIB_LKUP_RET_SUCCESS,
> + .expected_dst = IPV6_GW1,
> + .lookup_flags = BPF_FIB_LOOKUP_SKIP_NEIGH,
> + .mark = MARK, },
> };
[ ... ]
> @@ -159,6 +221,9 @@ static int set_lookup_params(struct bpf_fib_lookup *params, const struct fib_loo
> params->ifindex = ifindex;
> params->tbid = test->tbid;
>
> + if (test->lookup_flags & BPF_FIB_LOOKUP_MARK)
Removed this "& BPF_FIB_LOOKUP_MARK" test. Always set the params->mark
regardless of test->lookup_flags. This should be the intention of the above "...
mark points to a policy, but no flag" tests.
Applied. Thanks.
> + params->mark = test->mark;
> +
next prev parent reply other threads:[~2024-03-26 21:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 10:17 [PATCH v2 bpf-next 0/3] BPF: support mark in bpf_fib_lookup Anton Protopopov
2024-03-26 10:17 ` [PATCH v2 bpf-next 1/3] bpf: add support for passing mark with bpf_fib_lookup Anton Protopopov
2024-03-26 10:17 ` [PATCH v2 bpf-next 2/3] selftests/bpf: Add BPF_FIB_LOOKUP_MARK tests Anton Protopopov
2024-03-26 21:51 ` Martin KaFai Lau [this message]
2024-03-26 10:17 ` [PATCH v2 bpf-next 3/3] bpf: add a check for struct bpf_fib_lookup size Anton Protopopov
2024-03-26 21:50 ` [PATCH v2 bpf-next 0/3] BPF: support mark in bpf_fib_lookup patchwork-bot+netdevbpf
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=4e5e51fb-b36e-4dae-b4b4-32ab5e05f303@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=aspsk@isovalent.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dsahern@kernel.org \
--cc=jolsa@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rumen.telbizov@menlosecurity.com \
--cc=sdf@google.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