]> git.baikalelectronics.ru Git - kernel.git/commit
net: openvswitch: set max limitation to meters
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Fri, 24 Apr 2020 00:08:03 +0000 (08:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Apr 2020 01:26:11 +0000 (18:26 -0700)
commit3ba5f96c61059359848847de81ca9b2b969130b1
tree8c1a3c09ebc1b041f6abf4416a1c4b9382b2cc7b
parent39075731bcd83f64bf1900b7df8af0cef1af3b20
net: openvswitch: set max limitation to meters

Don't allow user to create meter unlimitedly, which may cause
to consume a large amount of kernel memory. The max number
supported is decided by physical memory and 20K meters as default.

Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: Andy Zhou <azhou@ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/meter.c
net/openvswitch/meter.h