diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-09-27 20:09:39 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:53:29 -0400 |
commit | 9e0db4b12c7deda532ad13d37a84ee41dd691066 (patch) | |
tree | 6701d28ea9e22be4a2b9ff2904f9d7a4a3d1fe52 /drivers/net/loopback.c | |
parent | fe242cfd3390b1c7d54d60f7ebb6a4054804cd41 (diff) |
[NET]: Bring comments in loopback.c uptodate.
A hint as to why it is safe to use per cpu variables,
and note that we actually can have multiple instances
of the loopback device now.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 2617320efa95..d6997aec45dd 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -154,6 +154,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) | |||
154 | #endif | 154 | #endif |
155 | dev->last_rx = jiffies; | 155 | dev->last_rx = jiffies; |
156 | 156 | ||
157 | /* it's OK to use per_cpu_ptr() because BHs are off */ | ||
157 | pcpu_lstats = netdev_priv(dev); | 158 | pcpu_lstats = netdev_priv(dev); |
158 | lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id()); | 159 | lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id()); |
159 | lb_stats->bytes += skb->len; | 160 | lb_stats->bytes += skb->len; |
@@ -221,7 +222,8 @@ static void loopback_dev_free(struct net_device *dev) | |||
221 | } | 222 | } |
222 | 223 | ||
223 | /* | 224 | /* |
224 | * The loopback device is special. There is only one instance. | 225 | * The loopback device is special. There is only one instance |
226 | * per network namespace. | ||
225 | */ | 227 | */ |
226 | static void loopback_setup(struct net_device *dev) | 228 | static void loopback_setup(struct net_device *dev) |
227 | { | 229 | { |