[ovs-dev] [multipath 4/7] nx-match: Make nxm_field_bytes(), nxm_field_bits() public.
Ben Pfaff
blp at nicira.com
Thu Dec 16 22:42:28 UTC 2010
---
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 92d3b9e..04c75b8 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 d0e1c65..07d695d 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. */
--
1.7.1
More information about the dev
mailing list