]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commitdiff
netback: Fixes for delayed copy of tx network packets.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Dec 2009 14:14:28 +0000 (14:14 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Dec 2009 14:14:28 +0000 (14:14 +0000)
 - Should call net_tx_action_dealloc() even when dealloc ring is
   empty, as there may in any case be work to do on the
   pending_inuse list.
 - Should not exit directly from the middle of the tx_action tasklet,
   as the tx_pending_timer should always be checked and updated at the
   end of the tasklet.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
drivers/xen/netback/netback.c

index bc5853a5ec4a00d51689af299b305730d4f6ceee..ec028cde706a7e6fa9d968c739504db88d029fba 100644 (file)
@@ -1233,8 +1233,7 @@ static void net_tx_action(unsigned long unused)
        unsigned int data_len;
        int ret, work_to_do;
 
-       if (dealloc_cons != dealloc_prod)
-               net_tx_action_dealloc();
+       net_tx_action_dealloc();
 
        mop = tx_map_ops;
        while (((NR_PENDING_REQS + MAX_SKB_FRAGS) < MAX_PENDING_REQS) &&
@@ -1388,7 +1387,7 @@ static void net_tx_action(unsigned long unused)
        }
 
        if (mop == tx_map_ops)
-               return;
+               goto out;
 
        ret = HYPERVISOR_grant_table_op(
                GNTTABOP_map_grant_ref, tx_map_ops, mop - tx_map_ops);
@@ -1455,6 +1454,7 @@ static void net_tx_action(unsigned long unused)
                netif->dev->last_rx = jiffies;
        }
 
+ out:
        if (netbk_copy_skb_mode == NETBK_DELAYED_COPY_SKB &&
            !list_empty(&pending_inuse_head)) {
                struct netbk_tx_pending_inuse *oldest;