diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-10-29 13:44:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-30 14:54:10 -0400 |
commit | 734cbb5b6bf9ee42ab4d71690fabf486b1f44502 (patch) | |
tree | d1bde24176732ff95d9ef9ecf6407a2edcb17beb /net/dsa | |
parent | 75fbfd33234a71556bec34b099d98f970190905d (diff) |
net: dsa: Don't set skb->protocol on outgoing tagged packets
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>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/tag_dsa.c | 2 | ||||
-rw-r--r-- | net/dsa/tag_edsa.c | 2 | ||||
-rw-r--r-- | net/dsa/tag_trailer.c | 2 |
3 files changed, 0 insertions, 6 deletions
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index ce90c8bdc658..2dab27063273 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c | |||
@@ -63,8 +63,6 @@ static netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev) | |||
63 | dsa_header[3] = 0x00; | 63 | dsa_header[3] = 0x00; |
64 | } | 64 | } |
65 | 65 | ||
66 | skb->protocol = htons(ETH_P_DSA); | ||
67 | |||
68 | skb->dev = p->parent->dst->master_netdev; | 66 | skb->dev = p->parent->dst->master_netdev; |
69 | dev_queue_xmit(skb); | 67 | dev_queue_xmit(skb); |
70 | 68 | ||
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 94fcce778679..9aeda596f7ec 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c | |||
@@ -76,8 +76,6 @@ static netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev) | |||
76 | edsa_header[7] = 0x00; | 76 | edsa_header[7] = 0x00; |
77 | } | 77 | } |
78 | 78 | ||
79 | skb->protocol = htons(ETH_P_EDSA); | ||
80 | |||
81 | skb->dev = p->parent->dst->master_netdev; | 79 | skb->dev = p->parent->dst->master_netdev; |
82 | dev_queue_xmit(skb); | 80 | dev_queue_xmit(skb); |
83 | 81 | ||
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index 115fdca34077..e268f9db8893 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c | |||
@@ -57,8 +57,6 @@ static netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev) | |||
57 | trailer[2] = 0x10; | 57 | trailer[2] = 0x10; |
58 | trailer[3] = 0x00; | 58 | trailer[3] = 0x00; |
59 | 59 | ||
60 | nskb->protocol = htons(ETH_P_TRAILER); | ||
61 | |||
62 | nskb->dev = p->parent->dst->master_netdev; | 60 | nskb->dev = p->parent->dst->master_netdev; |
63 | dev_queue_xmit(nskb); | 61 | dev_queue_xmit(nskb); |
64 | 62 | ||