Patch "mactap: Fix checksum errors for non-gso packets in" has been added to the 3.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mactap: Fix checksum errors for non-gso packets in

to the 3.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mactap-fix-checksum-errors-for-non-gso-packets-in.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Wed May 28 21:03:54 PDT 2014
From: Vlad Yasevich <vyasevic@xxxxxxxxxx>
Date: Tue, 29 Apr 2014 10:09:50 -0400
Subject: mactap: Fix checksum errors for non-gso packets in
 bridge mode

From: Vlad Yasevich <vyasevic@xxxxxxxxxx>

[ Upstream commit cbdb04279ccaefcc702c8757757eea8ed76e50cf ]

The following is a problematic configuration:

 VM1: virtio-net device connected to macvtap0@eth0
 VM2: e1000 device connect to macvtap1@eth0

The problem is is that virtio-net supports checksum offloading
and thus sends the packets to the host with CHECKSUM_PARTIAL set.
On the other hand, e1000 does not support any acceleration.

For small TCP packets (and this includes the 3-way handshake),
e1000 ends up receiving packets that only have a partial checksum
set.  This causes TCP to fail checksum validation and to drop
packets.  As a result tcp connections can not be established.

Commit 3e4f8b787370978733ca6cae452720a4f0c296b8
	macvtap: Perform GSO on forwarding path.
fixes this issue for large packets wthat will end up undergoing GSO.
This commit adds a check for the non-GSO case and attempts to
compute the checksum for partially checksummed packets in the
non-GSO case.

CC: Daniel Lezcano <daniel.lezcano@xxxxxxx>
CC: Patrick McHardy <kaber@xxxxxxxxx>
CC: Andrian Nord <nightnord@xxxxxxxxx>
CC: Eric Dumazet <eric.dumazet@xxxxxxxxx>
CC: Michael S. Tsirkin <mst@xxxxxxxxxx>
CC: Jason Wang <jasowang@xxxxxxxxxx>
Signed-off-by: Vlad Yasevich <vyasevic@xxxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/macvtap.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -322,6 +322,15 @@ static rx_handler_result_t macvtap_handl
 			segs = nskb;
 		}
 	} else {
+		/* If we receive a partial checksum and the tap side
+		 * doesn't support checksum offload, compute the checksum.
+		 * Note: it doesn't matter which checksum feature to
+		 *        check, we either support them all or none.
+		 */
+		if (skb->ip_summed == CHECKSUM_PARTIAL &&
+		    !(features & NETIF_F_ALL_CSUM) &&
+		    skb_checksum_help(skb))
+			goto drop;
 		skb_queue_tail(&q->sk.sk_receive_queue, skb);
 	}
 


Patches currently in stable-queue which might be from vyasevic@xxxxxxxxxx are

queue-3.14/net-start-with-correct-mac_len-in-skb_network_protocol.patch
queue-3.14/net-find-the-nesting-level-of-a-given-device-by-type.patch
queue-3.14/mactap-fix-checksum-errors-for-non-gso-packets-in.patch
queue-3.14/net-allow-for-more-then-a-single-subclass-for.patch
queue-3.14/macvlan-fix-lockdep-warnings-with-stacked-macvlan.patch
queue-3.14/revert-macvlan-fix-checksums-error-when-we-are-in.patch
queue-3.14/net-sctp-cache-auth_enable-per-endpoint.patch
queue-3.14/net-sctp-test-if-association-is-dead-in-sctp_wake_up_waiters.patch
queue-3.14/net-sctp-wake-up-all-assocs-if-sndbuf-policy-is-per-socket.patch
queue-3.14/vlan-fix-lockdep-warning-with-stacked-vlan-devices.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]