Skip to content

Commit 02e3549

Browse files
borkmannSasha Levin
authored andcommitted
selftests/bpf: Fix up xdp bonding test wrt feature flags
[ Upstream commit 0bfc033 ] Adjust the XDP feature flags for the bond device when no bond slave devices are attached. After 9b0ed89 ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY"), the empty bond device must report 0 as flags instead of NETDEV_XDP_ACT_MASK. # ./vmtest.sh -- ./test_progs -t xdp_bond [...] [ 3.983311] bond1 (unregistering): (slave veth1_1): Releasing backup interface [ 3.995434] bond1 (unregistering): Released all slaves [ 4.022311] bond2: (slave veth2_1): Releasing backup interface torvalds#507/1 xdp_bonding/xdp_bonding_attach:OK torvalds#507/2 xdp_bonding/xdp_bonding_nested:OK torvalds#507/3 xdp_bonding/xdp_bonding_features:OK torvalds#507/4 xdp_bonding/xdp_bonding_roundrobin:OK torvalds#507/5 xdp_bonding/xdp_bonding_activebackup:OK torvalds#507/6 xdp_bonding/xdp_bonding_xor_layer2:OK torvalds#507/7 xdp_bonding/xdp_bonding_xor_layer23:OK torvalds#507/8 xdp_bonding/xdp_bonding_xor_layer34:OK torvalds#507/9 xdp_bonding/xdp_bonding_redirect_multi:OK torvalds#507 xdp_bonding:OK Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED [ 4.185255] bond2 (unregistering): Released all slaves [...] Fixes: 9b0ed89 ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY") Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 586a2f4 commit 02e3549

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/prog_tests/xdp_bonding.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static void test_xdp_bonding_features(struct skeletons *skeletons)
511511
if (!ASSERT_OK(err, "bond bpf_xdp_query"))
512512
goto out;
513513

514-
if (!ASSERT_EQ(query_opts.feature_flags, NETDEV_XDP_ACT_MASK,
514+
if (!ASSERT_EQ(query_opts.feature_flags, 0,
515515
"bond query_opts.feature_flags"))
516516
goto out;
517517

@@ -601,7 +601,7 @@ static void test_xdp_bonding_features(struct skeletons *skeletons)
601601
if (!ASSERT_OK(err, "bond bpf_xdp_query"))
602602
goto out;
603603

604-
ASSERT_EQ(query_opts.feature_flags, NETDEV_XDP_ACT_MASK,
604+
ASSERT_EQ(query_opts.feature_flags, 0,
605605
"bond query_opts.feature_flags");
606606
out:
607607
bpf_link__destroy(link);

0 commit comments

Comments
 (0)