Re: [ovs-dev] [PATCH net-next v2 2/2] net: openvswitch: make masks cache size configurable

2020-07-24 Thread Eelco Chaudron
On 23 Jul 2020, at 18:42, Jakub Kicinski wrote: On Thu, 23 Jul 2020 14:58:31 +0200 Eelco Chaudron wrote: + if ((size & (size - 1)) != 0 || is_power_of_2() ? Was not aware of this macro, will replaceā€¦ + (size * sizeof(struct mask_cache_entry)) > PCPU_MIN_UNIT_SIZE) +

Re: [ovs-dev] [PATCH net-next v2 2/2] net: openvswitch: make masks cache size configurable

2020-07-23 Thread Jakub Kicinski
On Thu, 23 Jul 2020 14:58:31 +0200 Eelco Chaudron wrote: > + if ((size & (size - 1)) != 0 || is_power_of_2() ? > + (size * sizeof(struct mask_cache_entry)) > PCPU_MIN_UNIT_SIZE) > + return NULL; > + new->cache_size = size; > + if (new->cache_size > 0) { > +

[ovs-dev] [PATCH net-next v2 2/2] net: openvswitch: make masks cache size configurable

2020-07-23 Thread Eelco Chaudron
This patch makes the masks cache size configurable, or with a size of 0, disable it. Reviewed-by: Paolo Abeni Signed-off-by: Eelco Chaudron --- include/uapi/linux/openvswitch.h |1 net/openvswitch/datapath.c | 14 ++ net/openvswitch/flow_table.c | 90