From: Vlad Yasevich <vyasevic@redhat.com>
To: netdev@vger.kernel.org
Cc: mst@redhat.com, Vlad Yasevich <vyasevic@redhat.com>
Subject: [PATCH v4 2/3] macvtap: Correctly set tap features when IFF_VNET_HDR is disabled.
Date: Fri, 16 Aug 2013 15:25:01 -0400 [thread overview]
Message-ID: <1376681102-19753-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1376681102-19753-1-git-send-email-vyasevic@redhat.com>
When the user turns off IFF_VNET_HDR flag, attempts to change
offload features via TUNSETOFFLOAD do not work. This could cause
GSO packets to be delivered to the user when the user is
not prepared to handle them.
To solve, allow processing of TUNSETOFFLOAD when IFF_VNET_HDR is
disabled.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/macvtap.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 448f8a5..4acfbce 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -1163,10 +1163,6 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
TUN_F_TSO_ECN | TUN_F_UFO))
return -EINVAL;
- /* TODO: only accept frames with the features that
- got enabled for forwarded frames */
- if (!(q->flags & IFF_VNET_HDR))
- return -EINVAL;
rtnl_lock();
ret = set_offload(q, arg);
rtnl_unlock();
--
1.8.1.4
next prev parent reply other threads:[~2013-08-16 22:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 19:24 [PATCH v4 0/3] Correctly perform offloads when VNET_HDR is disabled Vlad Yasevich
2013-08-16 19:25 ` [PATCH v4 1/3] macvtap: simplify usage of tap_features Vlad Yasevich
2013-08-20 20:09 ` David Miller
2013-08-16 19:25 ` Vlad Yasevich [this message]
2013-08-20 20:09 ` [PATCH v4 2/3] macvtap: Correctly set tap features when IFF_VNET_HDR is disabled David Miller
2013-08-16 19:25 ` [PATCH v4 3/3] macvtap: Ignore tap features when VNET_HDR is off Vlad Yasevich
2013-08-20 20:09 ` 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=1376681102-19753-3-git-send-email-vyasevic@redhat.com \
--to=vyasevic@redhat.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).