[ovs-dev] [multipath 4/7] nx-match: Make nxm_field_bytes(), nxm_field_bits() public.

Justin Pettit jpettit at nicira.com
Fri Dec 17 18:35:41 UTC 2010


Man, you're throwing me soft, easy pitches so far.*

--Justin

* Rare sports reference.  Please forward to my father who is reduced to discussing sports with my wife and refers to my fancy caffeinated drinks as "coffee for sissies."


On Dec 16, 2010, at 2:42 PM, Ben Pfaff wrote:

> ---
> 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
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list