aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-07-15 01:49:06 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-15 01:49:06 -0400
commit6aa895b047720f71ec4eb11452f7c3ce8426941f (patch)
treeba52827c2e90de0678043ecf9d43208057d05da7 /include/linux/skbuff.h
parent968edbe1c82f1a50d80225ed7e410aba419e55bf (diff)
vlan: Don't store VLAN tag in cb
Use a real skb member to store the skb to avoid clashes with qdiscs, which are allowed to use the cb area themselves. As currently only real devices that consume the skb set the NETIF_F_HW_VLAN_TX flag, no explicit invalidation is neccessary. The new member fills a hole on 64 bit, the skb layout changes from: __u32 mark; /* 172 4 */ sk_buff_data_t transport_header; /* 176 4 */ sk_buff_data_t network_header; /* 180 4 */ sk_buff_data_t mac_header; /* 184 4 */ sk_buff_data_t tail; /* 188 4 */ /* --- cacheline 3 boundary (192 bytes) --- */ sk_buff_data_t end; /* 192 4 */ /* XXX 4 bytes hole, try to pack */ to __u32 mark; /* 172 4 */ __u16 vlan_tci; /* 176 2 */ /* XXX 2 bytes hole, try to pack */ sk_buff_data_t transport_header; /* 180 4 */ sk_buff_data_t network_header; /* 184 4 */ Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 8f10e3d08fd9..7ea44f6621f2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -246,6 +246,7 @@ typedef unsigned char *sk_buff_data_t;
246 * @dma_cookie: a cookie to one of several possible DMA operations 246 * @dma_cookie: a cookie to one of several possible DMA operations
247 * done by skb DMA functions 247 * done by skb DMA functions
248 * @secmark: security marking 248 * @secmark: security marking
249 * @vlan_tci: vlan tag control information
249 */ 250 */
250 251
251struct sk_buff { 252struct sk_buff {
@@ -326,6 +327,8 @@ struct sk_buff {
326 327
327 __u32 mark; 328 __u32 mark;
328 329
330 __u16 vlan_tci;
331
329 sk_buff_data_t transport_header; 332 sk_buff_data_t transport_header;
330 sk_buff_data_t network_header; 333 sk_buff_data_t network_header;
331 sk_buff_data_t mac_header; 334 sk_buff_data_t mac_header;