On 8 Oct 2020, at 18:00, Ilya Maximets wrote:

On 10/8/20 5:50 PM, Eelco Chaudron wrote:


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:”?

It should be in Post-v2.14.0. :)
And, please, keep 2 empty lines between releases.

For the entry itself, it might look like:

   - ovs-dpctl and 'ovs-appctl dpctl/':
     * New command ...

Ack, just sent a v3.


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.

Sure.

However, I could add ‘del-flows' and, probably, 'mod-flows' which will use their perspective name as the default action?

Yes, that would be good.

Done in v3, as well as the tests suggested below.

Additionally it might make sense to add some tests to tests/dpctl.at.
Just basic things, i.e. add and del some flows with single commands
and via flows listed in some file.

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

Reply via email to