diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-09 04:40:57 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:52 -0400 |
commit | 3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch) | |
tree | 9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /include/linux/etherdevice.h | |
parent | b95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff) |
[NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class
not the device instance, make them into a separate object and
save memory.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r-- | include/linux/etherdevice.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 6cdb97365e47..b7558ec81ed5 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -29,15 +29,19 @@ | |||
29 | #include <linux/random.h> | 29 | #include <linux/random.h> |
30 | 30 | ||
31 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
32 | extern int eth_header(struct sk_buff *skb, struct net_device *dev, | ||
33 | unsigned short type, void *daddr, | ||
34 | void *saddr, unsigned len); | ||
35 | extern int eth_rebuild_header(struct sk_buff *skb); | ||
36 | extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); | 32 | extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); |
37 | extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, | 33 | extern const struct header_ops eth_header_ops; |
38 | unsigned char * haddr); | 34 | |
39 | extern int eth_header_cache(struct neighbour *neigh, | 35 | extern int eth_header(struct sk_buff *skb, struct net_device *dev, |
40 | struct hh_cache *hh); | 36 | unsigned short type, |
37 | const void *daddr, const void *saddr, unsigned len); | ||
38 | extern int eth_rebuild_header(struct sk_buff *skb); | ||
39 | extern int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | ||
40 | extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh); | ||
41 | extern void eth_header_cache_update(struct hh_cache *hh, | ||
42 | const struct net_device *dev, | ||
43 | const unsigned char *haddr); | ||
44 | |||
41 | 45 | ||
42 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); | 46 | extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); |
43 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) | 47 | #define alloc_etherdev(sizeof_priv) alloc_etherdev_mq(sizeof_priv, 1) |