All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: prashantbhole.linux@gmail.com,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: 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 15:57:21 +0800	[thread overview]
Message-ID: <8f319697-34e1-fde5-65f3-7db8dc723982@redhat.com> (raw)
In-Reply-To: <20191012015357.1775-1-prashantbhole.linux@gmail.com>


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.


>
> 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


  parent reply	other threads:[~2019-10-12  7:57 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 ` Jason Wang [this message]
2019-10-12 20:38   ` [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg 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=8f319697-34e1-fde5-65f3-7db8dc723982@redhat.com \
    --to=jasowang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --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 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.