From patchwork Thu May 2 01:44:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1093976 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 44vdPq5nkbz9s9G for ; Thu, 2 May 2019 11:45:34 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B8E682D7D; Thu, 2 May 2019 01:45:31 +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 637EE2D72 for ; Thu, 2 May 2019 01:45:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8CB3D87 for ; Thu, 2 May 2019 01:44:59 +0000 (UTC) Received: from sigill.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B4DD120000C; Thu, 2 May 2019 01:44:54 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Wed, 1 May 2019 18:44:45 -0700 Message-Id: <20190502014445.2430-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] 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 --- lib/ovs-actions.xml | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/lib/ovs-actions.xml b/lib/ovs-actions.xml index cfd9b81be604..da9d941ac7e0 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,41 @@ $ 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. +

+
+
+ +

+ 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.