mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
b95cce3576
commit
3b04ddde02
65 changed files with 479 additions and 473 deletions
|
@ -97,10 +97,9 @@ extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
|
|||
/* Calculate maximal size of packet seen by hard_start_xmit
|
||||
routine of this device.
|
||||
*/
|
||||
static inline unsigned psched_mtu(struct net_device *dev)
|
||||
static inline unsigned psched_mtu(const struct net_device *dev)
|
||||
{
|
||||
unsigned mtu = dev->mtu;
|
||||
return dev->hard_header ? mtu + dev->hard_header_len : mtu;
|
||||
return dev->mtu + dev->hard_header_len;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue