On 11/11/2019 3:01 PM, Ilya Maximets wrote:
DPDK commit 660098d61f57 ("pdump: use generic multi-process channel")
switched pdump to use generic DPDK IPC instead of sockets.
Old API was deprecated and removed.  Updating OVS code accordingly.

Signed-off-by: Ilya Maximets <[email protected]>

Thanks for the patch Ilya.

I see compilation passing now on dpdk-latest with this applied.

https://travis-ci.org/istokes/ovs/builds/610915636

I still had issues with running PDUMP, but those issues are specific to PDUMP setup in my environment. A separate issue we can discuss further on the deprecation thread as it seems unrelated to this patch.

@David, are you happy to ack the patch (I see some of the changes are from your side).

Thanks
Ian
---

Version 3:
   * Added note about XDG_RUNTIME_DIR.

Version 2:
   * Removed unneeded deinitialization on error.
   * Docs updated.

  Documentation/topics/dpdk/pdump.rst | 13 +++++++------
  lib/dpdk.c                          | 11 +----------
  2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/Documentation/topics/dpdk/pdump.rst 
b/Documentation/topics/dpdk/pdump.rst
index 7bd1d3e9f..affd98371 100644
--- a/Documentation/topics/dpdk/pdump.rst
+++ b/Documentation/topics/dpdk/pdump.rst
@@ -41,8 +41,7 @@ To use pdump, simply launch OVS as usual, then navigate to 
the ``app/pdump``
  directory in DPDK, ``make`` the application and run like so::
$ sudo ./build/app/dpdk-pdump -- \
-        --pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap \
-        --server-socket-path=/usr/local/var/run/openvswitch
+        --pdump port=0,queue=0,rx-dev=/tmp/pkts.pcap
The above command captures traffic received on queue 0 of port 0 and stores it
  in ``/tmp/pkts.pcap``. Other combinations of port numbers, queues numbers and
@@ -50,11 +49,13 @@ pcap locations are of course also available to use. For 
example, to capture all
  packets that traverse port 0 in a single pcap file::
$ sudo ./build/app/dpdk-pdump -- \
-        --pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-dev=/tmp/pkts.pcap' \
-        --server-socket-path=/usr/local/var/run/openvswitch
+        --pdump 'port=0,queue=*,rx-dev=/tmp/pkts.pcap,tx-dev=/tmp/pkts.pcap'
-``server-socket-path`` must be set to the value of ``ovs_rundir()`` which
-typically resolves to ``/usr/local/var/run/openvswitch``.
+.. note::
+
+   ``XDG_RUNTIME_DIR`` environment variable might need to be adjusted to
+   OVS runtime directory (``/var/run/openvswitch`` in most cases) for
+   ``dpdk-pdump`` utility if OVS started by non-root user.
Many tools are available to view the contents of the pcap file. Once example is
  tcpdump. Issue the following command to view the contents of ``pkts.pcap``::
diff --git a/lib/dpdk.c b/lib/dpdk.c
index f90cda75a..748f63d31 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -27,7 +27,6 @@
  #include <rte_memzone.h>
  #include <rte_version.h>
  #ifdef DPDK_PDUMP
-#include <rte_mempool.h>
  #include <rte_pdump.h>
  #endif
@@ -434,17 +433,9 @@ dpdk_init__(const struct smap *ovs_other_config) #ifdef DPDK_PDUMP
      VLOG_INFO("DPDK pdump packet capture enabled");
-    err = rte_pdump_init(ovs_rundir());
+    err = rte_pdump_init();
      if (err) {
          VLOG_INFO("Error initialising DPDK pdump");
-        rte_pdump_uninit();
-    } else {
-        char *server_socket_path;
-
-        server_socket_path = xasprintf("%s/%s", ovs_rundir(),
-                                       "pdump_server_socket");
-        fatal_signal_add_file_to_unlink(server_socket_path);
-        free(server_socket_path);
      }
  #endif
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to