netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Vlad Yasevich <vyasevic@redhat.com>, netdev@vger.kernel.org
Cc: daniel.lezcano@free.fr, nightnord@gmail.com, kaber@trash.net,
	eric.dumazet@gmail.com, mst@redhat.com
Subject: Re: [PATCH v2 net 2/2] Revert "macvlan : fix checksums error when we are in bridge mode"
Date: Wed, 30 Apr 2014 10:47:09 +0800	[thread overview]
Message-ID: <5360642D.8050008@redhat.com> (raw)
In-Reply-To: <1398780591-10644-3-git-send-email-vyasevic@redhat.com>

On 04/29/2014 10:09 PM, Vlad Yasevich wrote:
> 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);
>  }

Acked-by: Jason Wang <jasowang@redhat.com>

  parent reply	other threads:[~2014-04-30  2:47 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 ` [PATCH v2 net 2/2] Revert "macvlan : fix checksums error when we are in bridge mode" Vlad Yasevich
2014-04-29 13:22   ` Michael S. Tsirkin
2014-04-30  2:47   ` Jason Wang [this message]
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=5360642D.8050008@redhat.com \
    --to=jasowang@redhat.com \
    --cc=daniel.lezcano@free.fr \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nightnord@gmail.com \
    --cc=vyasevic@redhat.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).