summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-05-15 17:32:32 +0300
committerIlya Maximets <i.maximets@samsung.com>2019-06-11 09:39:36 +0300
commitd74ca2269e3696b07b7876e36e776759222a9bc5 (patch)
tree63c87d699cf64ad013982d6740e4807d018c8a55
parent5fc5c50f3d9cda4512e3fc9ae7a1b6c27e342f7d (diff)
downloadopenvswitch-d74ca2269e3696b07b7876e36e776759222a9bc5.tar.gz
dpctl: Update docs about dump-flows and HW offloading.
Since introduction of dynamic flow API for netdevs, tricky accesses to uninitialized flow API are no longer possible. So, ovs-dpctl doesn't support dumping HW offloaded flows now. Claim this in docs and man pages. Additionally forbidden 'type' argument for 'ovs-dpctl dump-flows'. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Roi Dayan <roid@mellanox.com>
-rw-r--r--Documentation/faq/design.rst5
-rw-r--r--lib/dpctl.c7
-rw-r--r--lib/dpctl.man2
-rw-r--r--vswitchd/vswitch.xml5
4 files changed, 18 insertions, 1 deletions
diff --git a/Documentation/faq/design.rst b/Documentation/faq/design.rst
index 4732cb1dd..efb62a2f7 100644
--- a/Documentation/faq/design.rst
+++ b/Documentation/faq/design.rst
@@ -73,10 +73,13 @@ Q: Why are there so many different ways to dump flows?
Linux kernel-based datapath. In Open vSwitch 1.10 and later,
ovs-vswitchd merges multiple switches into a single datapath, so it will
show all the flows on all your kernel-based switches. This command can
- occasionally be useful for debugging.
+ occasionally be useful for debugging. It doesn't dump flows that was
+ offloaded to hardware.
- ``ovs-appctl dpif/dump-flows <br>``, new in Open vSwitch 1.10, dumps
datapath flows for only the specified bridge, regardless of the type.
+ Supports dumping of HW offloaded flows. See ovs-vswitchd(8) for
+ details.
Q: How does multicast snooping works with VLANs?
diff --git a/lib/dpctl.c b/lib/dpctl.c
index 9c4eb65d9..f9eb1cad3 100644
--- a/lib/dpctl.c
+++ b/lib/dpctl.c
@@ -963,6 +963,13 @@ dpctl_dump_flows(int argc, const char *argv[], struct dpctl_params *dpctl_p)
if (!strncmp(argv[argc - 1], "filter=", 7) && !filter) {
filter = xstrdup(argv[--argc] + 7);
} else if (!strncmp(argv[argc - 1], "type=", 5) && !types_list) {
+ if (!dpctl_p->is_appctl) {
+ dpctl_error(dpctl_p, 0,
+ "Invalid argument 'type'. "
+ "Use 'ovs-appctl dpctl/dump-flows' instead.");
+ error = EINVAL;
+ goto out_free;
+ }
types_list = xstrdup(argv[--argc] + 5);
}
}
diff --git a/lib/dpctl.man b/lib/dpctl.man
index 1ff351170..1eeef38a7 100644
--- a/lib/dpctl.man
+++ b/lib/dpctl.man
@@ -119,6 +119,7 @@ flow. As an example, \fBfilter='tcp,tp_src=100'\fR will match the
datapath flow containing '\fBtcp(src=80/0xff00,dst=8080/0xff)\fR'.
.IP
If \fBtype=\fItype\fR is specified, only displays flows of the specified types.
+This option supported only for \fBovs\-appctl dpctl/dump\-flows\fR.
\fItype\fR is a comma separated list, which can contain any of the following:
.
\fBovs\fR - displays flows handled in the ovs dp
@@ -128,6 +129,7 @@ If \fBtype=\fItype\fR is specified, only displays flows of the specified types.
\fBall\fR - displays all the types of flows
.IP
By default all the types of flows are displayed.
+\fBovs\-dpctl\fR always acts as if the \fBtype\fR was \fIovs\fR.
.
.IP "\*(DX\fBadd\-flow\fR [\fIdp\fR] \fIflow actions\fR"
.TP
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 89c06a1b7..bf4b6f8dc 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -208,6 +208,11 @@
available, Open vSwitch may not be able to offload
functionality to hardware.
</p>
+ <p>
+ In order to dump HW offloaded flows use
+ <code>ovs-appctl dpctl/dump-flows</code>, <code>ovs-dpctl</code>
+ doesn't support this functionality. See ovs-vswitchd(8) for details.
+ </p>
</column>
<column name="other_config" key="tc-policy"