IB/mlx5: Add support to dropless RQ
authorMaor Gottlieb <maorg@mellanox.com>
Tue, 30 May 2017 07:29:13 +0000 (10:29 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 24 Jul 2017 14:39:53 +0000 (10:39 -0400)
commit03404e8ae652e02a5e3388224836cef53d7a0988
tree9c4a307d6151bd1c4515c3e43564f7591db8916b
parent246ac9814c5b2c0e9916dca5fbf8d6a40245fad1
IB/mlx5: Add support to dropless RQ

RQs that were configured for "delay drop" will prevent packet drops
when their WQEs are depleted.
Marking an RQ to be drop-less is done by setting delay_drop_en in RQ
context using CREATE_RQ command.

Since this feature is globally activated/deactivated by using the
SET_DELAY_DROP command on all the marked RQs, we activated/deactivated
it according to the number of RQs with 'delay_drop' enabled.

When timeout is expired, then the feature is deactivated. Therefore
the driver handles the delay drop timeout event and reactivate it.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/qp.c
include/linux/mlx5/mlx5_ifc.h