aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 75382378a1ba..5ccc0cb8352b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -252,14 +252,7 @@ struct netdev_hw_addr_list {
252 netdev_hw_addr_list_for_each(ha, &(dev)->mc) 252 netdev_hw_addr_list_for_each(ha, &(dev)->mc)
253 253
254struct hh_cache { 254struct hh_cache {
255 atomic_t hh_refcnt; /* number of users */ 255 u16 hh_len;
256/*
257 * We want hh_output, hh_len, hh_lock and hh_data be a in a separate
258 * cache line on SMP.
259 * They are mostly read, but hh_refcnt may be changed quite frequently,
260 * incurring cache line ping pongs.
261 */
262 u16 hh_len ____cacheline_aligned_in_smp;
263 u16 __pad; 256 u16 __pad;
264 int (*hh_output)(struct sk_buff *skb); 257 int (*hh_output)(struct sk_buff *skb);
265 seqlock_t hh_lock; 258 seqlock_t hh_lock;
@@ -273,12 +266,6 @@ struct hh_cache {
273 unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; 266 unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];
274}; 267};
275 268
276static inline void hh_cache_put(struct hh_cache *hh)
277{
278 if (atomic_dec_and_test(&hh->hh_refcnt))
279 kfree(hh);
280}
281
282/* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much. 269/* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much.
283 * Alternative is: 270 * Alternative is:
284 * dev->hard_header_len ? (dev->hard_header_len + 271 * dev->hard_header_len ? (dev->hard_header_len +