From patchwork Fri Nov 4 06:23:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yangchang X-Patchwork-Id: 1699330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N3Vvh268Jz23ls for ; Fri, 4 Nov 2022 17:24:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DFBDE61062; Fri, 4 Nov 2022 06:24:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DFBDE61062 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lup69t4jkCJ3; Fri, 4 Nov 2022 06:24:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0854760634; Fri, 4 Nov 2022 06:24:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0854760634 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id CB36CC0033; Fri, 4 Nov 2022 06:24:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 02EECC002D for ; Fri, 4 Nov 2022 06:24:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B47AD40184 for ; Fri, 4 Nov 2022 06:24:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B47AD40184 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dCLSskv6VbAR for ; Fri, 4 Nov 2022 06:24:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B6DE940124 Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.220]) by smtp2.osuosl.org (Postfix) with ESMTP id B6DE940124 for ; Fri, 4 Nov 2022 06:24:05 +0000 (UTC) HMM_SOURCE_IP: 172.18.0.48:43678.1331635619 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-10.133.8.199 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id 6BF0A2800B6 for ; Fri, 4 Nov 2022 14:23:58 +0800 (CST) X-189-SAVE-TO-SEND: yangchang@chinatelecom.cn Received: from ([10.133.8.199]) by app0024 with ESMTP id 112d82b9dc20476e85b9fa5d441475cb for dev@openvswitch.org; Fri, 04 Nov 2022 14:23:59 CST X-Transaction-ID: 112d82b9dc20476e85b9fa5d441475cb X-Real-From: yangchang@chinatelecom.cn X-Receive-IP: 10.133.8.199 X-MEDUSA-Status: 0 Date: Fri, 4 Nov 2022 14:23:58 +0800 From: yangchang To: dev X-Priority: 3 X-GUID: 13274368-4F35-4D7C-83A9-CF34D19EA548 X-Has-Attach: no X-Mailer: Foxmail 7.2.18.95[cn] Mime-Version: 1.0 Message-ID: <2022110414235782861616@chinatelecom.cn> X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [ovs-dev] [PATCH v4] ovs-ofctl:'--bundle' option can be used with OpenFlow 1.3 X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From the commit 25070e045e, bundle option can be used with OpenFlow 1.3 Signed-off-by: yangchang Acked-by: Mike Pattrick Acked-by: Mike Pattrick --- 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 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}"