]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: dsa: Don't set skb->protocol on outgoing tagged packets
authorGuenter Roeck <linux@roeck-us.net>
Wed, 29 Oct 2014 17:44:53 +0000 (10:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2014 18:54:10 +0000 (14:54 -0400)
Setting skb->protocol to a private protocol type may result in warning
messages such as
e1000e 0000:00:19.0 em1: checksum_partial proto=dada!

This happens if the L3 protocol is IP or IPv6 and skb->ip_summed is set
to CHECKSUM_PARTIAL. Looking through the code, it appears that changing
skb->protocol for transmitted packets is not necessary and may actually
be harmful. For example, it prevents purposely unmodified (from a DSA
perspective) network drivers from properly setting up their transmit
checksum offload pointers since they inspect skb->protocol to set up the
IPv4 header or IPv6 header pointers. So don't unnecessarily change the
protocol field.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_dsa.c
net/dsa/tag_edsa.c
net/dsa/tag_trailer.c

index ce90c8bdc65864576164f5b431e1d1ea15c573f4..2dab27063273d2d48d12cc13b9d73fefe92c9362 100644 (file)
@@ -63,8 +63,6 @@ static netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev)
                dsa_header[3] = 0x00;
        }
 
-       skb->protocol = htons(ETH_P_DSA);
-
        skb->dev = p->parent->dst->master_netdev;
        dev_queue_xmit(skb);
 
index 94fcce7786796a8d534dd188ce8a6562e0543c9c..9aeda596f7ec4ec2c30df9167e87c7719535de91 100644 (file)
@@ -76,8 +76,6 @@ static netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev)
                edsa_header[7] = 0x00;
        }
 
-       skb->protocol = htons(ETH_P_EDSA);
-
        skb->dev = p->parent->dst->master_netdev;
        dev_queue_xmit(skb);
 
index 115fdca34077d420290941e6a264df42255f4136..e268f9db8893deab7c2febd26ad0aae1849b157d 100644 (file)
@@ -57,8 +57,6 @@ static netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
        trailer[2] = 0x10;
        trailer[3] = 0x00;
 
-       nskb->protocol = htons(ETH_P_TRAILER);
-
        nskb->dev = p->parent->dst->master_netdev;
        dev_queue_xmit(nskb);