Re: [PATCH bpf 1/7] selftests/bpf/test_xdp_redirect_multi: use temp netns for testing

William Tu
2022-01-27T05:25:43Z

On Tue, Jan 25, 2022 at 12:17 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
>
> Use temp netns instead of hard code name for testing in case the netns
> already exists.
>
> Remove the hard code interface index when creating the veth interfaces.
> Because when the system loads some virtual interface modules, e.g. tunnels.
> the ifindex of 2 will be used and the cmd will fail.
>
> As the netns has not created if checking environment failed. Trap the
> clean up function after checking env.
>
> Fixes: 8955c1a32987 ("selftests/bpf/xdp_redirect_multi: Limit the tests in netns")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---

LGTM
Acked-by: William Tu <u9012063@gmail.com>