IB/mlx4: Fix WQE LSO segment calculation
IB/mlx4: Fix WQE LSO segment calculation

The current code decreases from the mss size (which is the gso_size
from the kernel skb) the size of the packet headers.

It shouldn't do that because the mss that comes from the stack
(e.g IPoIB) includes only the tcp payload without the headers.

The result is indication to the HW that each packet that the HW sends
is smaller than what it could be, and too many packets will be sent
for big messages.

An easy way to demonstrate one more aspect of the problem is by
configuring the ipoib mtu to be less than 2*hlen (2*56) and then
run app sending big TCP messages. This will tell the HW to send packets
with giant (negative value which under unsigned arithmetics becomes
a huge positive one) length and the QP moves to SQE state.

Fixes: b832be1e4007 ('IB/mlx4: Add IPoIB LSO support')
Reported-by: Matthew Finlay <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mellanox.com>
Signed-off-by: Erez Shitrit <06bd5166e13356f148173f3519001ff382c54226@mellanox.com>
Signed-off-by: Or Gerlitz <de1b678a59344538ef9f2ddb34a5f9486544e2f9@mellanox.com>
Signed-off-by: Doug Ledford <f35204f44eabfe97bbcdd18aee9e9fffc59f29e1@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs