Skip to contentSkip to conversation

TProxy: move dst_cookie to the first cacheline in ipv6_pinfo

PATCH New Balazs Scheidler 1 participant 1 message Aug 30, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/13 TProxy: move dst_cookie to the first cacheline in ipv6_pinfo

While looking for a place to add a new bitfield in ipv6_pinfo, I've found a 32 bit hole (in 64 bit mode) at the beginning of the struct. Since dst_cookie is used in the output fastpath, I've moved this field to fill the hole. The original place of dst_cookie is now empty, but can become a place to add further fields to the struct.

---
 include/linux/ipv6.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/ipv6.h +2 -1
index c662efa..be4c9c6 100644
@@ -285,6 +285,7 @@ struct ipv6_pinfo {
 	struct in6_addr 	saddr;
 	struct in6_addr 	rcv_saddr;
 	struct in6_addr		daddr;
+	__u32			dst_cookie;
 	struct in6_pktinfo	sticky_pktinfo;
 	struct in6_addr		*daddr_cache;
 #ifdef CONFIG_IPV6_SUBTREES
@@ -348,7 +349,7 @@ struct ipv6_pinfo {
 						 */
 	__u8			tclass;
 
-	__u32			dst_cookie;
+	/* 32 bits hole on 64 bit platforms */
 
 	struct ipv6_mc_socklist	*ipv6_mc_list;
 	struct ipv6_ac_socklist	*ipv6_ac_list;
Signature · 1 line
1.6.0.4