From: "Michael S. Tsirkin" <mst@redhat•com>
To: John Fastabend <john.fastabend@gmail•com>
Cc: daniel@iogearbox•net, shm@cumulusnetworks•com,
davem@davemloft•net, tgraf@suug•ch, alexei.starovoitov@gmail•com,
john.r.fastabend@intel•com, netdev@vger•kernel.org,
brouer@redhat•com
Subject: Re: [net-next PATCH v5 3/6] virtio_net: Add XDP support
Date: Thu, 8 Dec 2016 07:54:31 +0200 [thread overview]
Message-ID: <20161208075418-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <5848EC48.7080904@gmail.com>
On Wed, Dec 07, 2016 at 09:14:48PM -0800, John Fastabend wrote:
> On 16-12-07 08:48 PM, Michael S. Tsirkin wrote:
> > On Wed, Dec 07, 2016 at 12:11:57PM -0800, John Fastabend wrote:
> >> From: John Fastabend <john.fastabend@gmail•com>
> >>
> >> This adds XDP support to virtio_net. Some requirements must be
> >> met for XDP to be enabled depending on the mode. First it will
> >> only be supported with LRO disabled so that data is not pushed
> >> across multiple buffers. Second the MTU must be less than a page
> >> size to avoid having to handle XDP across multiple pages.
> >>
> >> If mergeable receive is enabled this patch only supports the case
> >> where header and data are in the same buf which we can check when
> >> a packet is received by looking at num_buf. If the num_buf is
> >> greater than 1 and a XDP program is loaded the packet is dropped
> >> and a warning is thrown. When any_header_sg is set this does not
> >> happen and both header and data is put in a single buffer as expected
> >> so we check this when XDP programs are loaded. Subsequent patches
> >> will process the packet in a degraded mode to ensure connectivity
> >> and correctness is not lost even if backend pushes packets into
> >> multiple buffers.
> >>
> >> If big packets mode is enabled and MTU/LRO conditions above are
> >> met then XDP is allowed.
> >>
> >> This patch was tested with qemu with vhost=on and vhost=off where
> >> mergeable and big_packet modes were forced via hard coding feature
> >> negotiation. Multiple buffers per packet was forced via a small
> >> test patch to vhost.c in the vhost=on qemu mode.
> >>
> >> Suggested-by: Shrijeet Mukherjee <shrijeet@gmail•com>
> >> Signed-off-by: John Fastabend <john.r.fastabend@intel•com>
> >
> > I'd like to note that I don't think disabling LRO is a good
> > plan long-term. It's really important for virtio performance,
> > so IMHO we need a fix for that.
> > I'm guessing that a subset of XDP programs would be quite
> > happy with just looking at headers, and that is there in the 1st buffer.
> > So how about teaching XDP that there could be a truncated packet?
> >
> > Then we won't have to disable LRO.
> >
>
> Agreed long-term we can drop this requirement this type of improvement
> would also allow working with jumbo frames on nics.
>
> I don't think it should block this patch series though.
>
> .John
Right.
next prev parent reply other threads:[~2016-12-08 5:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 20:10 [net-next PATCH v5 0/6] XDP for virtio_net John Fastabend
2016-12-07 20:11 ` [net-next PATCH v5 1/6] net: virtio dynamically disable/enable LRO John Fastabend
2016-12-08 21:36 ` Michael S. Tsirkin
2016-12-09 0:04 ` John Fastabend
2016-12-09 3:05 ` Michael S. Tsirkin
2016-12-14 13:31 ` Michael S. Tsirkin
2016-12-14 17:01 ` John Fastabend
2016-12-15 16:35 ` Michael S. Tsirkin
2016-12-07 20:11 ` [net-next PATCH v5 2/6] net: xdp: add invalid buffer warning John Fastabend
2016-12-07 20:11 ` [net-next PATCH v5 3/6] virtio_net: Add XDP support John Fastabend
2016-12-08 4:48 ` Michael S. Tsirkin
2016-12-08 5:14 ` John Fastabend
2016-12-08 5:54 ` Michael S. Tsirkin [this message]
2016-12-07 20:12 ` [net-next PATCH v5 4/6] virtio_net: add dedicated XDP transmit queues John Fastabend
2016-12-08 5:59 ` Michael S. Tsirkin
2016-12-08 17:10 ` John Fastabend
2016-12-07 20:12 ` [net-next PATCH v5 5/6] virtio_net: add XDP_TX support John Fastabend
2016-12-08 6:11 ` Michael S. Tsirkin
2016-12-08 18:18 ` John Fastabend
2016-12-08 21:08 ` Michael S. Tsirkin
2016-12-08 21:18 ` Michael S. Tsirkin
2016-12-08 21:25 ` John Fastabend
2016-12-08 21:45 ` Michael S. Tsirkin
2016-12-08 21:51 ` John Fastabend
2016-12-07 20:13 ` [net-next PATCH v5 6/6] virtio_net: xdp, add slowpath case for non contiguous buffers John Fastabend
2016-12-08 19:17 ` [net-next PATCH v5 0/6] XDP for virtio_net David Miller
2016-12-08 19:38 ` Alexei Starovoitov
2016-12-08 20:46 ` John Fastabend
2016-12-08 20:58 ` Michael S. Tsirkin
2016-12-08 21:10 ` Michael S. Tsirkin
2016-12-08 21:08 ` Alexei Starovoitov
2016-12-08 22:16 ` David Miller
2016-12-09 3:01 ` Michael S. Tsirkin
2016-12-13 8:46 ` XDP_DROP and XDP_TX (Was: Re: [net-next PATCH v5 0/6] XDP for virtio_net) Jesper Dangaard Brouer
2016-12-08 21:16 ` [net-next PATCH v5 0/6] XDP for virtio_net Michael S. Tsirkin
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=20161208075418-mutt-send-email-mst@kernel.org \
--to=mst@redhat$(echo .)com \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=john.fastabend@gmail$(echo .)com \
--cc=john.r.fastabend@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shm@cumulusnetworks$(echo .)com \
--cc=tgraf@suug$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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