Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 289001 Details for
Bug 424871
Implement netif_release_rx_bufs for copying receiver
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
linux-2.6.18-xen 137:41918416db51 ported to 2.6.9-67.EL
linux-2.6.18-xen-137-41918416db51 (text/plain), 3.62 KB, created by
Ian Campbell
on 2007-12-14 10:58:58 UTC
(
hide
)
Description:
linux-2.6.18-xen 137:41918416db51 ported to 2.6.9-67.EL
Filename:
MIME Type:
Creator:
Ian Campbell
Created:
2007-12-14 10:58:58 UTC
Size:
3.62 KB
patch
obsolete
># HG changeset patch ># User Ian Campbell <ian.campbell@xensource.com> ># Date 1184590655 -3600 ># Node ID 41918416db51d1eeaba7c71259e1c0f0ea3426f6 ># Parent 34ebf92ad28d53f70ca02966c9f926f7d83bafbb >[NETFRONT] Implement netif_release_rx_bufs for the copying case. > >Also reduce the log level when we are unable end foreign access to a >grant. > >Signed-off-by: Ian Campbell <ian.campbell@xensource.com> >linux-2.6.18-xen changeset: 137:41918416db51d1eeaba7c71259e1c0f0ea3426f6 >linux-2.6.18-xen date: Mon Jul 16 13:57:35 2007 +0100 > >Index: linux-2.6.9-67.EL/drivers/xen/core/gnttab.c >=================================================================== >--- linux-2.6.9-67.EL.orig/drivers/xen/core/gnttab.c 2007-11-26 10:52:23.000000000 +0000 >+++ linux-2.6.9-67.EL/drivers/xen/core/gnttab.c 2007-12-14 09:44:29.000000000 +0000 >@@ -168,7 +168,7 @@ > nflags = shared[ref].flags; > do { > if ((flags = nflags) & (GTF_reading|GTF_writing)) { >- printk(KERN_ALERT "WARNING: g.e. still in use!\n"); >+ printk(KERN_DEBUG "WARNING: g.e. still in use!\n"); > return 0; > } > } while ((nflags = synch_cmpxchg(&shared[ref].flags, flags, 0)) != >@@ -188,7 +188,7 @@ > } else { > /* XXX This needs to be fixed so that the ref and page are > placed on a list to be freed up later. */ >- printk(KERN_WARNING >+ printk(KERN_DEBUG > "WARNING: leaking g.e. and page still in use!\n"); > } > } >Index: linux-2.6.9-67.EL/drivers/xen/netfront/netfront.c >=================================================================== >--- linux-2.6.9-67.EL.orig/drivers/xen/netfront/netfront.c 2007-12-06 15:15:02.000000000 +0000 >+++ linux-2.6.9-67.EL/drivers/xen/netfront/netfront.c 2007-12-14 09:45:42.000000000 +0000 >@@ -1443,7 +1443,7 @@ > } > } > >-static void netif_release_rx_bufs(struct netfront_info *np) >+static void netif_release_rx_bufs_flip(struct netfront_info *np) > { > struct mmu_update *mmu = np->rx_mmu; > struct multicall_entry *mcl = np->rx_mcl; >@@ -1453,11 +1453,6 @@ > int xfer = 0, noxfer = 0, unused = 0; > int id, ref; > >- if (np->copying_receiver) { >- printk("%s: fix me for copying receiver.\n", __FUNCTION__); >- return; >- } >- > skb_queue_head_init(&free_list); > > spin_lock(&np->rx_lock); >@@ -1504,7 +1499,7 @@ > xfer++; > } > >- printk("%s: %d xfer, %d noxfer, %d unused\n", >+ printk(KERN_DEBUG "%s: %d xfer, %d noxfer, %d unused\n", > __FUNCTION__, xfer, noxfer, unused); > > if (xfer) { >@@ -1529,6 +1524,45 @@ > spin_unlock(&np->rx_lock); > } > >+static void netif_release_rx_bufs_copy(struct netfront_info *np) >+{ >+ struct sk_buff *skb; >+ int i, ref; >+ int busy = 0, inuse = 0; >+ >+ spin_lock_bh(&np->rx_lock); >+ >+ for (i = 0; i < NET_RX_RING_SIZE; i++) { >+ ref = np->grant_rx_ref[i]; >+ >+ if (ref == GRANT_INVALID_REF) >+ continue; >+ >+ inuse++; >+ >+ skb = np->rx_skbs[i]; >+ >+ if (!gnttab_end_foreign_access_ref(ref, 0)) >+ { >+ busy++; >+ continue; >+ } >+ >+ gnttab_release_grant_reference(&np->gref_rx_head, ref); >+ np->grant_rx_ref[i] = GRANT_INVALID_REF; >+ add_id_to_freelist(np->rx_skbs, i); >+ >+ skb_shinfo(skb)->nr_frags = 0; >+ dev_kfree_skb(skb); >+ } >+ >+ if (busy) >+ DPRINTK("%s: Unable to release %d of %d inuse grant references out of %ld total.\n", >+ __FUNCTION__, busy, inuse, NET_RX_RING_SIZE); >+ >+ spin_unlock_bh(&np->rx_lock); >+} >+ > static int network_close(struct net_device *dev) > { > struct netfront_info *np = netdev_priv(dev); >@@ -1701,7 +1735,10 @@ > { > struct netfront_info *np = netdev_priv(dev); > netif_release_tx_bufs(np); >- netif_release_rx_bufs(np); >+ if (np->copying_receiver) >+ netif_release_rx_bufs_copy(np); >+ else >+ netif_release_rx_bufs_flip(np); > gnttab_free_grant_references(np->gref_tx_head); > gnttab_free_grant_references(np->gref_rx_head); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 424871
: 289001