net/mlx5: fix port attach in secondary process
authorSuanming Mou <suanmingm@nvidia.com>
Sun, 24 Jan 2021 11:02:05 +0000 (19:02 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:08 +0000 (18:16 +0100)
commit2b36c30b8cd87585502dec0d2b89e76193f13fc3
tree5a325929322b302c3596b52f5bd03e30bc2eb4c9
parent84a22cbcc467a02772dd24156773940331994c84
net/mlx5: fix port attach in secondary process

Currently, the secondary process port UAR register mapping used by Tx
queue is done during port initializing.

Unluckily, in port hot-plug case, the secondary process was requested
to initialize the port when primary process did not complete the
device configuration and the port Tx queue number is not configured
yet. Hence, the secondary process gets the zero Tx queue number during
probing, causing the UAR registers not be mapped in the correct
fashion.

This commit checks the configured number of Tx queues in secondary
process when the port start is requested. In case the Tx queue
number mismatch found the UAR mapping is reinitialized accordingly.

Fixes: 2aac5b5d119f ("net/mlx5: sync stop/start with secondary process")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_mp_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h