]> www.infradead.org Git - users/hch/misc.git/commitdiff
selftests: net: lib: Rename ip_addr_add() to adf_*
authorPetr Machata <petrm@nvidia.com>
Thu, 25 Sep 2025 17:31:49 +0000 (19:31 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Sep 2025 00:48:38 +0000 (17:48 -0700)
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/706327a5db660c7f18ba9fbfba7ce913da065e3e.1758821127.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh
tools/testing/selftests/net/forwarding/vxlan_reserved.sh
tools/testing/selftests/net/lib.sh

index 202eee16ac193a85bb14a8005f7eb26f329e5122..868f2fa5f9d2492a00b03b3363609edb4c57caa9 100755 (executable)
@@ -82,8 +82,8 @@ switch_create()
 
        adf_ip_link_set_up "$swp2"
 
-       ip_addr_add "$swp3" 192.0.2.17/28
-       ip_addr_add "$swp3" 2001:db8:2::1/64
+       adf_ip_addr_add "$swp3" 192.0.2.17/28
+       adf_ip_addr_add "$swp3" 2001:db8:2::1/64
        adf_ip_link_set_up "$swp3"
 }
 
@@ -115,8 +115,8 @@ adf_bridge_configure()
 {
        local dev
 
-       ip_addr_add br 192.0.2.3/28
-       ip_addr_add br 2001:db8:1::3/64
+       adf_ip_addr_add br 192.0.2.3/28
+       adf_ip_addr_add br 2001:db8:1::3/64
 
        bridge_vlan_add dev br vid 1 pvid untagged self
        bridge_vlan_add dev br vid 2 self
index 20366c61944e4594e08227b3af28eb1789f517e2..091833541b06e8c33e0a53b3e5631778370198a6 100755 (executable)
@@ -124,11 +124,11 @@ h1_create()
 
        adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10
        adf_ip_link_set_up "$h1.10"
-       ip_addr_add "$h1.10" 192.0.2.1/28
+       adf_ip_addr_add "$h1.10" 192.0.2.1/28
 
        adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20
        adf_ip_link_set_up "$h1.20"
-       ip_addr_add "$h1.20" 2001:db8:1::1/64
+       adf_ip_addr_add "$h1.20" 2001:db8:1::1/64
 }
 
 install_capture()
@@ -216,8 +216,8 @@ switch_create()
 
        # IPMR
        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
+       adf_ip_addr_add "$IPMR" 192.0.2.100/28
+       adf_ip_addr_add "$IPMR" 2001:db8:4::1/64
 
        # $swp1
        adf_ip_link_set_up "$swp1"
@@ -227,13 +227,13 @@ switch_create()
 
        # $swp2
        adf_ip_link_set_up "$swp2"
-       ip_addr_add "$swp2" 192.0.2.33/28
-       ip_addr_add "$swp2" 2001:db8:2::1/64
+       adf_ip_addr_add "$swp2" 192.0.2.33/28
+       adf_ip_addr_add "$swp2" 2001:db8:2::1/64
 
        # $swp3
        adf_ip_link_set_up "$swp3"
-       ip_addr_add "$swp3" 192.0.2.65/28
-       ip_addr_add "$swp3" 2001:db8:3::1/64
+       adf_ip_addr_add "$swp3" 192.0.2.65/28
+       adf_ip_addr_add "$swp3" 2001:db8:3::1/64
 }
 
 vx_create()
@@ -291,8 +291,8 @@ ns_init_common()
 
        # v2$h2 / v2$h3
        adf_ip_link_set_up "$if_in"
-       ip_addr_add "$if_in" "$ipv4_in"
-       ip_addr_add "$if_in" "$ipv6_in"
+       adf_ip_addr_add "$if_in" "$ipv4_in"
+       adf_ip_addr_add "$if_in" "$ipv6_in"
 
        # br1
        adf_ip_link_add br1 type bridge vlan_filtering 1 \
@@ -317,12 +317,12 @@ ns_init_common()
        # w2.10
        adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10
        adf_ip_link_set_up w2.10
-       ip_addr_add w2.10 "$ipv4_host"
+       adf_ip_addr_add w2.10 "$ipv4_host"
 
        # w2.20
        adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20
        adf_ip_link_set_up w2.20
-       ip_addr_add w2.20 "$ipv6_host"
+       adf_ip_addr_add w2.20 "$ipv6_host"
 }
 export -f ns_init_common
 
@@ -720,7 +720,7 @@ ipv4_mcroute_fdb_oif0_sep()
 {
        adf_install_sg_sep
 
-       ip_addr_add lo 192.0.2.120/28
+       adf_ip_addr_add lo 192.0.2.120/28
        vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
        bridge fdb del dev vx10 00:00:00:00:00:00
        bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
@@ -731,7 +731,7 @@ ipv4_mcroute_fdb_oif0_sep_rx()
 {
        adf_install_sg_sep_rx lo
 
-       ip_addr_add lo 192.0.2.120/28
+       adf_ip_addr_add lo 192.0.2.120/28
        vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
        bridge fdb del dev vx10 00:00:00:00:00:00
        bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
@@ -742,7 +742,7 @@ ipv4_mcroute_fdb_sep_rx()
 {
        adf_install_sg_sep_rx lo
 
-       ip_addr_add lo 192.0.2.120/28
+       adf_ip_addr_add lo 192.0.2.120/28
        vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
        bridge fdb del dev vx10 00:00:00:00:00:00
        bridge fdb add \
@@ -754,7 +754,7 @@ ipv6_mcroute_fdb_sep_rx()
 {
        adf_install_sg_sep_rx "X$IPMR"
 
-       ip_addr_add "X$IPMR" 2001:db8:5::1/64
+       adf_ip_addr_add "X$IPMR" 2001:db8:5::1/64
        vx20_create_wait local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute
        bridge -6 fdb del dev vx20 00:00:00:00:00:00
        bridge -6 fdb add dev vx20 00:00:00:00:00:00 \
index c7d17fff95759a972a28ff0c5c1ce67d52632920..a726a9a9eb65747746c85347af39f79d42246dec 100755 (executable)
@@ -67,7 +67,7 @@ switch_create()
        adf_ip_link_set_up br1
 
        adf_ip_link_set_up $rp1
-       ip_addr_add $rp1 192.0.2.17/28
+       adf_ip_addr_add $rp1 192.0.2.17/28
        ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18
 
        adf_ip_link_set_master $swp1 br1
index 98c62ff4bccf3b5f318e72c0f5f6c989f58ef65e..70331c3baa4788738915c73d968152dd3b335df9 100644 (file)
@@ -605,7 +605,7 @@ adf_ip_link_set_down()
        fi
 }
 
-ip_addr_add()
+adf_ip_addr_add()
 {
        local name=$1; shift