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)
+
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) {
> +
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