aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-21 03:19:31 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:25 -0500
commit7bd38d778e3f2250e96fc277040879d66c30ecb4 (patch)
tree555dbdf5c1cccc29710e53a428d979384451b05a /include
parentb7a4a83629c1ddde8c2e6a872618c66577cb20f0 (diff)
[VLAN]: Use dev->stats
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_vlan.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 0325d6b17e07..07db4169463e 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -140,18 +140,11 @@ struct vlan_dev_info {
140 struct proc_dir_entry *dent; /* Holds the proc data */ 140 struct proc_dir_entry *dent; /* Holds the proc data */
141 unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ 141 unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */
142 unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ 142 unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */
143 struct net_device_stats dev_stats; /* Device stats (rx-bytes, tx-pkts, etc...) */
144}; 143};
145 144
146#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv)) 145#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv))
147 146
148/* inline functions */ 147/* inline functions */
149
150static inline struct net_device_stats *vlan_dev_get_stats(struct net_device *dev)
151{
152 return &(VLAN_DEV_INFO(dev)->dev_stats);
153}
154
155static inline __u32 vlan_get_ingress_priority(struct net_device *dev, 148static inline __u32 vlan_get_ingress_priority(struct net_device *dev,
156 unsigned short vlan_tag) 149 unsigned short vlan_tag)
157{ 150{
@@ -196,7 +189,7 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
196 189
197 skb->dev->last_rx = jiffies; 190 skb->dev->last_rx = jiffies;
198 191
199 stats = vlan_dev_get_stats(skb->dev); 192 stats = &skb->dev->stats;
200 stats->rx_packets++; 193 stats->rx_packets++;
201 stats->rx_bytes += skb->len; 194 stats->rx_bytes += skb->len;
202 195