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

[Xen-changelog] split deallocation from net_tx_action



# HG changeset patch
# User vh249@xxxxxxxxxxxxxxxxxxxx
# Node ID 6feba419cead1e49909c32dc111e2c8dedfac32e
# Parent  7bc4ebdd56605b550cc10360dd8f748f95252f47

split deallocation from net_tx_action 

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 7bc4ebdd5660 -r 6feba419cead 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Jul 25 
17:07:31 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Jul 25 
17:26:32 2005
@@ -490,30 +490,20 @@
     netif_schedule_work(netif);
 }
 
-/* Called after netfront has transmitted */
-static void net_tx_action(unsigned long unused)
-{
-    struct list_head *ent;
-    struct sk_buff *skb;
-    netif_t *netif;
-    netif_tx_request_t txreq;
-    u16 pending_idx;
-    NETIF_RING_IDX i;
+inline static void net_tx_action_dealloc(void)
+{
 #ifdef CONFIG_XEN_NETDEV_GRANT_TX
     gnttab_unmap_grant_ref_t unmap_ops[MAX_PENDING_REQS];
     gnttab_unmap_grant_ref_t *gop;
-
-    gnttab_map_grant_ref_t map_ops[MAX_PENDING_REQS];
-    gnttab_map_grant_ref_t *mop;
 #else
     multicall_entry_t *mcl;
 #endif
+    u16 pending_idx;
     PEND_RING_IDX dc, dp;
-    unsigned int data_len;
-
-
-    if ( (dc = dealloc_cons) == (dp = dealloc_prod) )
-        goto skip_dealloc;
+    netif_t *netif;
+
+    dc = dealloc_cons;
+    dp = dealloc_prod;
 
 #ifdef CONFIG_XEN_NETDEV_GRANT_TX
     /*
@@ -582,7 +572,28 @@
 #endif
     }
 
- skip_dealloc:
+}
+
+/* Called after netfront has transmitted */
+static void net_tx_action(unsigned long unused)
+{
+    struct list_head *ent;
+    struct sk_buff *skb;
+    netif_t *netif;
+    netif_tx_request_t txreq;
+    u16 pending_idx;
+    NETIF_RING_IDX i;
+#ifdef CONFIG_XEN_NETDEV_GRANT_TX
+    gnttab_map_grant_ref_t map_ops[MAX_PENDING_REQS];
+    gnttab_map_grant_ref_t *mop;
+#else
+    multicall_entry_t *mcl;
+#endif
+    unsigned int data_len;
+
+    if ( dealloc_cons != dealloc_prod )
+        net_tx_action_dealloc();
+
 #ifdef CONFIG_XEN_NETDEV_GRANT_TX
     mop = map_ops;
 #else

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


 


Rackspace

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