]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes
authorMatan Barak <matanb@mellanox.com>
Thu, 15 May 2014 12:29:28 +0000 (15:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 May 2014 19:12:45 +0000 (15:12 -0400)
commite9c086b941eddba2801de563fe7150cfca13caad
tree9ff27f9b0cd1c0c205e7c68ebb9457efae518683
parent92d611c2975fa8e0aeb954ff7553f0309cda812c
IB/mlx4: Invoke UPDATE_QP for proxy QP1 on MAC changes

When we receive a netdev event indicating a netdev change and/or
a netdev address change, we must change the MAC index used by the
proxy QP1 (in the QP context), otherwise RoCE CM packets sent by the
VF will not carry the same source MAC address as the non-CM packets.

We use the UPDATE_QP command to perform this change.

In order to avoid modifying a QP context based on netdev event,
while the driver attempts to destroy this QP (e.g either the mlx4_ib
or ib_mad modules are unloaded), we use mutex locking in both flows.

Since the relevant mlx4 proxy GSI QP is created indirectly by the
mad module when they create their GSI QP, the mlx4 didn't need to
keep track on that QP prior to this change.

Now, when QP modifications are needed to this QP from within the
driver, we added refernece to it.

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/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/qp.c