[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Make sure we only bump rx_packets when we're definitely going to call netif_rx_ni().



Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 drivers/xen/netback/netback.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
index 1a4a20e..066d140 100644
--- a/drivers/xen/netback/netback.c
+++ b/drivers/xen/netback/netback.c
@@ -1519,9 +1519,6 @@ static void net_tx_submit(struct xen_netbk *netbk)
                skb->dev      = netif->dev;
                skb->protocol = eth_type_trans(skb, skb->dev);
 
-               netif->stats.rx_bytes += skb->len;
-               netif->stats.rx_packets++;
-
                if (skb->ip_summed == CHECKSUM_PARTIAL) {
                        if (skb_checksum_setup(skb)) {
                                DPRINTK("Can't setup checksum in 
net_tx_action\n");
@@ -1537,6 +1534,9 @@ static void net_tx_submit(struct xen_netbk *netbk)
                        continue;
                }
 
+               netif->stats.rx_bytes += skb->len;
+               netif->stats.rx_packets++;
+
                netif_rx_ni(skb);
                netif->dev->last_rx = jiffies;
        }
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.