Increase frag queue hash size and assure cache-line alignment to
avoid false sharing. Hash size is set to 256, because I have
observed 206 frag queues in use at 4x10G with packet size 4416 bytes.
Signed-off-by: Jesper Dangaard Brouer <redacted>
---
include/net/inet_frag.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 1efec6b..5054228 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -49,13 +49,12 @@ struct inet_frag_queue {
u16 max_size;
};
-#define INETFRAGS_HASHSZ 64
-
+#define INETFRAGS_HASHSZ 256
struct inet_frag_bucket {
struct hlist_head chain;
spinlock_t chain_lock;
-};
+} ____cacheline_aligned_in_smp;
struct inet_frags {
struct inet_frag_bucket hash[INETFRAGS_HASHSZ];