Skip to contentSkip to conversation

netfilter: conntrack: align nf_conn on cacheline boundary

PATCH Applied Florian Westphal 2 participants 2 messages Jun 10, 2016 – Jun 23, 2016

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 netfilter: conntrack: align nf_conn on cacheline boundary

increases struct size by 32 bytes (288 -> 320), but it is the right thing, else any attempt to (re-)arrange nf_conn members by cacheline won't work.

---
gives checkpatch warn due to line > 80 lines but I don't want to add a line-break after | just for checkpatch...

net/netfilter/nf_conntrack_core.c +1 -1
index c74dac7..a459176 100644
@@ -1711,7 +1711,7 @@ int nf_conntrack_init_start(void)
 
 	nf_conntrack_cachep = kmem_cache_create("nf_conntrack",
 						sizeof(struct nf_conn), 0,
-						SLAB_DESTROY_BY_RCU, NULL);
+						SLAB_DESTROY_BY_RCU | SLAB_HWCACHE_ALIGN, NULL);
 	if (!nf_conntrack_cachep)
 		goto err_cachep;
 
Signature · 1 line
2.7.3
maintainer Applied
#1 lore raw
Quoted 2 lines · Florian Westphal

increases struct size by 32 bytes (288 -> 320), but it is the right thing, else any attempt to (re-)arrange nf_conn members by cacheline won't work.

Applied, thanks Florian.