From: Vlad Yasevich <vyasevic@redhat.com>
To: netdev@vger.kernel.org
Cc: mst@redhat.com, eric.dumazet@gmail.com, davem@davemloft.net,
Vlad Yasevich <vyasevic@redhat.com>
Subject: [PATCHv2 net-next 0/4] macvtap: locking and offload control
Date: Tue, 25 Jun 2013 16:04:18 -0400 [thread overview]
Message-ID: <1372190662-30815-1-git-send-email-vyasevic@redhat.com> (raw)
This series of patches changes the macvtap locking to use rtnl instead
of a private lock and adds the ability for user to specify TAP offload
features.
The macvtap_lock protects the relationship between macvlan_dev and
macvtap_queue structures. This relationship is modified in 3 places:
open(), release(), and dellinks(). dellinks() is already protected
by rtnl through the rtnetlink message handling. If we add rtnl protection
during the open() and relase() calls, we can remove the private lock.
We can also stop using the _bh veriants of rcu since in most cases
either regular rcu is already taken or we don't need to disable bh.
Macvtap does not allow tap user to control of offload functionality via
TUNSETOFFLOAD ioctl. This is the ioctl that qemu uses when
attempting to enable or disable offload features that it expects on the
tap socket. The 3rd patch adds this support, but there is a small
wrinkle. Typcally, tap offloads are reversed. When the user disables
TSO to the tap, it does not expect to receive TSO packets. To do this
here, we reverse the sence such that when TSO is disabled, we actuall
disalbe GRO on the macvtap interface, but also save the user expected
offloads so that we can properly perform segmentation when passing
data to the user (patch 4).
Changes since v1:
- use rtnl locks.
- reverse the sence of offload features to make them more consitent
with user of tap.
Vlad Yasevich (4):
macvtap: Convert to using rtnl lock
macvtap: Consistently use rcu functions
macvtap: Let TUNSETOFFLOAD actually controll offload features.
macvtap: Perform GSO on forwarding path.
drivers/net/macvlan.c | 10 +++
drivers/net/macvtap.c | 176 ++++++++++++++++++++++++++++++++-------------
include/linux/if_macvlan.h | 2 +
3 files changed, 140 insertions(+), 48 deletions(-)
--
1.8.1.4
next reply other threads:[~2013-06-25 20:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 20:04 Vlad Yasevich [this message]
2013-06-25 20:04 ` [PATCHv2 net-next 1/4] macvtap: Convert to using rtnl lock Vlad Yasevich
2013-06-25 20:31 ` Eric Dumazet
2013-06-25 20:04 ` [PATCHv2 net-next 2/4] macvtap: Consistently use rcu functions Vlad Yasevich
2013-06-25 20:31 ` Eric Dumazet
2013-06-25 20:04 ` [PATCHv2 net-next 3/4] macvtap: Let TUNSETOFFLOAD actually controll offload features Vlad Yasevich
2013-06-25 20:04 ` [PATCHv2 net-next 4/4] macvtap: Perform GSO on forwarding path Vlad Yasevich
2013-06-25 20:25 ` Sergei Shtylyov
2013-06-25 23:46 ` David Miller
2013-06-25 23:45 ` [PATCHv2 net-next 0/4] macvtap: locking and offload control David Miller
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=1372190662-30815-1-git-send-email-vyasevic@redhat.com \
--to=vyasevic@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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 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).