From: David Vrabel <david.vrabel@citrix.com>
To: Annie Li <Annie.li@oracle.com>
Cc: <xen-devel@lists.xen.org>, <netdev@vger.kernel.org>,
<konrad.wilk@oracle.com>, <ian.campbell@citrix.com>,
<wei.liu2@citrix.com>
Subject: Re: [Xen-devel] [PATCH net-next v4] xen-netfront: clean up code in xennet_release_rx_bufs
Date: Fri, 24 Jan 2014 10:48:39 +0000 [thread overview]
Message-ID: <52E24507.8060402@citrix.com> (raw)
In-Reply-To: <1390534095-5097-1-git-send-email-Annie.li@oracle.com>
On 24/01/14 03:28, Annie Li wrote:
> From: Annie Li <annie.li@oracle.com>
>
> This patch removes grant transfer releasing code from netfront, and uses
> gnttab_end_foreign_access to end grant access since
> gnttab_end_foreign_access_ref may fail when the grant entry is
> currently used for reading or writing.
>
> * clean up grant transfer code kept from old netfront(2.6.18) which grants
> pages for access/map and transfer. But grant transfer is deprecated in current
> netfront, so remove corresponding release code for transfer.
>
> * release grant access (through gnttab_end_foreign_access) and skb for tx/rx path,
> use get_page to ensure page is released when grant access is completed successfully.
>
> Xen-blkfront/xen-tpmfront/xen-pcifront also have similar issue, but patches
> for them will be created separately.
...
> @@ -1439,8 +1403,11 @@ static int netfront_probe(struct xenbus_device *dev,
> static void xennet_end_access(int ref, void *page)
> {
> /* This frees the page as a side-effect */
> - if (ref != GRANT_INVALID_REF)
> + if (ref != GRANT_INVALID_REF) {
> + get_page(virt_to_page(page));
> gnttab_end_foreign_access(ref, 0, (unsigned long)page);
> + free_page((unsigned long)page);
> + }
> }
Please drop this hunk.
Otherwise,
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
David
next prev parent reply other threads:[~2014-01-24 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 3:28 [Xen-devel] [PATCH net-next v4] xen-netfront: clean up code in xennet_release_rx_bufs Annie Li
2014-01-24 10:48 ` David Vrabel [this message]
2014-01-24 11:05 ` annie li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E24507.8060402@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Annie.li@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).