Skip to contentSkip to conversation

net: Add classid to sk_buff.

PATCH In review David Miller 2 participants 3 messages May 20, 2010

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 2/2 net: Add classid to sk_buff.

We make this zero cost by moving queue_mapping into an existing empty __u16 slot. Thus making a __u32 available, which we use for the 'classid'.

---
 include/linux/skbuff.h |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
include/linux/skbuff.h +2 -4
index 7c16f24..f847ec2 100644
@@ -367,12 +367,9 @@ struct sk_buff {
 #ifdef CONFIG_NET_CLS_ACT
 	__u16			tc_verd;	/* traffic control verdict */
 #endif
+	__u32			classid;
 #endif
 
-	__u16			queue_mapping;
-
-	/* 16 bit hole */
-
 #ifdef CONFIG_NET_DMA
 	dma_cookie_t		dma_cookie;
 #endif
@@ -385,6 +382,7 @@ struct sk_buff {
 	};
 
 	__u16			vlan_tci;
+	__u16			queue_mapping;
 
 	sk_buff_data_t		transport_header;
 	sk_buff_data_t		network_header;
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 6 lines · David Miller

We make this zero cost by moving queue_mapping into an existing empty __u16 slot. Thus making a __u32 available, which we use for the 'classid'.

You better hide this space before someone steals it :)

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#2 lore raw

From: Herbert Xu <[email protected]>
Date: Thu, 20 May 2010 13:36:43 +1000

Quoted 9 lines · David Miller
Quoted 6 lines

We make this zero cost by moving queue_mapping into an existing empty __u16 slot. Thus making a __u32 available, which we use for the 'classid'.

You better hide this space before someone steals it :)

Indeed, I didn't even know we had it to begin with. :)