From 2add3aea517b5df3b3eeb1df17dfe35ee74af3a7 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 7 Dec 2009 14:14:28 +0000 Subject: [PATCH] netback: Fixes for delayed copy of tx network packets. - 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 --- drivers/xen/netback/netback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c index bc5853a5..ec028cde 100644 --- a/drivers/xen/netback/netback.c +++ b/drivers/xen/netback/netback.c @@ -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; -- 2.39.5