diff mbox series

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

Message ID 20180216225445.28688-5-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev,1/6] ofp-util: Use consistent naming convention. | expand

Commit Message

Ben Pfaff Feb. 16, 2018, 10:54 p.m. UTC
These were only used inside ofp-match itself.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 include/openvswitch/ofp-match.h | 5 -----
 lib/ofp-match.c                 | 4 ++--
 2 files changed, 2 insertions(+), 7 deletions(-)

Comments

Justin Pettit March 13, 2018, 1:24 a.m. UTC | #1
> On Feb 16, 2018, at 2:54 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> These were only used inside ofp-match itself.
> 
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Acked-by: Justin Pettit <jpettit@ovn.org>

--Justin
diff mbox series

Patch

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);