net/mlx5: fix shared Rx queue segment configuration match
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Wed, 24 Nov 2021 14:33:16 +0000 (16:33 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 24 Nov 2021 16:25:37 +0000 (17:25 +0100)
commit572c9d4bda08555f21ad1f4964a60810c1a23d2d
treea28fbcc3ec774d91134ed535691fcc366bacb223
parent94421842de9a821778b95b928945ed8ea382302d
net/mlx5: fix shared Rx queue segment configuration match

While joining the shared Rx queue to the existing queue group,
the queue configurations is checked to be the same as it was
specified in the first group queue creation - all shared
queues should be created with identical configurations.

During the Rx queue creation the buffer split segment
configuration can be altered - the zero segment sizes are
substituted with the actual ones, inherited from the pools,
number of segments can be extended to cover the maximal
packet length, etc. It means the actual queue segment
configuration can not be used directly to match the
configuration provided in the queue setup call.

To resolve an issue we should store original parameters
in the shared queue structure and perform the check against
one of these stored ones.

Fixes: 09c2555303be ("net/mlx5: support shared Rx queue")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_rx.h
drivers/net/mlx5/mlx5_rxq.c