diff mbox series

[ovs-dev,v4] ovs-ofctl:'--bundle' option can be used with OpenFlow 1.3

Message ID 2022110414235782861616@chinatelecom.cn
State Changes Requested
Headers show
Series [ovs-dev,v4] ovs-ofctl:'--bundle' option can be used with OpenFlow 1.3 | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

yangchang Nov. 4, 2022, 6:23 a.m. UTC
From the commit 25070e045e, bundle option can be used with OpenFlow 1.3

Signed-off-by: yangchang <yangchang@chinatelecom.cn>
Acked-by: Mike Pattrick <mkp@redhat.com>
---
 utilities/ovs-ofctl.8.in | 10 +++++-----
 utilities/ovs-save       |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

--
2.27.0.windows.1


yangchang@chinatelecom.cn

Comments

Mike Pattrick May 25, 2023, 1:54 p.m. UTC | #1
On Fri, Nov 4, 2022 at 2:24 AM yangchang <yangchang@chinatelecom.cn> wrote:
>
> From the commit 25070e045e, bundle option can be used with OpenFlow 1.3
>
> Signed-off-by: yangchang <yangchang@chinatelecom.cn>

Re-adding an explicit ack. From a quick search, it looks like bundles
weren't included in the original OF1.3 spec, but were included in
EXT-230.

The support exists in ofp-bundle.c for OFP13_VERSION, though, the
error message is a little confusing: "bundles need OpenFlow 1.3 or
later ('-O OpenFlow14')"

Acked-by: Mike Pattrick <mkp@redhat.com>

Cheers,
MKP

> ---
>  utilities/ovs-ofctl.8.in | 10 +++++-----
>  utilities/ovs-save       |  6 +++---
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
> index 10a6a64de..953609bfd 100644
> --- a/utilities/ovs-ofctl.8.in
> +++ b/utilities/ovs-ofctl.8.in
> @@ -1315,7 +1315,7 @@ well as cookie values and table IDs if they are zero.
>  Do not execute read/write commands.
>  .
>  .IP "\fB\-\-bundle\fR"
> -Execute flow mods as an OpenFlow 1.4 atomic bundle transaction.
> +Execute flow mods as an OpenFlow 1.3 atomic bundle transaction.
>  .RS
>  .IP \(bu
>  Within a bundle, all flow mods are processed in the order they appear
> @@ -1327,15 +1327,15 @@ the transaction, or after all the flow mods in the bundle have been
>  successfully applied.
>  .IP \(bu
>  The beginning and the end of the flow table modification commands in a
> -bundle are delimited with OpenFlow 1.4 bundle control messages, which
> +bundle are delimited with OpenFlow 1.3 bundle control messages, which
>  makes it possible to stream the included commands without explicit
>  OpenFlow barriers, which are otherwise used after each flow table
>  modification command.  This may make large modifications execute
>  faster as a bundle.
>  .IP \(bu
> -Bundles require OpenFlow 1.4 or higher.  An explicit \fB-O
> -OpenFlow14\fR option is not needed, but you may need to enable
> -OpenFlow 1.4 support for OVS by setting the OVSDB \fIprotocols\fR
> +Bundles require OpenFlow 1.3 or higher.  An explicit \fB-O
> +OpenFlow13\fR option is not needed, but you may need to enable
> +OpenFlow 1.3 support for OVS by setting the OVSDB \fIprotocols\fR
>  column in the \fIbridge\fR table.
>  .RE
>  .
> diff --git a/utilities/ovs-save b/utilities/ovs-save
> index 67092ecf7..2efd82c78 100755
> --- a/utilities/ovs-save
> +++ b/utilities/ovs-save
> @@ -102,7 +102,7 @@ save_interfaces () {
>  get_highest_ofp_version() {
>      ovs-vsctl get bridge "$1" protocols | \
>          sed 's/[][]//g' | sed 's/\ //g' | \
> -            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow14" }'
> +            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow13" }'
>  }
>
>  save_flows () {
> @@ -133,8 +133,8 @@ save_flows () {
>               cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
>          echo "'"
>
> -        # If possible use OpenFlow 1.4 atomic bundle txn for flows and groups
> -        [ ${ofp_version#OpenFlow} -ge 14 ] && bundle=" --bundle" || bundle=""
> +        # If possible use OpenFlow 1.3 atomic bundle txn for flows and groups
> +        [ ${ofp_version#OpenFlow} -ge 13 ] && bundle=" --bundle" || bundle=""
>
>          echo "ovs-ofctl -O $ofp_version add-groups ${bridge} \
>                \"$workdir/$bridge.groups.dump\" ${bundle}"
> --
> 2.27.0.windows.1
>
>
> yangchang@chinatelecom.cn
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ilya Maximets Oct. 10, 2023, 1:29 p.m. UTC | #2
On 5/25/23 15:54, Mike Pattrick wrote:
> On Fri, Nov 4, 2022 at 2:24 AM yangchang <yangchang@chinatelecom.cn> wrote:
>>
>> From the commit 25070e045e, bundle option can be used with OpenFlow 1.3
>>
>> Signed-off-by: yangchang <yangchang@chinatelecom.cn>
> 
> Re-adding an explicit ack. From a quick search, it looks like bundles
> weren't included in the original OF1.3 spec, but were included in
> EXT-230.

The main issue with this change is that this should be specified in
the documentation, we can't use phrases as 'OpenFlow 1.3 atomic bundle',
because there is no such thing as 'OpenFlow 1.3 atomic bundle'.
Documents should explicitly state which exact type of a message is used,
if it is an extension - what kind of extension is in use in any particular
version.  OFPRAW_OFPT14_BUNDLE_CONTROL and OFPRAW_ONFT13_BUNDLE_CONTROL
are different types of messages, even if the payload is the same.

Best regards, Ilya Maximets.

> 
> The support exists in ofp-bundle.c for OFP13_VERSION, though, the
> error message is a little confusing: "bundles need OpenFlow 1.3 or
> later ('-O OpenFlow14')"
> 
> Acked-by: Mike Pattrick <mkp@redhat.com>
> 
> Cheers,
> MKP
> 
>> ---
>>  utilities/ovs-ofctl.8.in | 10 +++++-----
>>  utilities/ovs-save       |  6 +++---
>>  2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
>> index 10a6a64de..953609bfd 100644
>> --- a/utilities/ovs-ofctl.8.in
>> +++ b/utilities/ovs-ofctl.8.in
>> @@ -1315,7 +1315,7 @@ well as cookie values and table IDs if they are zero.
>>  Do not execute read/write commands.
>>  .
>>  .IP "\fB\-\-bundle\fR"
>> -Execute flow mods as an OpenFlow 1.4 atomic bundle transaction.
>> +Execute flow mods as an OpenFlow 1.3 atomic bundle transaction.
>>  .RS
>>  .IP \(bu
>>  Within a bundle, all flow mods are processed in the order they appear
>> @@ -1327,15 +1327,15 @@ the transaction, or after all the flow mods in the bundle have been
>>  successfully applied.
>>  .IP \(bu
>>  The beginning and the end of the flow table modification commands in a
>> -bundle are delimited with OpenFlow 1.4 bundle control messages, which
>> +bundle are delimited with OpenFlow 1.3 bundle control messages, which
>>  makes it possible to stream the included commands without explicit
>>  OpenFlow barriers, which are otherwise used after each flow table
>>  modification command.  This may make large modifications execute
>>  faster as a bundle.
>>  .IP \(bu
>> -Bundles require OpenFlow 1.4 or higher.  An explicit \fB-O
>> -OpenFlow14\fR option is not needed, but you may need to enable
>> -OpenFlow 1.4 support for OVS by setting the OVSDB \fIprotocols\fR
>> +Bundles require OpenFlow 1.3 or higher.  An explicit \fB-O
>> +OpenFlow13\fR option is not needed, but you may need to enable
>> +OpenFlow 1.3 support for OVS by setting the OVSDB \fIprotocols\fR
>>  column in the \fIbridge\fR table.
>>  .RE
>>  .
>> diff --git a/utilities/ovs-save b/utilities/ovs-save
>> index 67092ecf7..2efd82c78 100755
>> --- a/utilities/ovs-save
>> +++ b/utilities/ovs-save
>> @@ -102,7 +102,7 @@ save_interfaces () {
>>  get_highest_ofp_version() {
>>      ovs-vsctl get bridge "$1" protocols | \
>>          sed 's/[][]//g' | sed 's/\ //g' | \
>> -            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow14" }'
>> +            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow13" }'
>>  }
>>
>>  save_flows () {
>> @@ -133,8 +133,8 @@ save_flows () {
>>               cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
>>          echo "'"
>>
>> -        # If possible use OpenFlow 1.4 atomic bundle txn for flows and groups
>> -        [ ${ofp_version#OpenFlow} -ge 14 ] && bundle=" --bundle" || bundle=""
>> +        # If possible use OpenFlow 1.3 atomic bundle txn for flows and groups
>> +        [ ${ofp_version#OpenFlow} -ge 13 ] && bundle=" --bundle" || bundle=""
>>
>>          echo "ovs-ofctl -O $ofp_version add-groups ${bridge} \
>>                \"$workdir/$bridge.groups.dump\" ${bundle}"
>> --
>> 2.27.0.windows.1
diff mbox series

Patch

diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
index 10a6a64de..953609bfd 100644
--- a/utilities/ovs-ofctl.8.in
+++ b/utilities/ovs-ofctl.8.in
@@ -1315,7 +1315,7 @@  well as cookie values and table IDs if they are zero.
 Do not execute read/write commands.
 .
 .IP "\fB\-\-bundle\fR"
-Execute flow mods as an OpenFlow 1.4 atomic bundle transaction.
+Execute flow mods as an OpenFlow 1.3 atomic bundle transaction.
 .RS
 .IP \(bu
 Within a bundle, all flow mods are processed in the order they appear
@@ -1327,15 +1327,15 @@  the transaction, or after all the flow mods in the bundle have been
 successfully applied.
 .IP \(bu
 The beginning and the end of the flow table modification commands in a
-bundle are delimited with OpenFlow 1.4 bundle control messages, which
+bundle are delimited with OpenFlow 1.3 bundle control messages, which
 makes it possible to stream the included commands without explicit
 OpenFlow barriers, which are otherwise used after each flow table
 modification command.  This may make large modifications execute
 faster as a bundle.
 .IP \(bu
-Bundles require OpenFlow 1.4 or higher.  An explicit \fB-O
-OpenFlow14\fR option is not needed, but you may need to enable
-OpenFlow 1.4 support for OVS by setting the OVSDB \fIprotocols\fR
+Bundles require OpenFlow 1.3 or higher.  An explicit \fB-O
+OpenFlow13\fR option is not needed, but you may need to enable
+OpenFlow 1.3 support for OVS by setting the OVSDB \fIprotocols\fR
 column in the \fIbridge\fR table.
 .RE
 .
diff --git a/utilities/ovs-save b/utilities/ovs-save
index 67092ecf7..2efd82c78 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -102,7 +102,7 @@  save_interfaces () {
 get_highest_ofp_version() {
     ovs-vsctl get bridge "$1" protocols | \
         sed 's/[][]//g' | sed 's/\ //g' | \
-            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow14" }'
+            awk -F ',' '{ print (NF>0)? $(NF) : "OpenFlow13" }'
 }

 save_flows () {
@@ -133,8 +133,8 @@  save_flows () {
              cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
         echo "'"

-        # If possible use OpenFlow 1.4 atomic bundle txn for flows and groups
-        [ ${ofp_version#OpenFlow} -ge 14 ] && bundle=" --bundle" || bundle=""
+        # If possible use OpenFlow 1.3 atomic bundle txn for flows and groups
+        [ ${ofp_version#OpenFlow} -ge 13 ] && bundle=" --bundle" || bundle=""

         echo "ovs-ofctl -O $ofp_version add-groups ${bridge} \
               \"$workdir/$bridge.groups.dump\" ${bundle}"