[ovs-dev] [PATCH 5/6] ofp-match: Make some public functions static.

Ben Pfaff blp at ovn.org
Fri Feb 16 22:54:44 UTC 2018


These were only used inside ofp-match itself.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 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);
-- 
2.16.1



More information about the dev mailing list