From: Vlad Yasevich <vyasevic@redhat.com>
To: netdev@vger.kernel.org
Cc: mst@redhat.com, Vlad Yasevich <vyasevic@redhat.com>
Subject: [PATCH v3 1/2] macvtap: include all checksum offloads in TUN_OFFLOAD mask
Date: Thu, 15 Aug 2013 13:02:52 -0400 [thread overview]
Message-ID: <1376586173-4242-2-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1376586173-4242-1-git-send-email-vyasevic@redhat.com>
The features of the macvlan are based on the features of lower
device and thus can have checksum featurs other then IFF_F_HW_CSUM
set. However, TUN_OFFLOAD mask only includes IFF_F_HW_CSUM. Thus
when performing gso segmentation during macvtap_forward(),
it is possbile to end up with skbs that have ip_summed set
to CHECKSUM_PARTIAL. This is incorrect when the user
turns off checksum offloading.
Include all possible checksum offload values so that
we'll properly mask them off when performing GSO.
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/macvtap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index b51db2a..8121358 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -65,7 +65,7 @@ static struct cdev macvtap_cdev;
static const struct proto_ops macvtap_socket_ops;
-#define TUN_OFFLOADS (NETIF_F_HW_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \
+#define TUN_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_TSO_ECN | NETIF_F_TSO | \
NETIF_F_TSO6 | NETIF_F_UFO)
#define RX_OFFLOADS (NETIF_F_GRO | NETIF_F_LRO)
/*
--
1.8.1.4
next prev parent reply other threads:[~2013-08-15 17:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 17:02 [PATCH v3 0/2] Correctly perform offloads when VNET_HDR is disabled Vlad Yasevich
2013-08-15 17:02 ` Vlad Yasevich [this message]
2013-08-15 18:24 ` [PATCH v3 1/2] macvtap: include all checksum offloads in TUN_OFFLOAD mask Michael S. Tsirkin
2013-08-15 18:45 ` Vlad Yasevich
2013-08-15 18:52 ` Michael S. Tsirkin
2013-08-15 19:09 ` Michael S. Tsirkin
2013-08-15 19:20 ` Michael S. Tsirkin
2013-08-15 19:26 ` Vlad Yasevich
2013-08-15 19:44 ` Michael S. Tsirkin
2013-08-15 17:02 ` [PATCH v3 2/2] macvtap: Allow tap features change when IFF_VNET_HDR is disabled Vlad Yasevich
2013-08-15 17:33 ` Michael S. Tsirkin
2013-08-15 18:39 ` Vlad Yasevich
2013-08-15 18:48 ` Michael S. Tsirkin
2013-08-15 18:59 ` Vlad Yasevich
2013-08-15 19:27 ` Michael S. Tsirkin
2013-08-15 19:36 ` Vlad Yasevich
2013-08-15 20:16 ` David Miller
2013-08-15 20:52 ` Michael S. Tsirkin
2013-08-15 22:39 ` 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=1376586173-4242-2-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).