diff options
author | Maor Gottlieb <maorg@mellanox.com> | 2016-06-17 15:01:38 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-23 11:02:45 -0400 |
commit | 89ea94a7b6c40eb423c144aef1caceebaff79c8d (patch) | |
tree | 2831167a7aecf1b24275d3aca92bc1d3fadcc107 /include/linux/mlx5/cq.h | |
parent | 7c2344c3bbf97eb5dfa732d5098285d15d3bf9bf (diff) | |
download | talos-op-linux-89ea94a7b6c40eb423c144aef1caceebaff79c8d.tar.gz talos-op-linux-89ea94a7b6c40eb423c144aef1caceebaff79c8d.zip |
IB/mlx5: Reset flow support for IB kernel ULPs
The driver exposes interfaces that directly relate to HW state.
Upon fatal error, consumers of these interfaces (ULPs) that rely
on completion of all their posted work-request could hang, thereby
introducing dependencies in shutdown order. To prevent this from
happening, we manage the relevant resources (CQs, QPs) that are used
by the device. Upon a fatal error, we now generate simulated
completions for outstanding WQEs that were not completed at the
time the HW was reset.
It includes invoking the completion event handler for all involved
CQs so that the ULPs will poll those CQs. When polled we return
simulated CQEs with IB_WC_WR_FLUSH_ERR return code enabling ULPs
to clean up their resources and not wait forever for completions
upon receiving remove_one.
The above change requires an extra check in the data path to make
sure that when device is in error state, the simulated CQEs will
be returned and no further WQEs will be posted.
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/linux/mlx5/cq.h')
-rw-r--r-- | include/linux/mlx5/cq.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/cq.h b/include/linux/mlx5/cq.h index 2be976dd4966..2566f6d6444f 100644 --- a/include/linux/mlx5/cq.h +++ b/include/linux/mlx5/cq.h @@ -58,6 +58,8 @@ struct mlx5_core_cq { void (*comp)(struct mlx5_core_cq *); void *priv; } tasklet_ctx; + int reset_notify_added; + struct list_head reset_notify; }; |