aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 01:40:57 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:52:52 -0700
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /include/net/pkt_sched.h
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
downloadkernel_samsung_smdk4412-3b04ddde02cf1b6f14f2697da5c20eca5715017f.zip
kernel_samsung_smdk4412-3b04ddde02cf1b6f14f2697da5c20eca5715017f.tar.gz
kernel_samsung_smdk4412-3b04ddde02cf1b6f14f2697da5c20eca5715017f.tar.bz2
[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/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 9e22526..ab61809 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -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