lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191012163722-mutt-send-email-mst@kernel.org>
Date:   Sat, 12 Oct 2019 16:38:30 -0400
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     prashantbhole.linux@...il.com,
        "David S . Miller" <davem@...emloft.net>,
        David Ahern <dsahern@...il.com>, kvm@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg

On Sat, Oct 12, 2019 at 03:57:21PM +0800, Jason Wang wrote:
> 
> On 2019/10/12 上午9:53, prashantbhole.linux@...il.com wrote:
> > From: Prashant Bhole <prashantbhole.linux@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ