]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Allow only raw Ethernet QPs when RoCE isn't enabled
authorMark Bloch <markb@mellanox.com>
Wed, 6 May 2020 07:16:02 +0000 (10:16 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 6 May 2020 20:52:01 +0000 (17:52 -0300)
commite6b885500423b30f352d74e29295e22aaf3c74ad
treed12bd7d146952ae987fdca00e8090a7860ee1741
parentda8e7e66e18ac32a49c78640e4280a8e98acdea0
RDMA/mlx5: Allow only raw Ethernet QPs when RoCE isn't enabled

When operating in switchdev mode or using devlink to disable RoCE
only raw Ethernet QPs are allowed to be created.

When in switchdev mode this can lead to passing an invalid port number
as part of the modify qp firmware cmd and will lead to a syndrome
reported back to the user, such as:

 * mlx5_cmd_check:803:(pid 50148): RST2INIT_QP(0x502) op_mod(0x0) failed,
   status bad parameter(0x3), syndrome (0x177405).

Internal UD QP might be used to test for write combining support (even if
externally we report RoCE as disabled) check for that specific flag and
allow is specifically.

Fixes: c6efc58387ce ("IB/mlx5: Add proper representors support")
Link: https://lore.kernel.org/r/20200506071602.7177-3-leon@kernel.org
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c