On 8 Oct 2020, at 17:43, Ilya Maximets wrote:

On 10/1/20 3:37 PM, Eelco Chaudron wrote:
When you would like to add, modify, or delete a lot of flows in the
datapath, for example when you want to measure performance, adding
one flow at the time won't scale. This as it takes a decent amount
of time to set up the datapath connection.

This new command is in-line with the same command available in
ovs-ofctl which allows the same thing, with the only difference that
we do not verify all lines before we start execution. This allows for
a continuous add/delete stream. For example with a command like this:

python3 -c 'while True:
  for i in range(0, 1000):
print("add in_port(0),eth(),eth_type(0x800),ipv4(src=100.1.{}.{}) 1".format(int(i / 256), i % 256))
  for i in range(0, 1000):
print("delete in_port(0),eth(),eth_type(0x800),ipv4(src=100.1.{}.{})".format(int(i / 256), i % 256))' \
|  sudo utilities/ovs-dpctl add-flows -


Signed-off-by: Eelco Chaudron <[email protected]>
---
v2: - Added change to NEWS
    - Updated man page to be more clear

 NEWS                  |    3 +
lib/dpctl.c | 179 ++++++++++++++++++++++++++++++++++++++++++++-----
 lib/dpctl.man         |   11 +++
 utilities/ovs-dpctl.c |    5 +
 4 files changed, 177 insertions(+), 21 deletions(-)

diff --git a/NEWS b/NEWS
index 015facff5..93909ab07 100644
--- a/NEWS
+++ b/NEWS
@@ -35,7 +35,8 @@ Post-v2.13.0
    - Tunnels: TC Flower offload
      * Tunnel Local endpoint address masked match are supported.
      * Tunnel Romte endpoint address masked match are supported.
-
+ - 'ovs-dpctl add-flows' command has been added which allows adding, + deleting, or modifying flows based on information read from a file.

This in a wrong section.

Guess it should be in  “Linux datapath:”?

Anyway, this looks a bit wierd that in order to delete flows I need to
run 'add-flows' with 'delete' argument.
IIUC, ability to add/remove/modify flows within single add-flows command
of ovs-ofclt was added to utilize OF1.4 --bundle support, i.e. to make
such modifications atomically. So, this is additional functionality, not the basic one. This is a bit annoying that I can not delete flows using
the same file that I used for addition.  Basic commands are missing.
Maybe it's better to add 'del-flows' and, probably, 'mod-flows' commands
so it will be easier to use?

I still would like to do add/delete/mod in a single file, as it will help testing. However, I could add ‘del-flows' and, probably, 'mod-flows' which will use their perspective name as the default action?

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to