diff options
| author | Petr Machata <petrm@nvidia.com> | 2025-09-25 19:31:44 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-26 17:48:36 -0700 |
| commit | 191c4912f9c3aff76c4e46c92f6031714607e10b (patch) | |
| tree | 7eef3b661dadfd981bcdbf7332854faf3de2c387 /tools/testing/selftests/net/forwarding | |
| parent | 9ccec266234a960c63d56fa078ec2873d05a3c16 (diff) | |
selftests: net: lib: Rename ip_link_add() to adf_*
Rename this function to mark it as autodefer.
For details, see the discussion in the cover letter.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/0b163cca1bf2ec44270e0fc89108f488d99d9c9d.1758821127.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/forwarding')
4 files changed, 21 insertions, 21 deletions
diff --git a/tools/testing/selftests/net/forwarding/bridge_activity_notify.sh b/tools/testing/selftests/net/forwarding/bridge_activity_notify.sh index a20ef4bd310b..6f7df6325da5 100755 --- a/tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +++ b/tools/testing/selftests/net/forwarding/bridge_activity_notify.sh @@ -38,7 +38,7 @@ h2_create() switch_create() { - ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \ + adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \ ageing_time "$LOW_AGEING_TIME" ip_link_set_up br1 diff --git a/tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh b/tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh index 65f74c46c2f3..d9de3ad6e162 100755 --- a/tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +++ b/tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh @@ -134,7 +134,7 @@ adf_bridge_create() { local mac - ip_link_add br up type bridge vlan_default_pvid 0 "$@" + adf_ip_link_add br up type bridge vlan_default_pvid 0 "$@" mac=$(mac_get br) adf_bridge_configure ip_link_set_addr br "$mac" @@ -142,8 +142,8 @@ adf_bridge_create() check_fdb_local_vlan_0_support() { - if ip_link_add XXbr up type bridge vlan_filtering 1 fdb_local_vlan_0 1 \ - &>/dev/null; then + if adf_ip_link_add XXbr up type bridge vlan_filtering 1 \ + fdb_local_vlan_0 1 &>/dev/null; then return 0 fi @@ -375,7 +375,7 @@ test_q_sharing() adf_addr_set_bridge_create() { - ip_link_add br up type bridge vlan_filtering 0 + adf_ip_link_add br up type bridge vlan_filtering 0 ip_link_set_addr br "$(mac_get br)" adf_bridge_configure } diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh index 462db0b603e7..503b1176d55f 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh @@ -122,11 +122,11 @@ h1_create() simple_if_init "$h1" defer simple_if_fini "$h1" - ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 + adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 ip_link_set_up "$h1.10" ip_addr_add "$h1.10" 192.0.2.1/28 - ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 + adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 ip_link_set_up "$h1.20" ip_addr_add "$h1.20" 2001:db8:1::1/64 } @@ -161,7 +161,7 @@ h2_create() ip_link_set_up "v$h2" # br2 - ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 ip_link_set_master br2 "v$h2" ip_link_set_up br2 @@ -186,7 +186,7 @@ h3_create() ip_link_set_up "v$h3" # br3 - ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 ip_link_set_master br3 "v$h3" ip_link_set_up br3 @@ -205,17 +205,17 @@ switch_create() # br1 swp1_mac=$(mac_get "$swp1") - ip_link_add br1 type bridge vlan_filtering 1 \ + adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 ip_link_set_addr br1 "$swp1_mac" ip_link_set_up br1 # A dummy to force the IPv6 OIF=0 test to install a suitable MC route on # $IPMR to be deterministic. Also used for the IPv6 RX!=TX ping test. - ip_link_add "X$IPMR" up type dummy + adf_ip_link_add "X$IPMR" up type dummy # IPMR - ip_link_add "$IPMR" up type dummy + adf_ip_link_add "$IPMR" up type dummy ip_addr_add "$IPMR" 192.0.2.100/28 ip_addr_add "$IPMR" 2001:db8:4::1/64 @@ -241,7 +241,7 @@ vx_create() local name=$1; shift local vid=$1; shift - ip_link_add "$name" up type vxlan dstport "$VXPORT" \ + adf_ip_link_add "$name" up type vxlan dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 16 \ "$@" ip_link_set_master "$name" br1 @@ -295,7 +295,7 @@ ns_init_common() ip_addr_add "$if_in" "$ipv6_in" # br1 - ip_link_add br1 type bridge vlan_filtering 1 \ + adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 ip_link_set_up br1 @@ -304,7 +304,7 @@ ns_init_common() vx20_create local "${ipv6_in%/*}" group "$GROUP6" dev "$if_in" # w1 - ip_link_add w1 type veth peer name w2 + adf_ip_link_add w1 type veth peer name w2 ip_link_set_master w1 br1 ip_link_set_up w1 bridge_vlan_add vid 10 dev w1 @@ -315,12 +315,12 @@ ns_init_common() defer simple_if_fini w2 # w2.10 - ip_link_add w2.10 master vw2 link w2 type vlan id 10 + adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10 ip_link_set_up w2.10 ip_addr_add w2.10 "$ipv4_host" # w2.20 - ip_link_add w2.20 master vw2 link w2 type vlan id 20 + adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20 ip_link_set_up w2.20 ip_addr_add w2.20 "$ipv6_host" } @@ -377,8 +377,8 @@ setup_prepare() forwarding_enable defer forwarding_restore - ip_link_add "v1$h2" type veth peer name "v2$h2" - ip_link_add "v1$h3" type veth peer name "v2$h3" + adf_ip_link_add "v1$h2" type veth peer name "v2$h2" + adf_ip_link_add "v1$h3" type veth peer name "v2$h3" h1_create h2_create diff --git a/tools/testing/selftests/net/forwarding/vxlan_reserved.sh b/tools/testing/selftests/net/forwarding/vxlan_reserved.sh index 46c31794b91b..692644c3a489 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_reserved.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_reserved.sh @@ -60,7 +60,7 @@ h1_create() switch_create() { - ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 # Make sure the bridge uses the MAC address of the local port and not # that of the VxLAN's device. ip_link_set_addr br1 $(mac_get $swp1) @@ -200,7 +200,7 @@ vxlan_ping_do() vxlan_device_add() { - ip_link_add vx1 up type vxlan id 1000 \ + adf_ip_link_add vx1 up type vxlan id 1000 \ local 192.0.2.17 dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 100 "$@" ip_link_set_master vx1 br1 |
