WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] There is no need for processing of the pending_inuse

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

diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
index eca61a9..25adbf4 100644
--- a/drivers/xen/netback/netback.c
+++ b/drivers/xen/netback/netback.c
@@ -913,11 +913,20 @@ static inline void net_tx_action_dealloc(struct xen_netbk 
*netbk)
                        gop++;
                }
 
-               if (netbk_copy_skb_mode != NETBK_DELAYED_COPY_SKB ||
-                   list_empty(&netbk->pending_inuse_head))
-                       break;
+       } while (dp != netbk->dealloc_prod);
+
+       netbk->dealloc_cons = dc;
 
-               /* Copy any entries that have been pending for too long. */
+       ret = HYPERVISOR_grant_table_op(
+               GNTTABOP_unmap_grant_ref, netbk->tx_unmap_ops,
+               gop - netbk->tx_unmap_ops);
+       BUG_ON(ret);
+
+       /*
+        * Copy any entries that have been pending for too long
+        */
+       if (netbk_copy_skb_mode == NETBK_DELAYED_COPY_SKB &&
+           !list_empty(&netbk->pending_inuse_head)) {
                list_for_each_entry_safe(inuse, n,
                                &netbk->pending_inuse_head, list) {
                        struct pending_tx_info *pending_tx_info;
@@ -943,14 +952,7 @@ static inline void net_tx_action_dealloc(struct xen_netbk 
*netbk)
 
                        break;
                }
-       } while (dp != netbk->dealloc_prod);
-
-       netbk->dealloc_cons = dc;
-
-       ret = HYPERVISOR_grant_table_op(
-               GNTTABOP_unmap_grant_ref, netbk->tx_unmap_ops,
-               gop - netbk->tx_unmap_ops);
-       BUG_ON(ret);
+       }
 
        list_for_each_entry_safe(inuse, n, &list, list) {
                struct pending_tx_info *pending_tx_info;
-- 
1.5.6.5


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