Commit dc4c5522 authored by Dave Jiang's avatar Dave Jiang Committed by sanglipeng
Browse files

ntb: Clean up tx tail index on link down

stable inclusion
from stable-v5.10.195
commit c028e90e0de198c3b0dd9dbc2f5c8e357e45adce
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c028e90e0de198c3b0dd9dbc2f5c8e357e45adce



--------------------------------

commit cc79bd27 upstream.

The tx tail index is not reset when the link goes down. This causes the
tail index to go out of sync when the link goes down and comes back up.
Refactor the ntb_qp_link_down_reset() and reset the tail index as well.

Fixes: 2849b5d7 ("NTB: Reset transport QP link stats on down")
Reported-by: default avatarYuan Y Lu <yuan.y.lu@intel.com>
Tested-by: default avatarYuan Y Lu <yuan.y.lu@intel.com>
Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 353d6b74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment