* [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown
@ 2025-05-22 9:47 Hariprasad Kelam
2025-05-22 19:54 ` Simon Horman
2025-05-28 6:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2025-05-22 9:47 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: Hariprasad Kelam, Sunil Goutham, Geetha sowjanya,
Subbaraya Sundeep, Bharat Bhushan, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jacob Keller,
Simon Horman
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: ab6dddd2a669 ("octeontx2-pf: qos send queues management")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
---
v2: Push the change to net
.../ethernet/marvell/octeontx2/nic/qos_sq.c | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
index c5dbae0e513b..58d572ce08ef 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
@@ -256,6 +256,26 @@ int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx)
return err;
}
+static int otx2_qos_nix_npa_ndc_sync(struct otx2_nic *pfvf)
+{
+ struct ndc_sync_op *req;
+ int rc;
+
+ mutex_lock(&pfvf->mbox.lock);
+
+ req = otx2_mbox_alloc_msg_ndc_sync_op(&pfvf->mbox);
+ if (!req) {
+ mutex_unlock(&pfvf->mbox.lock);
+ return -ENOMEM;
+ }
+
+ req->nix_lf_tx_sync = true;
+ req->npa_lf_sync = true;
+ rc = otx2_sync_mbox_msg(&pfvf->mbox);
+ mutex_unlock(&pfvf->mbox.lock);
+ return rc;
+}
+
void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
{
struct otx2_qset *qset = &pfvf->qset;
@@ -285,6 +305,8 @@ void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
otx2_qos_sqb_flush(pfvf, sq_idx);
otx2_smq_flush(pfvf, otx2_get_smq_idx(pfvf, sq_idx));
+ /* NIX/NPA NDC sync */
+ otx2_qos_nix_npa_ndc_sync(pfvf);
otx2_cleanup_tx_cqes(pfvf, cq);
mutex_lock(&pfvf->mbox.lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown
2025-05-22 9:47 [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown Hariprasad Kelam
@ 2025-05-22 19:54 ` Simon Horman
2025-05-28 6:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-05-22 19:54 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: netdev, linux-kernel, Sunil Goutham, Geetha sowjanya,
Subbaraya Sundeep, Bharat Bhushan, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jacob Keller
On Thu, May 22, 2025 at 03:17:41PM +0530, Hariprasad Kelam wrote:
> 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: ab6dddd2a669 ("octeontx2-pf: qos send queues management")
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> ---
> v2: Push the change to net
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown
2025-05-22 9:47 [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown Hariprasad Kelam
2025-05-22 19:54 ` Simon Horman
@ 2025-05-28 6:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-28 6:50 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: netdev, linux-kernel, sgoutham, gakula, sbhatta, bbhushan2,
andrew+netdev, davem, edumazet, kuba, pabeni, jacob.e.keller,
horms
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 22 May 2025 15:17:41 +0530 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net,v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown
https://git.kernel.org/netdev/net/c/479c58016099
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-28 6:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 9:47 [net Patch v2] octeontx2-pf: QOS: Perform cache sync on send queue teardown Hariprasad Kelam
2025-05-22 19:54 ` Simon Horman
2025-05-28 6:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).