From patchwork Fri Oct 2 19:45:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 525774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 6163E140157 for ; Sat, 3 Oct 2015 05:47:25 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 4BA6110CDD; Fri, 2 Oct 2015 12:47:24 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id C516C10CDC for ; Fri, 2 Oct 2015 12:47:22 -0700 (PDT) Received: from bar4.cudamail.com (bar2 [192.168.15.2]) by mx3v1.cudamail.com (Postfix) with ESMTP id A2E626183EF for ; Fri, 2 Oct 2015 13:47:04 -0600 (MDT) X-ASG-Debug-ID: 1443815216-03dc2139f4166c0001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar4.cudamail.com with ESMTP id 1FVGix40gjkDXCO9 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 02 Oct 2015 13:46:57 -0600 (MDT) X-Barracuda-Envelope-From: blp@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mail-pa0-f47.google.com) (209.85.220.47) by mx3-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 2 Oct 2015 19:45:49 -0000 Received-SPF: unknown (mx3-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.47 Received: by pacfv12 with SMTP id fv12so116885123pac.2 for ; Fri, 02 Oct 2015 12:45:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MqzqA94ZZmPri0JAxZ/CToFmbeOIbWeRE+Cz39tAQJM=; b=CmmMQVxGB7hHpYmDzgzIdFRlEClhjMMP9oGU08R8arce/9BhU7vh3jFCZnOhAPjsd9 NAIKD0bH/PkKyiQQZI2n5UfPorq1vqzbTV8zWmsJj64pHM8w7kJxGS5G1dsn7u4uH6Mn eWN9uSj0bmOz5wOixtFbItxeV6tl1juQS9WcVZhtXJJihg0h+gN6VgY56SeXjGg8LNnS /07pQ4QKOvlrmb+2CQ35YD6mFN+AfegUs3oe9emrzNCuC5UZWUE3eJ7w4fb49fsFpCfw WBDnqltNuwzQD+M+arhZS28LzuzH/MdM3o/zkuYomJLJgu2KTWlKpgfpQd+TQEUknxOu tHBA== X-Gm-Message-State: ALoCoQmO2rdK+UjMFT52VPFFzyqARKaetJYUfNdGD0BRh7XoYpYQL771CS7uIL7ODTusfsNrp7bL X-Received: by 10.66.141.42 with SMTP id rl10mr22178085pab.18.1443815150371; Fri, 02 Oct 2015 12:45:50 -0700 (PDT) Received: from sigabrt.benpfaff.org ([208.91.2.4]) by smtp.gmail.com with ESMTPSA id v6sm13419912pbs.40.2015.10.02.12.45.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Oct 2015 12:45:48 -0700 (PDT) X-CudaMail-Envelope-Sender: blp@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.2.4 From: Ben Pfaff To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-1001049373 X-CudaMail-DTE: 100215 X-CudaMail-Originating-IP: 209.85.220.47 Date: Fri, 2 Oct 2015 12:45:46 -0700 X-ASG-Orig-Subj: [##CM-V2-1001049373##][PATCH] physical: Preserve output port across multicast group output. Message-Id: <1443815146-23086-1-git-send-email-blp@nicira.com> X-Mailer: git-send-email 2.1.3 X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1443815217 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] physical: Preserve output port across multicast group output. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Otherwise actions like this would not output to the same set of ports for each output action (the second output would only forward to the last port from the first output action): outport = "_MC_FLOOD"; output; output; Obviously it's a corner case but it still seems worth implementing correctly. Found by inspection. Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- ovn/controller/physical.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c index efa34a2..0c239df 100644 --- a/ovn/controller/physical.c +++ b/ovn/controller/physical.c @@ -527,6 +527,10 @@ physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve, * any. */ bool local_ports = ofpacts.size > 0; if (local_ports) { + /* Following delivery to local logical ports, restore the multicast + * group as the logical output port. */ + put_load(mc->tunnel_key, MFF_LOG_OUTPORT, 0, 32, &ofpacts); + ofctrl_add_flow(flow_table, OFTABLE_LOCAL_OUTPUT, 100, &match, &ofpacts); }