openvswitch: meter: fix the incorrect calculation of max delta_t
authorzhangliping <[email protected]>
Fri, 9 Mar 2018 02:08:50 +0000 (10:08 +0800)
committerDavid S. Miller <[email protected]>
Mon, 12 Mar 2018 02:48:59 +0000 (22:48 -0400)
commitddc502dfed600bff0b61d899f70d95b76223fdfc
tree93165ab7f3f204fabcf50121fd7851ee464f3195
parent13fbcc8dc573482dd3f27568257fd7087f8935f4
openvswitch: meter: fix the incorrect calculation of max delta_t

Max delat_t should be the full_bucket/rate instead of the full_bucket.
Also report EINVAL if the rate is zero.

Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Cc: Andy Zhou <[email protected]>
Signed-off-by: zhangliping <[email protected]>
Acked-by: Pravin B Shelar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/openvswitch/meter.c