diff mbox series

[ovs-dev,v1] ovs-save: Use right OpenFlow version for add-tlv-map

Message ID 202207011852401980551@chinatelecom.cn
State Accepted
Commit 269a947c7b69d150685306209ef649c51b52bb76
Headers show
Series [ovs-dev,v1] ovs-save: Use right OpenFlow version for add-tlv-map | 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

Han Ding July 1, 2022, 10:52 a.m. UTC
When the bridge protocols is not included Openflow10, printing an error
message "version negotiation failed" when doing "Restoring saved flows".

Signed-off-by: Han Ding <handing@chinatelecom.cn>
---
 utilities/ovs-save | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.27.0

Comments

Mike Pattrick Aug. 3, 2022, 6:42 p.m. UTC | #1
On Fri, Jul 1, 2022 at 6:53 AM Han Ding <handing@chinatelecom.cn> wrote:
>
>
> When the bridge protocols is not included Openflow10, printing an error
> message "version negotiation failed" when doing "Restoring saved flows".
>
> Signed-off-by: Han Ding <handing@chinatelecom.cn>

Looks good to me!

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

> ---
>  utilities/ovs-save | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utilities/ovs-save b/utilities/ovs-save
> index a190902f4..67092ecf7 100755
> --- a/utilities/ovs-save
> +++ b/utilities/ovs-save
> @@ -127,7 +127,7 @@ save_flows () {
>          # Get the highest enabled OpenFlow version
>          ofp_version=$(get_highest_ofp_version "$bridge")
>
> -        printf "%s" "ovs-ofctl add-tlv-map ${bridge} '"
> +        printf "%s" "ovs-ofctl -O $ofp_version add-tlv-map ${bridge} '"
>          ovs-ofctl dump-tlv-map ${bridge} -O $ofp_version | \
>          awk '/^  *0x/ {if (cnt != 0) printf ","; \
>               cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
> --
> 2.27.0
>
>
>
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ilya Maximets Aug. 8, 2022, 7:39 p.m. UTC | #2
On 8/3/22 20:42, Mike Pattrick wrote:
> On Fri, Jul 1, 2022 at 6:53 AM Han Ding <handing@chinatelecom.cn> wrote:
>>
>>
>> When the bridge protocols is not included Openflow10, printing an error
>> message "version negotiation failed" when doing "Restoring saved flows".
>>
>> Signed-off-by: Han Ding <handing@chinatelecom.cn>
> 
> Looks good to me!
> 
> Acked-by: Mike Pattrick <mkp@redhat.com>

Thanks!  Applied and backported down to 2.17.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/utilities/ovs-save b/utilities/ovs-save
index a190902f4..67092ecf7 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -127,7 +127,7 @@  save_flows () {
         # Get the highest enabled OpenFlow version
         ofp_version=$(get_highest_ofp_version "$bridge")

-        printf "%s" "ovs-ofctl add-tlv-map ${bridge} '"
+        printf "%s" "ovs-ofctl -O $ofp_version add-tlv-map ${bridge} '"
         ovs-ofctl dump-tlv-map ${bridge} -O $ofp_version | \
         awk '/^  *0x/ {if (cnt != 0) printf ","; \
              cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'