diff options
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r-- | drivers/net/veth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index ade5b344f75d..0c4a81124257 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -153,7 +153,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
153 | struct net_device *rcv = NULL; | 153 | struct net_device *rcv = NULL; |
154 | struct veth_priv *priv, *rcv_priv; | 154 | struct veth_priv *priv, *rcv_priv; |
155 | struct veth_net_stats *stats, *rcv_stats; | 155 | struct veth_net_stats *stats, *rcv_stats; |
156 | int length, cpu; | 156 | int length; |
157 | 157 | ||
158 | skb_orphan(skb); | 158 | skb_orphan(skb); |
159 | 159 | ||
@@ -161,9 +161,8 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
161 | rcv = priv->peer; | 161 | rcv = priv->peer; |
162 | rcv_priv = netdev_priv(rcv); | 162 | rcv_priv = netdev_priv(rcv); |
163 | 163 | ||
164 | cpu = smp_processor_id(); | 164 | stats = this_cpu_ptr(priv->stats); |
165 | stats = per_cpu_ptr(priv->stats, cpu); | 165 | rcv_stats = this_cpu_ptr(rcv_priv->stats); |
166 | rcv_stats = per_cpu_ptr(rcv_priv->stats, cpu); | ||
167 | 166 | ||
168 | if (!(rcv->flags & IFF_UP)) | 167 | if (!(rcv->flags & IFF_UP)) |
169 | goto tx_drop; | 168 | goto tx_drop; |