From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: prashantbhole.linux@gmail.com,
"David S . Miller" <davem@davemloft.net>,
David Ahern <dsahern@gmail.com>,
kvm@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg
Date: Sat, 12 Oct 2019 16:38:30 -0400 [thread overview]
Message-ID: <20191012163722-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <8f319697-34e1-fde5-65f3-7db8dc723982@redhat.com>
On Sat, Oct 12, 2019 at 03:57:21PM +0800, Jason Wang wrote:
>
> On 2019/10/12 上午9:53, prashantbhole.linux@gmail.com wrote:
> > From: Prashant Bhole <prashantbhole.linux@gmail.com>
> >
> > vhost_net needs to peek tun packet sizes to allocate virtio buffers.
> > Currently it directly accesses tap ptr ring to do it. Jason Wang
> > suggested to achieve this using msghdr->msg_control and modifying the
> > behavior of tap recvmsg.
>
>
> Note this may use more indirect calls, this could be optimized in the future
> by doing XDP/skb receiving by vhost_net its own.
So it looks like this is going in the reverse direction,
moving more data path code from vhost to tun.
What's the point of the patchset then?
>
> >
> > This change will be useful in future in case of virtio-net XDP
> > offload. Where packets will be XDP processed in tap recvmsg and vhost
> > will see only non XDP_DROP'ed packets.
> >
> > Patch 1: reorganizes the tun_msg_ctl so that it can be extended by
> > the means of different commands. tap sendmsg recvmsg will behave
> > according to commands.
> >
> > Patch 2: modifies recvmsg implementation to produce packet pointers.
> > vhost_net uses recvmsg API instead of ptr_ring_consume().
> >
> > Patch 3: removes ptr ring usage in vhost and functions those export
> > ptr ring from tun/tap.
> >
> > Prashant Bhole (3):
> > tuntap: reorganize tun_msg_ctl usage
> > vhost_net: user tap recvmsg api to access ptr ring
> > tuntap: remove usage of ptr ring in vhost_net
> >
> > drivers/net/tap.c | 44 ++++++++++++++---------
> > drivers/net/tun.c | 45 +++++++++++++++---------
> > drivers/vhost/net.c | 79 ++++++++++++++++++++++--------------------
> > include/linux/if_tun.h | 9 +++--
> > 4 files changed, 103 insertions(+), 74 deletions(-)
>
>
> It would be helpful that if you can share some performance numbers here.
>
> Thanks
prev parent reply other threads:[~2019-10-12 20:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 1:53 [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg prashantbhole.linux
2019-10-12 1:53 ` [PATCH net-next 1/3] tuntap: reorganize tun_msg_ctl usage prashantbhole.linux
2019-10-12 7:44 ` Jason Wang
2019-10-15 0:33 ` Prashant Bhole
2019-10-12 1:53 ` [PATCH net-next 2/3] vhost_net: user tap recvmsg api to access ptr ring prashantbhole.linux
2019-10-12 7:54 ` Jason Wang
2019-10-12 20:41 ` Michael S. Tsirkin
2019-10-15 0:57 ` Prashant Bhole
2019-10-12 1:53 ` [PATCH net-next 3/3] tuntap: remove usage of ptr ring in vhost_net prashantbhole.linux
2019-10-12 7:57 ` [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg Jason Wang
2019-10-12 20:38 ` Michael S. Tsirkin [this message]
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=20191012163722-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=prashantbhole.linux@gmail.com \
/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).