On 30 Sep 2020, at 15:06, Aaron Conole wrote:
"Eelco Chaudron" <[email protected]> writes:
On 22 Sep 2020, at 15:21, Aaron Conole wrote:
Eelco Chaudron <[email protected]> writes:
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]>
---
It may be worth mentioning this in NEWS.
Good suggestion, will send out a v2 later.
Also, 'ovs-ofctl add-flows' is subtly different - there is the
possibility to do a single transaction with 'ovs-ofctl add-flows',
but this corresponding command cannot do that. I guess that might
be
what is intended by:
All flow mods are executed in the order specified.
in the manpage.
Not sure what you mean with single transaction? The following does
work:
echo "in_port(0),eth(),eth_type(0x800),ipv4(src=100.1.0.2) 0" |
ovs-dpctl add-flows test -
IIRC, all the flow rules can be added as part of a single openflow
transaction with ovs-ofctl. So multiple flow rules will be committed
at
exactly the same time (--bundle, etc).
This command will only ever do 1 at a time. That's okay, but maybe
it's
worth pointing out this difference.
Thanks Aaron, yes this was on purpose. I’ve updated the help text to
the following:
All flow modifications are executed as individual transactions in the
order specified.
Will sent out a v2 soon…
//Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev