Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e0db4b12c7deda532ad13d37a84ee41dd691066
Commit:     9e0db4b12c7deda532ad13d37a84ee41dd691066
Parent:     fe242cfd3390b1c7d54d60f7ebb6a4054804cd41
Author:     Eric W. Biederman <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 27 17:09:39 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:53:29 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 2617320..d6997ae 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)
 #endif
        dev->last_rx = jiffies;
 
+       /* it's OK to use per_cpu_ptr() because BHs are off */
        pcpu_lstats = netdev_priv(dev);
        lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id());
        lb_stats->bytes += skb->len;
@@ -221,7 +222,8 @@ static void loopback_dev_free(struct net_device *dev)
 }
 
 /*
- * The loopback device is special. There is only one instance.
+ * The loopback device is special. There is only one instance
+ * per network namespace.
  */
 static void loopback_setup(struct net_device *dev)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to