On 10/05/2017 16:57, Simon Horman wrote:
On Wed, May 03, 2017 at 06:08:12PM +0300, Roi Dayan wrote:
From: Paul Blakey <pa...@mellanox.com>

Usage:
    # to dump all datapath flows (default):
    ovs-dpctl dump-flows

    # to dump only flows that in kernel datapath:
    ovs-dpctl dump-flows type=ovs

    # to dump only flows that are offloaded:
    ovs-dpctl dump-flows type=offloaded

...

diff --git a/lib/dpctl.c b/lib/dpctl.c
index 11be857..f534de2 100644
--- a/lib/dpctl.c
+++ b/lib/dpctl.c

...

@@ -774,22 +775,29 @@ dpctl_dump_flows(int argc, const char *argv[], struct 
dpctl_params *dpctl_p)
     struct dpif_flow_dump *flow_dump;
     struct dpif_flow f;
     int pmd_id = PMD_ID_NULL;
+    int lastargc = 0;
     int error;

-    if (argc > 1 && !strncmp(argv[argc - 1], "filter=", 7)) {
-        filter = xstrdup(argv[--argc] + 7);
+    while (argc > 1 && lastargc != argc) {
+        lastargc = argc;
+        if (!strncmp(argv[argc - 1], "filter=", 7)) {
+            filter = xstrdup(argv[--argc] + 7);
+        } else if (!strncmp(argv[argc - 1], "type=", 5)) {
+            type = xstrdup(argv[--argc] + 5);
+        }

The above seems to have the presumably unintended side-effect of parsing
multiple filter= and type= arguments.

...


right. I see the issue. will fix. thanks
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to