Skip to content

Commit 479c580

Browse files
Hariprasad KelamPaolo Abeni
authored andcommitted
octeontx2-pf: QOS: Perform cache sync on send queue teardown
QOS is designed to create a new send queue whenever a class is created, ensuring proper shaping and scheduling. However, when multiple send queues are created and deleted in a loop, SMMU errors are observed. This patch addresses the issue by performing an data cache sync during the teardown of QOS send queues. Fixes: ab6dddd ("octeontx2-pf: qos send queues management") Signed-off-by: Hariprasad Kelam <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 8469926 commit 479c580

File tree

1 file changed

+22
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+22
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,26 @@ int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx)
256256
return err;
257257
}
258258

259+
static int otx2_qos_nix_npa_ndc_sync(struct otx2_nic *pfvf)
260+
{
261+
struct ndc_sync_op *req;
262+
int rc;
263+
264+
mutex_lock(&pfvf->mbox.lock);
265+
266+
req = otx2_mbox_alloc_msg_ndc_sync_op(&pfvf->mbox);
267+
if (!req) {
268+
mutex_unlock(&pfvf->mbox.lock);
269+
return -ENOMEM;
270+
}
271+
272+
req->nix_lf_tx_sync = true;
273+
req->npa_lf_sync = true;
274+
rc = otx2_sync_mbox_msg(&pfvf->mbox);
275+
mutex_unlock(&pfvf->mbox.lock);
276+
return rc;
277+
}
278+
259279
void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
260280
{
261281
struct otx2_qset *qset = &pfvf->qset;
@@ -285,6 +305,8 @@ void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
285305

286306
otx2_qos_sqb_flush(pfvf, sq_idx);
287307
otx2_smq_flush(pfvf, otx2_get_smq_idx(pfvf, sq_idx));
308+
/* NIX/NPA NDC sync */
309+
otx2_qos_nix_npa_ndc_sync(pfvf);
288310
otx2_cleanup_tx_cqes(pfvf, cq);
289311

290312
mutex_lock(&pfvf->mbox.lock);

0 commit comments

Comments
 (0)