Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102607
b: refs/heads/master
c: 3dca02a
h: refs/heads/master
i:
  102605: 80ac1e2
  102603: 07e31d9
  102599: ef0ff37
  102591: b01f0dd
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed May 21, 2008
1 parent 5a14e69 commit 7906ff8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f56dd017c32e759bbdc88ee59d3f76235d720788
refs/heads/master: 3dca02af38c11a970160387ab36ae6043feb03cd
1 change: 0 additions & 1 deletion trunk/include/net/ip6_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
struct ip6_tnl {
struct ip6_tnl *next; /* next tunnel in list */
struct net_device *dev; /* virtual device associated with tunnel */
struct net_device_stats stat; /* statistics for tunnel device */
int recursion; /* depth of hard_start_xmit recursion */
struct ip6_tnl_parm parms; /* tunnel configuration parameters */
struct flowi fl; /* flowi template for xmit */
Expand Down
26 changes: 6 additions & 20 deletions trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol,
}

if (!ip6_tnl_rcv_ctl(t)) {
t->stat.rx_dropped++;
t->dev->stats.rx_dropped++;
read_unlock(&ip6_tnl_lock);
goto discard;
}
Expand All @@ -728,8 +728,8 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol,

dscp_ecn_decapsulate(t, ipv6h, skb);

t->stat.rx_packets++;
t->stat.rx_bytes += skb->len;
t->dev->stats.rx_packets++;
t->dev->stats.rx_bytes += skb->len;
netif_rx(skb);
read_unlock(&ip6_tnl_lock);
return 0;
Expand Down Expand Up @@ -849,7 +849,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
__u32 *pmtu)
{
struct ip6_tnl *t = netdev_priv(dev);
struct net_device_stats *stats = &t->stat;
struct net_device_stats *stats = &t->dev->stats;
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
struct ipv6_tel_txoption opt;
struct dst_entry *dst;
Expand Down Expand Up @@ -1043,11 +1043,11 @@ static int
ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip6_tnl *t = netdev_priv(dev);
struct net_device_stats *stats = &t->stat;
struct net_device_stats *stats = &t->dev->stats;
int ret;

if (t->recursion++) {
t->stat.collisions++;
stats->collisions++;
goto tx_err;
}

Expand Down Expand Up @@ -1288,19 +1288,6 @@ ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return err;
}

/**
* ip6_tnl_get_stats - return the stats for tunnel device
* @dev: virtual device associated with tunnel
*
* Return: stats for device
**/

static struct net_device_stats *
ip6_tnl_get_stats(struct net_device *dev)
{
return &(((struct ip6_tnl *)netdev_priv(dev))->stat);
}

/**
* ip6_tnl_change_mtu - change mtu manually for tunnel device
* @dev: virtual device associated with tunnel
Expand Down Expand Up @@ -1334,7 +1321,6 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
dev->uninit = ip6_tnl_dev_uninit;
dev->destructor = free_netdev;
dev->hard_start_xmit = ip6_tnl_xmit;
dev->get_stats = ip6_tnl_get_stats;
dev->do_ioctl = ip6_tnl_ioctl;
dev->change_mtu = ip6_tnl_change_mtu;

Expand Down

0 comments on commit 7906ff8

Please sign in to comment.