RDMA/rtrs: Enable the same selective signal for heartbeat and IO
authorJack Wang <jinpu.wang@ionos.com>
Mon, 12 Jul 2021 06:07:47 +0000 (08:07 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 15 Jul 2021 17:24:14 +0000 (14:24 -0300)
commite2d98504c697f9c8e45b815062f8893b10808d8e
treecf1e8f39bcf296a8fb316fac7921bb40d6459aec
parenta10431eff136ef15e1f9955efe369744b1294db1
RDMA/rtrs: Enable the same selective signal for heartbeat and IO

On idle session, because we do not do signal for heartbeat, it will
overflow the send queue after sometime.

To avoid that, we need to enable the signal for heartbeat. To do that, add
a new member signal_interval in rtrs_path, which will set min of
queue_depth and SERVICE_CON_QUEUE_DEPTH, and track it for both heartbeat
and IO, so the sq queue full accounting is correct.

Fixes: b38041d50add ("RDMA/rtrs: Do not signal for heatbeat")
Link: https://lore.kernel.org/r/20210712060750.16494-4-jinpu.wang@ionos.com
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Reviewed-by: Aleksei Marov <aleksei.marov@ionos.com>
Reviewed-by: Gioh Kim <gi-oh.kim@ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/infiniband/ulp/rtrs/rtrs-pri.h
drivers/infiniband/ulp/rtrs/rtrs-srv.c
drivers/infiniband/ulp/rtrs/rtrs.c