提交 b010a2ea 编写于 作者: Y Yu'an Wang 提交者: Yang Yingliang

qm: fix packet loss for acc

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

In this patch, we try to change depth of qm_get_avail_sqe.
For hardware qm, 1023 sqe is full. When sqe reaches 1024, qm sqe
tail equal to head, which will be treated as empty queue, causing
packet loss.
Signed-off-by: NYu'an Wang <wangyuan46@huawei.com>
Reviewed-by: NMingqiang Ling <lingmingqiang@huawei.com>
Reviewed-by: NGuangwei Zhou <zhouguangwei5@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 06aaae3b
...@@ -1244,7 +1244,7 @@ static void *qm_get_avail_sqe(struct hisi_qp *qp) ...@@ -1244,7 +1244,7 @@ static void *qm_get_avail_sqe(struct hisi_qp *qp)
struct hisi_qp_status *qp_status = &qp->qp_status; struct hisi_qp_status *qp_status = &qp->qp_status;
u16 sq_tail = qp_status->sq_tail; u16 sq_tail = qp_status->sq_tail;
if (unlikely(atomic_read(&qp->qp_status.used) == QM_Q_DEPTH)) if (unlikely(atomic_read(&qp->qp_status.used) == QM_Q_DEPTH - 1))
return NULL; return NULL;
return qp->sqe + sq_tail * qp->qm->sqe_size; return qp->sqe + sq_tail * qp->qm->sqe_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册