]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: IPoIB, Reset QP after channels are closed
authorDenis Drozdov <denisd@mellanox.com>
Thu, 27 Sep 2018 11:17:54 +0000 (14:17 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Nov 2018 22:35:04 +0000 (14:35 -0800)
commitc711000c9a792aefdff8cad4248b36cbd70bc614
treee137d4cc29571d383c448013e788b440f70cac8e
parentae5197a9c37203da0b2cba60d3588b954fda276d
net/mlx5e: IPoIB, Reset QP after channels are closed

The mlx5e channels should be closed before mlx5i_uninit_underlay_qp
puts the QP into RST (reset) state during mlx5i_close. Currently QP
state incorrectly set to RST before channels got deactivated and closed,
since mlx5_post_send request expects QP in RTS (Ready To Send) state.

The fix is to keep QP in RTS state until mlx5e channels get closed
and to reset QP afterwards.

Also this fix is simply correct in order to keep the open/close flow
symmetric, i.e mlx5i_init_underlay_qp() is called first thing at open,
the correct thing to do is to call mlx5i_uninit_underlay_qp() last thing
at close, which is exactly what this patch is doing.

Fixes: 0d67bdd1ab50 ("net/mlx5: Support for attaching multiple underlay QPs to root flow table")
Signed-off-by: Denis Drozdov <denisd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c