diff options
author | Justin Pettit <jpettit@ovn.org> | 2018-08-07 19:51:26 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@ovn.org> | 2018-08-16 10:20:52 -0700 |
commit | 8101f03fcde1fe90b7301b398d7a8caa480d43f8 (patch) | |
tree | d82e7bf9c7186c4c4597abe8f6fc31cffc1ca31d /lib/dpif-provider.h | |
parent | 16770c6d91793c4f4eca8a739d4cf541fc705cc3 (diff) | |
download | openvswitch-8101f03fcde1fe90b7301b398d7a8caa480d43f8.tar.gz |
dpif: Don't pass in '*meter_id' to meter_set commands.
The original intent of the API appears to be that the underlying DPIF
implementaion would choose a local meter id. However, neither of the
existing datapath meter implementations (userspace or Linux) implemented
that; they expected a valid meter id to be passed in, otherwise they
returned an error. This commit follows the existing implementations and
makes the API somewhat cleaner.
Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/dpif-provider.h')
-rw-r--r-- | lib/dpif-provider.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/dpif-provider.h b/lib/dpif-provider.h index 62b3598ac..8906d4e0a 100644 --- a/lib/dpif-provider.h +++ b/lib/dpif-provider.h @@ -451,12 +451,11 @@ struct dpif_class { void (*meter_get_features)(const struct dpif *, struct ofputil_meter_features *); - /* Adds or modifies 'meter' in 'dpif'. If '*meter_id' is UINT32_MAX, - * adds a new meter, otherwise modifies an existing meter. + /* Adds or modifies the meter in 'dpif' with the given 'meter_id' + * and the configuration in 'config'. * - * If meter is successfully added, sets '*meter_id' to the new meter's - * meter id selected by 'dpif'. */ - int (*meter_set)(struct dpif *, ofproto_meter_id *meter_id, + * The meter id specified through 'config->meter_id' is ignored. */ + int (*meter_set)(struct dpif *, ofproto_meter_id meter_id, struct ofputil_meter_config *); /* Queries 'dpif' for meter stats with the given 'meter_id'. Stores |