From: prashantbhole.linux@gmail.com
To: "Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
"David S . Miller" <davem@davemloft.net>
Cc: Prashant Bhole <prashantbhole.linux@gmail.com>,
David Ahern <dsahern@gmail.com>,
kvm@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH net-next 0/3] vhost_net: access ptr ring using tap recvmsg
Date: Sat, 12 Oct 2019 10:53:54 +0900 [thread overview]
Message-ID: <20191012015357.1775-1-prashantbhole.linux@gmail.com> (raw)
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.
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(-)
--
2.21.0
next reply other threads:[~2019-10-12 1:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 1:53 prashantbhole.linux [this message]
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
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=20191012015357.1775-1-prashantbhole.linux@gmail.com \
--to=prashantbhole.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.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.