From: Ben Pfaff Date: Thu, 16 Dec 2010 21:57:08 +0000 (-0800) Subject: nx-match: Make nxm_field_bytes(), nxm_field_bits() public. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4291acd23d801a0274f5a4f8107b2a907f4fbdd5;p=openvswitch nx-match: Make nxm_field_bytes(), nxm_field_bits() public. --- diff --git a/lib/nx-match.c b/lib/nx-match.c index 92d3b9e4..04c75b8b 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 d0e1c653..07d695de 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. */