Commit 8125d6bc authored by David S. Miller's avatar David S. Miller

[NET]: Define LL_RESERVED_SPACE in terms of HH_DATA_MOD.

parent 36b609df
...@@ -90,11 +90,6 @@ struct vlan_group; ...@@ -90,11 +90,6 @@ struct vlan_group;
#define MAX_HEADER (LL_MAX_HEADER + 48) #define MAX_HEADER (LL_MAX_HEADER + 48)
#endif #endif
/* Reserve 16byte aligned hard_header_len, but at least 16.
* Alternative is: dev->hard_header_len ? (dev->hard_header_len + 15)&~15 : 0
*/
#define LL_RESERVED_SPACE(dev) (((dev)->hard_header_len&~15) + 16)
/* /*
* Network device statistics. Akin to the 2.0 ether stats but * Network device statistics. Akin to the 2.0 ether stats but
* with byte counters. * with byte counters.
...@@ -205,6 +200,17 @@ struct hh_cache ...@@ -205,6 +200,17 @@ struct hh_cache
unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER)]; unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER)];
}; };
/* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much.
* Alternative is:
* dev->hard_header_len ? (dev->hard_header_len +
* (HH_DATA_MOD - 1)) & ~(HH_DATA_MOD - 1) : 0
*
* We could use other alignment values, but we must maintain the
* relationship HH alignment <= LL alignment.
*/
#define LL_RESERVED_SPACE(dev) \
(((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
/* These flag bits are private to the generic network queueing /* These flag bits are private to the generic network queueing
* layer, they may not be explicitly referenced by any other * layer, they may not be explicitly referenced by any other
* code. * code.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment