summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2017-03-03 15:22:27 +0000
committerDavid S. Miller <davem@davemloft.net>2017-03-03 10:06:38 -0800
commit6d43131c158f42e2138d83495d19c70ed5cc0ffe (patch)
tree1f1da897d2cd785e1a8c303c752f363c2bb862c2
parentd0346b033899b9affa4da8c32bfb574dfb89859e (diff)
downloadlinux-6d43131c158f42e2138d83495d19c70ed5cc0ffe.tar.gz
linux-6d43131c158f42e2138d83495d19c70ed5cc0ffe.tar.bz2
linux-6d43131c158f42e2138d83495d19c70ed5cc0ffe.zip
sfc: fix IPID endianness in TSOv2
The value we read from the header is in network byte order, whereas EFX_POPULATE_QWORD_* takes values in host byte order (which it then converts to little-endian, as MCDI is little-endian). Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/sfc/ef10.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 4d88e8532d3e..c60c2d4c646a 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -2183,7 +2183,7 @@ static int efx_ef10_tx_tso_desc(struct efx_tx_queue *tx_queue,
/* Modify IPv4 header if needed. */
ip->tot_len = 0;
ip->check = 0;
- ipv4_id = ip->id;
+ ipv4_id = ntohs(ip->id);
} else {
/* Modify IPv6 header if needed. */
struct ipv6hdr *ipv6 = ipv6_hdr(skb);