From patchwork Fri Feb 16 22:54:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 874694 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=) 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 3zjpS9249kz9t1t for ; Sat, 17 Feb 2018 09:57:13 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0232D10EA; Fri, 16 Feb 2018 22:55:02 +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 CEA6C10EA for ; Fri, 16 Feb 2018 22:54:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AD9DC418 for ; Fri, 16 Feb 2018 22:54:58 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8D0381720AE; Fri, 16 Feb 2018 23:54:56 +0100 (CET) From: Ben Pfaff To: dev@openvswitch.org Date: Fri, 16 Feb 2018 14:54:44 -0800 Message-Id: <20180216225445.28688-5-blp@ovn.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180216225445.28688-1-blp@ovn.org> References: <20180216225445.28688-1-blp@ovn.org> 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 5/6] ofp-match: Make some public functions static. 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org These were only used inside ofp-match itself. Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- include/openvswitch/ofp-match.h | 5 ----- lib/ofp-match.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/openvswitch/ofp-match.h b/include/openvswitch/ofp-match.h index f2d4a0df9d51..c3baa8e8ff22 100644 --- a/include/openvswitch/ofp-match.h +++ b/include/openvswitch/ofp-match.h @@ -30,11 +30,6 @@ struct tun_table; extern "C" { #endif -/* Converting OFPFW10_NW_SRC_MASK and OFPFW10_NW_DST_MASK wildcard bit counts - * to and from IP bitmasks. */ -ovs_be32 ofputil_wcbits_to_netmask(int wcbits); -int ofputil_netmask_to_wcbits(ovs_be32 netmask); - /* Work with ofp10_match. */ void ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *); void ofputil_match_from_ofp10_match(const struct ofp10_match *, diff --git a/lib/ofp-match.c b/lib/ofp-match.c index d1031f6aaa3e..c907f2908cb2 100644 --- a/lib/ofp-match.c +++ b/lib/ofp-match.c @@ -39,7 +39,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); * ..., 32 and higher wildcard the entire field. This is the *opposite* of the * usual convention where e.g. /24 indicates that 8 bits (not 24 bits) are * wildcarded. */ -ovs_be32 +static ovs_be32 ofputil_wcbits_to_netmask(int wcbits) { wcbits &= 0x3f; @@ -52,7 +52,7 @@ ofputil_wcbits_to_netmask(int wcbits) * * If 'netmask' is not a CIDR netmask (see ip_is_cidr()), the return value will * still be in the valid range but isn't otherwise meaningful. */ -int +static int ofputil_netmask_to_wcbits(ovs_be32 netmask) { return 32 - ip_count_cidr_bits(netmask);