From: Vlad Yasevich <vyasevic@redhat.com>
To: netdev@vger.kernel.org
Cc: daniel.lezcano@free.fr, nightnord@gmail.com, kaber@trash.net,
eric.dumazet@gmail.com, mst@redhat.com, jasowang@redhat.com,
Vlad Yasevich <vyasevic@redhat.com>
Subject: [PATCH v2 net 2/2] Revert "macvlan : fix checksums error when we are in bridge mode"
Date: Tue, 29 Apr 2014 10:09:51 -0400 [thread overview]
Message-ID: <1398780591-10644-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1398780591-10644-1-git-send-email-vyasevic@redhat.com>
This reverts commit 12a2856b604476c27d85a5f9a57ae1661fc46019.
The commit above doesn't appear to be necessary any more as the
checksums appear to be correctly computed/validated.
Additionally the above commit breaks kvm configurations where
one VM is using a device that support checksum offload (virtio) and
the other VM does not.
In this case, packets leaving virtio device will have CHECKSUM_PARTIAL
set. The packets is forwarded to a macvtap that has offload features
turned off. Since we use CHECKSUM_UNNECESSARY, the host does does not
update the checksum and thus a bad checksum is passed up to
the guest.
CC: Daniel Lezcano <daniel.lezcano@free.fr>
CC: Patrick McHardy <kaber@trash.net>
CC: Andrian Nord <nightnord@gmail.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Jason Wang <jasowang@redhat.com>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/macvlan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 1831fb7..33b6cf8 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -263,11 +263,9 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
const struct macvlan_dev *vlan = netdev_priv(dev);
const struct macvlan_port *port = vlan->port;
const struct macvlan_dev *dest;
- __u8 ip_summed = skb->ip_summed;
if (vlan->mode == MACVLAN_MODE_BRIDGE) {
const struct ethhdr *eth = (void *)skb->data;
- skb->ip_summed = CHECKSUM_UNNECESSARY;
/* send to other bridge ports directly */
if (is_multicast_ether_addr(eth->h_dest)) {
@@ -285,7 +283,6 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
}
xmit_world:
- skb->ip_summed = ip_summed;
skb->dev = vlan->lowerdev;
return dev_queue_xmit(skb);
}
--
1.9.0
next prev parent reply other threads:[~2014-04-29 14:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 14:09 [PATCH v2 net 0/2] Fix macvtap checksum errors in bridge mode Vlad Yasevich
2014-04-29 14:09 ` [PATCH v2 net 1/2] mactap: Fix checksum errors for non-gso packets " Vlad Yasevich
2014-04-29 13:21 ` Michael S. Tsirkin
2014-04-30 2:46 ` Jason Wang
2014-04-29 14:09 ` Vlad Yasevich [this message]
2014-04-29 13:22 ` [PATCH v2 net 2/2] Revert "macvlan : fix checksums error when we are in bridge mode" Michael S. Tsirkin
2014-04-30 2:47 ` Jason Wang
2014-04-30 20:15 ` [PATCH v2 net 0/2] Fix macvtap checksum errors in bridge mode 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=1398780591-10644-3-git-send-email-vyasevic@redhat.com \
--to=vyasevic@redhat.com \
--cc=daniel.lezcano@free.fr \
--cc=eric.dumazet@gmail.com \
--cc=jasowang@redhat.com \
--cc=kaber@trash.net \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nightnord@gmail.com \
/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).