]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Fix slave id computation for single port VF
authorMatan Barak <matanb@mellanox.com>
Sun, 4 May 2014 14:07:23 +0000 (17:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 May 2014 19:48:21 +0000 (15:48 -0400)
commitf8c0ac393d79b916ab0dea3b366f8d1abd306bed
treedb60ab06d01c7e08a73dea7da80dedd5a5a9d171
parenta42a1e1cfcbdcdfd0936777709180745a0b9b6de
net/mlx4_core: Fix slave id computation for single port VF

The code that deals with computing the slave id based on a given GID
gave wrong results when the number of single port VFs wasn't the
same for port 1 vs. port 2 and the relevant VF is single ported on
port 2. As a result, incoming CM MADs were dispatched to the wrong VF.
Fixed that and added documentation to clarify the computation steps.

Fixes: fc1f0f0 ('net/mlx4: Adapt code for N-Port VF')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/port.c