mellanox: fix the dport endianness in call of __inet6_lookup_established()
PATCH 1/1 mellanox: fix the dport endianness in call of __inet6_lookup_established()
__inet6_lookup_established() expect th->dport passed in host-endian, not net-endian. The reason is microoptimization in __inet6_lookup(), but if you use the lower-level helpers, you have to play by their rules...
---
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c +1 -1
@@ -328,7 +328,7 @@ static int tls_update_resync_sn(struct net_device *netdev, sk =__inet6_lookup_established (dev_net (netdev), &tcp_hashinfo, &ipv6h->saddr, th->source, - &ipv6h->daddr, th->dest, + &ipv6h->daddr,ntohs (th->dest), netdev->ifindex,0 );#endif }
David Miller
maintainerFrom: Al Viro <[email protected]>
Date: Sat, 4 Aug 2018 21:41:27 +0100
Quoted 6 lines
__inet6_lookup_established()expectth->dportpassed in host-endian, not net-endian. The reason is microoptimization in__inet6_lookup(), but if you use the lower-level helpers, you have to play by their rules...Signed-off-by Al Viro <[email protected]>
Mellanox folks, please review.
Quoted 12 lines · David Miller
From: Al Viro <[email protected]>
Date: Sat, 4 Aug 2018 21:41:27 +0100Quoted 6 lines
__inet6_lookup_established()expectth->dportpassed in host-endian, not net-endian. The reason is microoptimization in__inet6_lookup(), but if you use the lower-level helpers, you have to play by their rules...Signed-off-by Al Viro <[email protected]>Mellanox folks, please review.
Looks good to me. Thanks Al.
From: Al Viro <[email protected]>
Date: Sat, 4 Aug 2018 21:41:27 +0100
Quoted 6 lines
__inet6_lookup_established()expectth->dportpassed in host-endian, not net-endian. The reason is microoptimization in__inet6_lookup(), but if you use the lower-level helpers, you have to play by their rules...Signed-off-by Al Viro <[email protected]>
Applied to net-next, thanks Al.