]> git.droids-corp.org - dpdk.git/commit
common/mlx5: fix queue pair ack timeout configuration
authorYajun Wu <yajunw@nvidia.com>
Mon, 14 Feb 2022 06:03:19 +0000 (08:03 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 23 Feb 2022 14:57:30 +0000 (15:57 +0100)
commit05b54bf0892dcd1e3698ba86a297722b7566cc10
tree29a26a4677477fb6d124538c322cff1db5118594
parentdbbdeb8b47f7531f9dc6a315cfadf8b900e7c635
common/mlx5: fix queue pair ack timeout configuration

VDPA driver creates two QPs(1 queue pair include 1 send queue
and 1 receive queue) per virtio queue to get traffic events
from NIC to SW.
Two QPs(called FW QP and SW QP) are created as loopback QP
and FW QP'SQ is connected to SW QP'RQ internally.

When packet receive or send out, HW will send WQE by FW QP'SQ,
then SW will get CQE from the CQ of SW QP.

With large scale and heavy traffic, the SQ's request may fail
to get ACK from RQ HW, because HW is busy.
SQ will retry the request with qpc.retry_count times and each time
wait for 4.096 uS *2^(ack_timeout) for the response. If still can’t
get RQ’s HW response, SQ will go to an error state.

16 is experienced value. It should not be too high or too low.
Too high will make QP waits too long in case it’s packet drop.
Too low will cause QP to go to an error state(retry-exceeded) easily.

Fixes: 15c3807e86ab ("common/mlx5: support DevX QP operations")
Cc: stable@dpdk.org
Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_devx_cmds.c