From patchwork Thu May 2 17:56:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1094479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44w2zM6fbMz9s9y for ; Fri, 3 May 2019 03:57:35 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5E3F2324E; Thu, 2 May 2019 17:57:33 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 399F53241 for ; Thu, 2 May 2019 17:56:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6089E87B for ; Thu, 2 May 2019 17:56:34 +0000 (UTC) X-Originating-IP: 66.170.99.95 Received: from sigill.benpfaff.org (unknown [66.170.99.95]) (Authenticated sender: blp@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B61CF4000C; Thu, 2 May 2019 17:56:30 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Thu, 2 May 2019 10:56:22 -0700 Message-Id: <20190502175622.550-1-blp@ovn.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2] ovs-actions.xml: Better document the "bundle" and "bundle_load" actions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Signed-off-by: Ben Pfaff Acked-by: Numan Siddique --- v1->v2: Add paragraph about liveness. lib/ovs-actions.xml | 53 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/lib/ovs-actions.xml b/lib/ovs-actions.xml index cfd9b81be604..76aa5afb4d06 100644 --- a/lib/ovs-actions.xml +++ b/lib/ovs-actions.xml @@ -789,15 +789,15 @@ $ ovs-ofctl -O OpenFlow10 add-flow br0 actions=mod_nw_src:1.2.3.4

The bundle and bundle_load actions

- bundle(fields, basis, algorithm, ofport, slaves:port...) - bundle_load(fields, basis, algorithm, ofport, dst, slaves:port...) + bundle(fields, basis, algorithm, ofport, slaves:port...) + bundle_load(fields, basis, algorithm, ofport, dst, slaves:port...)

These actions choose a port (``slave'') from a comma-separated OpenFlow port list. After selecting the port, bundle outputs to it, whereas bundle_load writes its port number - to dst, which must be a field or subfield in the syntax - described under ``Field Specifications'' above. + to dst, which must be a 16-bit or wider field or subfield in + the syntax described under ``Field Specifications'' above.

@@ -847,6 +847,51 @@ $ ovs-ofctl -O OpenFlow10 add-flow br0 actions=mod_nw_src:1.2.3.4 +

+ algorithm must be one of the following: +

+ +
+
active_backup
+
+ Chooses the first live port listed in slaves. +
+ +
hrw (Highest Random Weight)
+
+

+ Computes the following, considering only the live ports in + slaves: +

+ +
+for i in [1,n_slaves]:
+    weights[i] = hash(flow, i)
+slave = { i such that weights[i] >= weights[j] for all j != i }
+          
+ +

+ This algorithm is specified by RFC 2992. +

+
+
+ +

+ The algorithms take port liveness into account when selecting slaves. + The definition of whether a port is live is subject to change. It + currently takes into account carrier status and link monitoring + protocols such as BFD and CFM. If none of the slaves is live, + bundle does not output the packet and + bundle_load stores OFPP_NONE (65535) in the + output field. +

+ +

+ Example: bundle(eth_src,0,hrw,ofport,slaves:4,8) uses an + Ethernet source hash with basis 0, to select between OpenFlow ports 4 + and 8 using the Highest Random Weight algorithm. +

+ Open vSwitch 1.2 introduced the bundle and bundle_load OpenFlow extension actions.