Lines Matching full:bond
7 * and verifies that XDP_TX program loaded on a bond device
149 SYS(fail, "ip link add bond1 type bond mode %s xmit_hash_policy %s", in bonding_setup()
152 SYS(fail, "ip -netns ns_dst link add bond2 type bond mode %s xmit_hash_policy %s", in bonding_setup()
329 * to neither the ingress bond device (bond2) or its slave (veth2_1).
379 /* Test that XDP programs cannot be attached to both the bond master and slaves simultaneously */
384 int veth, bond, err; in test_xdp_bonding_attach() local
388 if (!ASSERT_OK(system("ip link add bond type bond"), "add bond")) in test_xdp_bonding_attach()
394 bond = if_nametoindex("bond"); in test_xdp_bonding_attach()
395 if (!ASSERT_GE(bond, 0, "if_nametoindex bond")) in test_xdp_bonding_attach()
403 err = system("ip link set veth master bond"); in test_xdp_bonding_attach()
416 link2 = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach()
424 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach()
441 err = system("ip link set vxlan master bond"); in test_xdp_bonding_attach()
446 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_attach()
455 system("ip link del bond"); in test_xdp_bonding_attach()
463 int bond, err; in test_xdp_bonding_nested() local
465 if (!ASSERT_OK(system("ip link add bond type bond"), "add bond")) in test_xdp_bonding_nested()
468 bond = if_nametoindex("bond"); in test_xdp_bonding_nested()
469 if (!ASSERT_GE(bond, 0, "if_nametoindex bond")) in test_xdp_bonding_nested()
472 if (!ASSERT_OK(system("ip link add bond_nest1 type bond"), "add bond_nest1")) in test_xdp_bonding_nested()
475 err = system("ip link set bond_nest1 master bond"); in test_xdp_bonding_nested()
479 if (!ASSERT_OK(system("ip link add bond_nest2 type bond"), "add bond_nest1")) in test_xdp_bonding_nested()
486 link = bpf_program__attach_xdp(skeletons->xdp_dummy->progs.xdp_dummy_prog, bond); in test_xdp_bonding_nested()
491 system("ip link del bond"); in test_xdp_bonding_nested()
502 if (!ASSERT_OK(system("ip link add bond type bond"), "add bond")) in test_xdp_bonding_features()
505 bond_idx = if_nametoindex("bond"); in test_xdp_bonding_features()
506 if (!ASSERT_GE(bond_idx, 0, "if_nametoindex bond")) in test_xdp_bonding_features()
509 /* query default xdp-feature for bond device */ in test_xdp_bonding_features()
511 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
515 "bond query_opts.feature_flags")) in test_xdp_bonding_features()
526 if (!ASSERT_OK(system("ip link set veth0 master bond"), in test_xdp_bonding_features()
527 "add veth0 to master bond")) in test_xdp_bonding_features()
530 /* xdp-feature for bond device should be obtained from the single slave in test_xdp_bonding_features()
534 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
540 "bond query_opts.feature_flags")) in test_xdp_bonding_features()
554 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
561 "bond query_opts.feature_flags")) in test_xdp_bonding_features()
564 if (!ASSERT_OK(system("ip link set veth2 master bond"), in test_xdp_bonding_features()
565 "add veth2 to master bond")) in test_xdp_bonding_features()
569 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
572 /* xdp-feature for bond device should be set to the most restrict in test_xdp_bonding_features()
578 "bond query_opts.feature_flags")) in test_xdp_bonding_features()
582 "del veth2 to master bond")) in test_xdp_bonding_features()
586 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
593 "bond query_opts.feature_flags")) in test_xdp_bonding_features()
597 "del veth0 to master bond")) in test_xdp_bonding_features()
601 if (!ASSERT_OK(err, "bond bpf_xdp_query")) in test_xdp_bonding_features()
605 "bond query_opts.feature_flags"); in test_xdp_bonding_features()
610 system("ip link del bond"); in test_xdp_bonding_features()