From 4291acd23d801a0274f5a4f8107b2a907f4fbdd5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Dec 2010 13:57:08 -0800 Subject: [PATCH] nx-match: Make nxm_field_bytes(), nxm_field_bits() public. --- lib/nx-match.c | 4 ++-- lib/nx-match.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/nx-match.c b/lib/nx-match.c index 92d3b9e45..04c75b8b0 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -123,7 +123,7 @@ nxm_field_lookup(uint32_t header) /* Returns the width of the data for a field with the given 'header', in * bytes. */ -static int +int nxm_field_bytes(uint32_t header) { unsigned int length = NXM_LENGTH(header); @@ -132,7 +132,7 @@ nxm_field_bytes(uint32_t header) /* Returns the width of the data for a field with the given 'header', in * bits. */ -static int +int nxm_field_bits(uint32_t header) { return nxm_field_bytes(header) * 8; diff --git a/lib/nx-match.h b/lib/nx-match.h index d0e1c653e..07d695de0 100644 --- a/lib/nx-match.h +++ b/lib/nx-match.h @@ -53,6 +53,9 @@ int nxm_check_reg_load(const struct nx_action_reg_load *, const struct flow *); void nxm_execute_reg_move(const struct nx_action_reg_move *, struct flow *); void nxm_execute_reg_load(const struct nx_action_reg_load *, struct flow *); +int nxm_field_bytes(uint32_t header); +int nxm_field_bits(uint32_t header); + /* Dealing with the 'ofs_nbits' members of struct nx_action_reg_load and struct * nx_action_multipath. */ -- 2.45.2