summaryrefslogtreecommitdiff
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
authorTonghao Zhang <xiangxia.m.yue@gmail.com>2020-04-24 03:08:02 +0300
committerDavid S. Miller <davem@davemloft.net>2020-04-24 04:26:11 +0300
commitc7c4c44c9a95d87e50ced38f7480e779cb472174 (patch)
tree24188e5afbec72cdc585128e9ae8eb996a84756d /net/openvswitch/datapath.h
parentefcd549da9d7e8194b4d2d2f35eff8ce7b4da684 (diff)
downloadlinux-c7c4c44c9a95d87e50ced38f7480e779cb472174.tar.xz
net: openvswitch: expand the meters supported number
In kernel datapath of Open vSwitch, there are only 1024 buckets of meter in one datapath. If installing more than 1024 (e.g. 8192) meters, it may lead to the performance drop. But in some case, for example, Open vSwitch used as edge gateway, there should be 20K at least, where meters used for IP address bandwidth limitation. [Open vSwitch userspace datapath has this issue too.] For more scalable meter, this patch use meter array instead of hash tables, and expand/shrink the array when necessary. So we can install more meters than before in the datapath. Introducing the struct *dp_meter_instance, it's easy to expand meter though changing the *ti point in the struct *dp_meter_table. 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>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index e239a46c2f94..2016dd107939 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -82,7 +82,7 @@ struct datapath {
u32 max_headroom;
/* Switch meters. */
- struct hlist_head *meters;
+ struct dp_meter_table meter_tbl;
};
/**