From patchwork Mon Apr 8 18:22:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1081353 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 44dJhq4Pdsz9sR0 for ; Tue, 9 Apr 2019 04:23:55 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8F916C77; Mon, 8 Apr 2019 18:22:21 +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 B79DFC3E for ; Mon, 8 Apr 2019 18:22:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2F80863D for ; Mon, 8 Apr 2019 18:22:18 +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 relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 9A401240003; Mon, 8 Apr 2019 18:22:16 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Mon, 8 Apr 2019 11:22:04 -0700 Message-Id: <20190408182206.15688-3-blp@ovn.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190408182206.15688-1-blp@ovn.org> References: <20190408182206.15688-1-blp@ovn.org> 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 3/5] meta-flow: Add comment. 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 --- lib/meta-flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index 1724e46e1b97..e3274b97f335 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -2287,6 +2287,12 @@ mf_set(const struct mf_field *mf, *err_str = NULL; } + /* The cases where 'mask' is all-1-bits or all-0-bits were already handled + * above[*], so the code below only needs to work for the remaining cases + * of a nontrivial mask. + * + * [*] Except where the field is a tunnel metadata field and 'mask' is + * all-0-bits; see above. */ switch (mf->id) { case MFF_CT_ZONE: case MFF_CT_NW_PROTO: