X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdp_dev.c;h=5b434c1f9a5429b21f041bd3ae9b611135ec1229;hb=f4ade10529d5a3882ff1d6937c19f5c1585eb8b1;hp=284a6b520861e506b2d4aeb8c5a3177e8254b9b1;hpb=3f355f47f8e7343e909ccfa854454d667baf3c38;p=openvswitch diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index 284a6b52..5b434c1f 100644 --- a/datapath/dp_dev.c +++ b/datapath/dp_dev.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * Distributed under the terms of the GNU GPL version 2. * * Significant portions of this file may be copied from parts of the Linux @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -62,9 +63,13 @@ int dp_dev_recv(struct net_device *netdev, struct sk_buff *skb) else netif_rx_ni(skb); netdev->last_rx = jiffies; + + preempt_disable(); lb_stats = per_cpu_ptr(dp_dev->lstats, smp_processor_id()); lb_stats->rx_packets++; lb_stats->rx_bytes += len; + preempt_enable(); + return len; }