]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Convert slave port before building address-handle
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 21 May 2015 12:14:06 +0000 (15:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 May 2015 03:05:09 +0000 (23:05 -0400)
commit3758ef1298b66b6881c8b73949b48ef1e1c56bee
tree298d4c802b0dc1cdc886971befd727ec220da6d4
parent60c63090e39bb35de39b727a9a1d92389a5d1dc1
IB/mlx4: Convert slave port before building address-handle

When multiplexling a MAD sent from VF, we should convert the port used
by the guest to send the packet to the actual physical port which will be
used to transmit the packet, before building the relevant address-handle (AH).

This is needed under VPI for single ported VFs, since the code that builds
the AH (mlx4_ib_query_ah()) makes decisions based on the input port. If we
use the port number provided by the guest, it might have different protocol
vs. the one this packat has to go from, and hence the result could be wrong.

So far, the conversion was done after the AH was built and it worked for
single ported Eth VFs which were not enabled under VPI. When adding support
for single ported IB VFs and VPI, we hit that.

Fixes: 57fb9c317d92 ('net/mlx4: Adapt code for N-Port VF')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx4/mad.c