summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevich@gmail.com>2014-08-25 14:34:51 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-08-26 00:27:09 (GMT)
commitbe1d1486122092f5a323539ee4cc328d06083f63 (patch)
treedfe7d9cb87afb821b8de33d97539ef9f72943f91
parent1c53730a04fb651e35af0a12bd35f6a00481f53c (diff)
downloadlinux-be1d1486122092f5a323539ee4cc328d06083f63.tar.xz
ehea: Fix TSO and hw checksums with non-accelerated vlan packets.
The driver claims that it can do TSO and IP checksums on vlan devices and also allows user to control vlan acceleration offloading. This makes it possible to push traffic to this driver that has TSO or partial checksums set, but also have a non-accelearted vlan header. In this case, the driver will fail to correctly identify such traffic and will not correctly perform segmentation and checksum calculation. Fix this by using vlan_get_protocol() helper instead of assuming skb->protocol always has this information. CC: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index a0b418e..566b17d 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1994,7 +1994,7 @@ static void xmit_common(struct sk_buff *skb, struct ehea_swqe *swqe)
{
swqe->tx_control |= EHEA_SWQE_IMM_DATA_PRESENT | EHEA_SWQE_CRC;
- if (skb->protocol != htons(ETH_P_IP))
+ if (vlan_get_protocol(skb) != htons(ETH_P_IP))
return;
if (skb->ip_summed == CHECKSUM_PARTIAL)