summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2020-07-15 14:09:28 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-17 10:36:50 -0700
commiteac87c413bf9794c14d488998a5265ea5b32f04e (patch)
tree969f981073d246b9888cc3501d883f6c1f6ebe93 /net/openvswitch/datapath.h
parentb18432c5a49c9413fd3afb717b378e08cb71331b (diff)
downloadlinux-stable-eac87c413bf9794c14d488998a5265ea5b32f04e.tar.gz
linux-stable-eac87c413bf9794c14d488998a5265ea5b32f04e.tar.bz2
linux-stable-eac87c413bf9794c14d488998a5265ea5b32f04e.zip
net: openvswitch: reorder masks array based on usage
This patch reorders the masks array every 4 seconds based on their usage count. This greatly reduces the masks per packet hit, and hence the overall performance. Especially in the OVS/OVN case for OpenShift. Here are some results from the OVS/OVN OpenShift test, which use 8 pods, each pod having 512 uperf connections, each connection sends a 64-byte request and gets a 1024-byte response (TCP). All uperf clients are on 1 worker node while all uperf servers are on the other worker node. Kernel without this patch : 7.71 Gbps Kernel with this patch applied: 14.52 Gbps We also run some tests to verify the rebalance activity does not lower the flow insertion rate, which does not. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Tested-by: Andrew Theurer <atheurer@redhat.com> Reviewed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 2016dd107939..697a2354194b 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -20,8 +20,9 @@
#include "meter.h"
#include "vport-internal_dev.h"
-#define DP_MAX_PORTS USHRT_MAX
-#define DP_VPORT_HASH_BUCKETS 1024
+#define DP_MAX_PORTS USHRT_MAX
+#define DP_VPORT_HASH_BUCKETS 1024
+#define DP_MASKS_REBALANCE_INTERVAL 4000
/**
* struct dp_stats_percpu - per-cpu packet processing statistics for a given
@@ -83,6 +84,9 @@ struct datapath {
/* Switch meters. */
struct dp_meter_table meter_tbl;
+
+ /* re-balance flow masks timer */
+ struct delayed_work masks_rebalance;
};
/**