]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: meter: fix the incorrect calculation of max delta_t
authorzhangliping <zhangliping02@baidu.com>
Fri, 9 Mar 2018 02:08:50 +0000 (10:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 02:48:59 +0000 (22:48 -0400)
commitce3b68ee08e71a8b858c6e517044026ea2346673
tree93165ab7f3f204fabcf50121fd7851ee464f3195
parentbf3755ad5e53c71779b24659635f30b06eb1bb93
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: 525014bedcf0 ("openvswitch: Add meter infrastructure")
Cc: Andy Zhou <azhou@ovn.org>
Signed-off-by: zhangliping <zhangliping02@baidu.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/meter.c