From: David Vrabel <david.vrabel@citrix.com>
To: Joao Martins <joao.martins@neclab.eu>,
<xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>
Cc: <wei.liu2@citrix.com>, <ian.campbell@citrix.com>,
<david.vrabel@citrix.com>, <boris.ostrovsky@oracle.com>
Subject: Re: [Xen-devel] [RFC PATCH 13/13] xen-netfront: implement RX persistent grants
Date: Mon, 18 May 2015 17:04:28 +0100 [thread overview]
Message-ID: <555A0D8C.4020309@citrix.com> (raw)
In-Reply-To: <1431451117-70051-14-git-send-email-joao.martins@neclab.eu>
On 12/05/15 18:18, Joao Martins wrote:
> It allows a newly allocated skb to reuse the gref taken from the
> pending_ring, which means xennet will grant the pages once and release
> them only when freeing the device. It changes how netfront handles news
> skbs to be able to reuse the allocated pages similarly to how netback
> is already doing for the netback TX path.
>
> alloc_rx_buffers() will consume pages from the pending_ring to
> allocate new skbs. When responses are handled we will move the grants
> from the grant_rx to the pending_grants. The latter is a shadow ring
> that keeps all grants belonging to inflight skbs. Finally chaining
> all skbs ubuf_info together to finally pass the packet up to the
> network stack. We make use of SKBTX_DEV_ZEROCOPY to get notified
> once the skb is freed to be able to reuse pages. On the destructor
> callback we will then add the grant to the pending_ring.
>
> The only catch about this approach is: when we orphan frags, there
> will be a memcpy on skb_copy_ubufs() (if frags bigger than 0).
> Depending on the CPU and number of queues this leads to a performance
> drop of between 7-11%. For this reason, SKBTX_DEV_ZEROCOPY skbs will
> only be used with persistent grants.
This means that skbs are passed further up the stack while they are
still granted to the backend.
I think this makes it too difficult to validate that the backend can't
fiddle with the skb frags inappropriately (both now in the the future
when other changes in the network stack are made).
David
next prev parent reply other threads:[~2015-05-18 16:07 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 17:18 [RFC PATCH 00/13] Persistent grant maps for xen net drivers Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-12 17:18 ` [RFC PATCH 01/13] xen-netback: add persistent grant tree ops Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-12 17:18 ` [RFC PATCH 02/13] xen-netback: xenbus feature persistent support Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:19 ` Wei Liu
2015-05-19 15:19 ` Wei Liu
2015-05-22 10:24 ` Joao Martins
2015-05-22 10:24 ` Joao Martins
2015-05-12 17:18 ` [RFC PATCH 03/13] xen-netback: implement TX persistent grants Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:23 ` Wei Liu
2015-05-22 10:24 ` Joao Martins
2015-06-02 14:53 ` Wei Liu
2015-06-03 17:07 ` Joao Martins
2015-06-07 12:04 ` Wei Liu
2015-06-07 12:04 ` Wei Liu
2015-06-03 17:07 ` Joao Martins
2015-06-02 14:53 ` Wei Liu
2015-05-22 10:24 ` Joao Martins
2015-05-19 15:23 ` Wei Liu
2015-05-12 17:18 ` [RFC PATCH 04/13] xen-netback: implement RX " Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:32 ` Wei Liu
2015-05-22 10:25 ` Joao Martins
2015-05-22 10:25 ` Joao Martins
2015-06-02 15:07 ` Wei Liu
2015-06-03 17:08 ` Joao Martins
2015-06-03 17:08 ` Joao Martins
2015-06-02 15:07 ` Wei Liu
2015-05-19 15:32 ` Wei Liu
2015-05-12 17:18 ` [RFC PATCH 05/13] xen-netback: refactor xenvif_rx_action Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:32 ` Wei Liu
2015-05-19 15:32 ` Wei Liu
2015-05-12 17:18 ` [RFC PATCH 06/13] xen-netback: copy buffer on xenvif_start_xmit() Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:35 ` Wei Liu
2015-05-22 10:26 ` Joao Martins
2015-05-22 10:26 ` Joao Martins
2015-06-02 15:10 ` Wei Liu
2015-06-02 15:10 ` Wei Liu
2015-05-19 15:35 ` Wei Liu
2015-05-12 17:18 ` [RFC PATCH 07/13] xen-netback: add persistent tree counters to debugfs Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:36 ` Wei Liu
2015-05-19 15:36 ` Wei Liu
2015-05-12 17:18 ` [RFC PATCH 08/13] xen-netback: clone skb if skb->xmit_more is set Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-19 15:36 ` Wei Liu
2015-05-19 15:36 ` Wei Liu
2015-05-22 17:14 ` Joao Martins
2015-05-22 17:14 ` Joao Martins
2015-05-12 17:18 ` [RFC PATCH 09/13] xen-netfront: move grant_{ref, page} to struct grant Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-18 15:44 ` David Vrabel
2015-05-18 15:44 ` [Xen-devel] " David Vrabel
2015-05-19 10:19 ` Joao Martins
2015-05-19 10:19 ` [Xen-devel] " Joao Martins
2015-05-12 17:18 ` [RFC PATCH 10/13] xen-netfront: refactor claim/release grant Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-18 15:48 ` David Vrabel
2015-05-18 15:48 ` [Xen-devel] " David Vrabel
2015-05-19 10:19 ` Joao Martins
2015-05-19 10:19 ` [Xen-devel] " Joao Martins
2015-05-12 17:18 ` [RFC PATCH 11/13] xen-netfront: feature-persistent xenbus support Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-18 15:51 ` David Vrabel
2015-05-18 15:51 ` [Xen-devel] " David Vrabel
2015-05-19 10:19 ` Joao Martins
2015-05-19 10:19 ` Joao Martins
2015-05-12 17:18 ` [RFC PATCH 12/13] xen-netfront: implement TX persistent grants Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-18 15:55 ` David Vrabel
2015-05-18 15:55 ` [Xen-devel] " David Vrabel
2015-05-19 10:20 ` Joao Martins
2015-05-19 10:20 ` [Xen-devel] " Joao Martins
2015-05-19 10:23 ` David Vrabel
2015-05-19 10:23 ` [Xen-devel] " David Vrabel
2015-05-12 17:18 ` [RFC PATCH 13/13] xen-netfront: implement RX " Joao Martins
2015-05-12 17:18 ` Joao Martins
2015-05-18 16:04 ` David Vrabel
2015-05-18 16:04 ` David Vrabel [this message]
2015-05-19 10:22 ` Joao Martins
2015-05-19 10:22 ` [Xen-devel] " Joao Martins
2015-05-13 10:50 ` [Xen-devel] [RFC PATCH 00/13] Persistent grant maps for xen net drivers David Vrabel
2015-05-13 13:01 ` Joao Martins
2015-05-13 13:01 ` [Xen-devel] " Joao Martins
2015-05-13 10:50 ` David Vrabel
2015-05-19 15:39 ` Wei Liu
2015-05-19 15:39 ` Wei Liu
2015-05-22 10:27 ` Joao Martins
2015-05-22 10:27 ` Joao Martins
2015-05-29 6:53 ` Yuzhou (C)
2015-05-29 6:53 ` [Xen-devel] " Yuzhou (C)
2015-05-29 14:51 ` Joao Martins
2015-05-29 14:51 ` Joao Martins
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=555A0D8C.4020309@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=joao.martins@neclab.eu \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.