[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4e5e51fb-b36e-4dae-b4b4-32ab5e05f303@linux.dev>
Date: Tue, 26 Mar 2024 14:51:39 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Anton Protopopov <aspsk@...valent.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Jiri Olsa <jolsa@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>, bpf@...r.kernel.org,
Rumen Telbizov <rumen.telbizov@...losecurity.com>,
David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 bpf-next 2/3] selftests/bpf: Add BPF_FIB_LOOKUP_MARK
tests
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;
> +
Powered by blists - more mailing lists