All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] virtio-net: switch to use build_skb() for small buffer
Date: Wed, 22 Feb 2017 05:06:34 +0200	[thread overview]
Message-ID: <20170222050601-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <35244d06-2d0d-3f2e-0cd1-43137988c869@redhat.com>

On Wed, Feb 22, 2017 at 10:58:08AM +0800, Jason Wang wrote:
> 
> 
> On 2017年02月21日 22:37, Michael S. Tsirkin wrote:
> > On Tue, Feb 21, 2017 at 04:46:28PM +0800, Jason Wang wrote:
> > > This patch switch to use build_skb() for small buffer which can have
> > > better performance for both TCP and XDP (since we can work at page
> > > before skb creation). It also remove lots of XDP codes since both
> > > mergeable and small buffer use page frag during refill now.
> > > 
> > >                         Before   | After
> > > XDP_DROP(xdp1) 64B  :  11.1Mpps | 14.4Mpps
> > > 
> > > Tested with xdp1/xdp2/xdp_ip_tx_tunnel and netperf.
> > > 
> > > Signed-off-by: Jason Wang<jasowang@redhat.com>
> > Thanks!
> > I had a similar patch for mergeable too, though it's trickier there
> > as host has a lot of flexibility in sizing buffers.
> > Looks like a good intermediate step to me.
> 
> Yes, I think it's more tricky for the case of mergeable buffer:
> 
> 1) we need reserve NET_SKB_PAD + NET_IP_ALIGN for each buffer, this will
> break rx frag coalescing
> 2) need tailroom for skb_shinfo, so it won't work for all size of packet
> 
> Thanks

Have you seen my prototype? It works with qemu in practice,
just needs to cover a bunch of corner cases.


> > 
> > 
> > Acked-by: Michael S. Tsirkin<mst@redhat.com>
> > 

  parent reply	other threads:[~2017-02-22  3:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21  8:46 [PATCH net-next] virtio-net: switch to use build_skb() for small buffer Jason Wang
2017-02-21 14:37 ` Michael S. Tsirkin
2017-02-21 14:37 ` Michael S. Tsirkin
2017-02-22  2:58   ` Jason Wang
2017-02-22  2:58     ` Jason Wang
2017-02-22  3:06     ` Michael S. Tsirkin
2017-02-22  3:06     ` Michael S. Tsirkin [this message]
2017-02-22  3:17       ` Jason Wang
2017-02-22  3:17         ` Jason Wang
2017-02-22  3:38         ` Jason Wang
2017-02-22  3:38           ` Jason Wang
2017-02-22  3:42         ` Michael S. Tsirkin
2017-02-22  3:42           ` Michael S. Tsirkin
2017-02-22 10:36           ` Jason Wang
2017-02-22 10:36             ` Jason Wang
2017-02-21 17:26 ` David Miller
2017-02-21 17:26   ` David Miller
2017-02-22 17:17 ` John Fastabend
2017-02-22 17:17 ` John Fastabend
2017-02-23  2:44   ` Jason Wang
2017-02-23  2:44     ` Jason Wang
  -- strict thread matches above, loose matches on Subject: below --
2017-02-21  8:46 Jason Wang

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=20170222050601-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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.