On Thu, Mar 6, 2025 at 4:10 AM Jun Wang <junwan...@cestc.cn> wrote:
>
> >diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
> >index 187eafdf25..2070678b3a 100755
> >--- a/utilities/ovs-tcpdump.in
> >+++ b/utilities/ovs-tcpdump.in
> >@@ -421,13 +421,16 @@ def py_which(executable):
> >                for path in os.environ["PATH"].split(os.pathsep))
> >-def teardown(db_sock, interface, mirror_interface, tap_created):
> >+def teardown(db_sock, interface, mirror_interface, tap_created,
> >+             created_mirror):
> >     def cleanup_mirror():
> >         try:
> >             ovsdb = OVSDB(db_sock)
> >             ovsdb.destroy_mirror(interface, ovsdb.port_bridge(interface))
> >-            ovsdb.destroy_port(mirror_interface, 
> >ovsdb.port_bridge(interface))
> >-            if tap_created is True:
> >+            if created_mirror:
> >+                ovsdb.destroy_port(mirror_interface,
> >+                                   ovsdb.port_bridge(interface))
> >+            if tap_created:
> >                 _del_taps[sys.platform](mirror_interface)
> >         except Exception:
> >             print("Unable to tear down the ports and mirrors.")
> >@@ -505,15 +508,21 @@ def main():
> >         if sys.platform in _make_mirror_name:
> >             mirror_interface = _make_mirror_name[sys.platform](interface)
> >+    created_mirror = True
> >     if sys.platform in _make_taps and \
> >-       mirror_interface not in interfaces():
> >+       mirror_interface not in interfaces() and \
> >+       not ovsdb.port_exists(mirror_interface):
> >         _make_taps[sys.platform](mirror_interface,
> >                                  ovsdb.interface_mtu(interface))
> >         tap_created = True
> >     else:
> >+        if mirror_interface in interfaces() or \
> >+           ovsdb.port_exists(mirror_interface):
> >+            created_mirror = False
> >         tap_created = False
> >-    if mirror_interface not in interfaces():
> >+    if mirror_interface not in interfaces() and \
> >+       not ovsdb.port_exists(mirror_interface):
> >         print("ERROR: Please create an interface called `%s`" %
> >               mirror_interface)
> >         print("See your OS guide for how to do this.")
> >@@ -524,15 +533,12 @@ def main():
> >     if not ovsdb.port_exists(interface):
> >         print("ERROR: Port %s does not exist." % interface)
> >         sys.exit(1)
> >-    if ovsdb.port_exists(mirror_interface):
> >-        print("ERROR: Mirror port (%s) exists for port %s." %
> >-              (mirror_interface, interface))
> >-        sys.exit(1)
> >-    teardown(db_sock, interface, mirror_interface, tap_created)
> >+    teardown(db_sock, interface, mirror_interface, tap_created, 
> >created_mirror)
> >     try:
> >-        ovsdb.make_port(mirror_interface, ovsdb.port_bridge(interface))
> >+        if created_mirror:
> >+            ovsdb.make_port(mirror_interface, ovsdb.port_bridge(interface))
> >         ovsdb.bridge_mirror(interface, mirror_interface,
> >                             ovsdb.port_bridge(interface),
> >                             mirror_select_all, mirror_filter=mirror_filter)
>
> Hi, I conducted a detailed verification and comparison. I sent 20G of TCP 
> traffic to OVS-DPDK.

Hello Jun,

Are the 20G, 17G, and 11G figures a speed? Or the volume of data sent?
How are you measuring this?

DPDK can be very sensitive to which numa node, or even core a PMD is
running on. But I don't know what is causing this issue specifically.

Cheers,
M

>
> When capturing directly on the vhost-user interface using:
>
>     ovs-tcpdump -i vh-userclient-08a1f95c-3b -w test.pcap
>
> the performance dropped to around 17G.
>
> However, unfortunately, when using mirror-to to a virtio-user interface:
>
>     ovs-tcpdump -i vh-userclient-08a1f95c-3b --mirror-to veth1 -w test.pcap
>
> the performance dropped significantly to around 11G.
>
> This is quite strange. I'm not sure if the performance drop is caused by the 
> mirroring mechanism itself. Any thoughts?
>
>
> ________________________________
> Jun Wang
>
>
>

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to