[ovs-dev] [PATCH v5 2/5] ovn: Use callback function instead of simap for logical port number map.

Justin Pettit jpettit at ovn.org
Thu Mar 3 02:26:03 UTC 2016


> On Feb 19, 2016, at 4:40 PM, Ben Pfaff <blp at ovn.org> wrote:

> @@ -2433,10 +2442,13 @@ add_cmp_flow(const struct expr *cmp, const struct simap *ports,
>  *       caller should remap the conj_id and add the OpenFlow flow with its
>  *       desired actions.
>  *
> - * 'ports' must be a map from strings (presumably names of ports) to integers.
> - * Any comparisons against string fields in 'expr' are translated into integers
> - * through this map.  A comparison against a string that is not in 'ports' acts
> - * like a Boolean "false"; that is, it will always fail to match.  For a simple
> + * 'lookup_port' must be a function to map from a port name to a port number.
> + * When successful, 'lookup_port' stores the port number into '*portp' and
> + * returns true; when there is no port by the given name, it returns false.
> + * 'aux' is passed to 'lookup_port' as auxiliary data.  Any comparisons against
> + * string fields in 'expr' are translated into integers through this this

There's a duplicated "this".

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

--Justin





More information about the dev mailing list