Message ID | 1398780591-10644-3-git-send-email-vyasevic@redhat.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, Apr 29, 2014 at 10:09:51AM -0400, 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> Acked-by: Michael S. Tsirkin <mst@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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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); }
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(-)