test suite reviews and discussions
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: dts@dpdk.org
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: [PATCH] Replace brctl command with ip
Date: Sat, 03 Feb 2024 19:25:56 +0900	[thread overview]
Message-ID: <20240203-brctl-v1-1-e3dbcc8f2152@daynix.com> (raw)

README of bridge-utils v1.7.1 says:
> This utility is DEPRECATED. No new features will ever be added.
> Instead use the bridge command from the iproute2 package which
> supports more features.
https://git.kernel.org/pub/scm/network/bridge/bridge-utils.git/tree/README?h=v1.7.1

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 framework/qemu_kvm.py                       | 2 +-
 framework/qemu_libvirt.py                   | 2 +-
 test_plans/sriov_kvm_test_plan.rst          | 2 +-
 test_plans/vf_port_start_stop_test_plan.rst | 2 +-
 tests/TestSuite_ip_pipeline.py              | 6 +++---
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index b656675c..7f6df7c2 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -68,7 +68,7 @@ class QEMUKvm(VirtBase):
         + "   tunctl -t $1\n"
         + "   ip link set $1 up\n"
         + "   sleep 0.5s\n"
-        + "   brctl addif $switch $1\n"
+        + "   ip link set $1 master $switch\n"
         + "   exit 0\n"
         + "else\n"
         + "   echo 'Error: no interface specified'\n"
diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py
index e99ce8fb..22214481 100644
--- a/framework/qemu_libvirt.py
+++ b/framework/qemu_libvirt.py
@@ -30,7 +30,7 @@ class LibvirtKvm(VirtBase):
         + "   tunctl -t $1\n"
         + "   ip link set $1 up\n"
         + "   sleep 0.5s\n"
-        + "   brctl addif $switch $1\n"
+        + "   ip link set $1 master $switch\n"
         + "   exit 0\n"
         + "else\n"
         + "   echo 'Error: no interface specified'\n"
diff --git a/test_plans/sriov_kvm_test_plan.rst b/test_plans/sriov_kvm_test_plan.rst
index c9085dd9..42d3c059 100644
--- a/test_plans/sriov_kvm_test_plan.rst
+++ b/test_plans/sriov_kvm_test_plan.rst
@@ -47,7 +47,7 @@ The /etc/qemu-ifup can be below script, need you to create first::
         /usr/sbin/tunctl -u `whoami` -t $1
         /sbin/ip link set $1 up
         sleep 0.5s
-        /usr/sbin/brctl addif $switch $1
+        /sbin/ip link set $1 master $switch
         exit 0
     else
         echo "Error: no interface specified"
diff --git a/test_plans/vf_port_start_stop_test_plan.rst b/test_plans/vf_port_start_stop_test_plan.rst
index 502afa6c..618fcb99 100644
--- a/test_plans/vf_port_start_stop_test_plan.rst
+++ b/test_plans/vf_port_start_stop_test_plan.rst
@@ -72,7 +72,7 @@ Create Two VF interfaces from two kernel PF interfaces, and then attach them to
           /usr/sbin/tunctl -u `whoami` -t $1
           /sbin/ip link set $1 up
           sleep 0.5s
-          /usr/sbin/brctl addif $switch $1
+          /sbin/ip link set $1 master $switch
           exit 0
       else
           echo "Error: no interface specified"
diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py
index 19b297de..44dfaf5f 100644
--- a/tests/TestSuite_ip_pipeline.py
+++ b/tests/TestSuite_ip_pipeline.py
@@ -832,9 +832,9 @@ class TestIpPipeline(TestCase):
         self.dut.send_expect(cmd, "fwd port 3", 60)
 
         tap_session = self.dut.new_session()
-        cmd = "ip link set br1 down; brctl delbr br1"
+        cmd = "ip link set br1 down; ip link delete br1"
         tap_session.send_expect(cmd, "# ", 20)
-        cmd = "brctl addbr br1; brctl addif br1 TAP0; brctl addif br1 TAP1"
+        cmd = "ip link add br1 type bridge; ip link set TAP0 master br1; ip link set TAP1 master br1"
         tap_session.send_expect(cmd, "# ", 20)
         cmd = "ifconfig TAP0 up;  ifconfig TAP1 up; ifconfig br1 up"
         tap_session.send_expect(cmd, "# ", 20)
@@ -874,7 +874,7 @@ class TestIpPipeline(TestCase):
         cmd = "^C"
         self.dut.send_expect(cmd, "# ", 20)
 
-        cmd = "ip link set br1 down; brctl delbr br1"
+        cmd = "ip link set br1 down; ip link delete br1"
         tap_session.send_expect(cmd, "# ", 20)
         self.dut.close_session(tap_session)
 

---
base-commit: 427e7c3f37bbb1263d81c466d7a83e9193013321
change-id: 20240203-brctl-8fdbef4c69be

Best regards,
-- 
Akihiko Odaki <akihiko.odaki@daynix.com>


                 reply	other threads:[~2024-02-03 10:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240203-brctl-v1-1-e3dbcc8f2152@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).