linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
@ 2025-05-22 11:58 Hariprasad Kelam
  2025-05-22 20:03 ` Simon Horman
  2025-05-28  6:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2025-05-22 11:58 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, Naveen Mamindlapalli

This patch addresses below issues,

1. Active traffic on the leaf node must be stopped before its send queue
   is reassigned to the parent. This patch resolves the issue by marking
   the node as 'Inner'.

2. During a system reboot, the interface receives TC_HTB_LEAF_DEL
   and TC_HTB_LEAF_DEL_LAST callbacks to delete its HTB queues.
   In the case of TC_HTB_LEAF_DEL_LAST, although the same send queue
   is reassigned to the parent, the current logic still attempts to update
   the real number of queues, leadning to below warnings

        New queues can't be registered after device unregistration.
        WARNING: CPU: 0 PID: 6475 at net/core/net-sysfs.c:1714
        netdev_queue_update_kobjects+0x1e4/0x200

Fixes: 5e6808b4c68d ("octeontx2-pf: Add support for HTB offload")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
---
v2* update the commit description about making qid as inner.


 drivers/net/ethernet/marvell/octeontx2/nic/qos.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
index 35acc07bd964..5765bac119f0 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
@@ -1638,6 +1638,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
 	if (!node->is_static)
 		dwrr_del_node = true;
 
+	WRITE_ONCE(node->qid, OTX2_QOS_QID_INNER);
 	/* destroy the leaf node */
 	otx2_qos_disable_sq(pfvf, qid);
 	otx2_qos_destroy_node(pfvf, node);
@@ -1682,9 +1683,6 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
 	}
 	kfree(new_cfg);
 
-	/* update tx_real_queues */
-	otx2_qos_update_tx_netdev_queues(pfvf);
-
 	return 0;
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
  2025-05-22 11:58 [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback Hariprasad Kelam
@ 2025-05-22 20:03 ` Simon Horman
  2025-05-28  6:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-05-22 20:03 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, Naveen Mamindlapalli

On Thu, May 22, 2025 at 05:28:42PM +0530, Hariprasad Kelam wrote:
> This patch addresses below issues,
> 
> 1. Active traffic on the leaf node must be stopped before its send queue
>    is reassigned to the parent. This patch resolves the issue by marking
>    the node as 'Inner'.
> 
> 2. During a system reboot, the interface receives TC_HTB_LEAF_DEL
>    and TC_HTB_LEAF_DEL_LAST callbacks to delete its HTB queues.
>    In the case of TC_HTB_LEAF_DEL_LAST, although the same send queue
>    is reassigned to the parent, the current logic still attempts to update
>    the real number of queues, leadning to below warnings
> 
>         New queues can't be registered after device unregistration.
>         WARNING: CPU: 0 PID: 6475 at net/core/net-sysfs.c:1714
>         netdev_queue_update_kobjects+0x1e4/0x200
> 
> Fixes: 5e6808b4c68d ("octeontx2-pf: Add support for HTB offload")
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> ---
> v2* update the commit description about making qid as inner.

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
  2025-05-22 11:58 [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback Hariprasad Kelam
  2025-05-22 20:03 ` 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, naveenm

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Thu, 22 May 2025 17:28:42 +0530 you wrote:
> This patch addresses below issues,
> 
> 1. Active traffic on the leaf node must be stopped before its send queue
>    is reassigned to the parent. This patch resolves the issue by marking
>    the node as 'Inner'.
> 
> 2. During a system reboot, the interface receives TC_HTB_LEAF_DEL
>    and TC_HTB_LEAF_DEL_LAST callbacks to delete its HTB queues.
>    In the case of TC_HTB_LEAF_DEL_LAST, although the same send queue
>    is reassigned to the parent, the current logic still attempts to update
>    the real number of queues, leadning to below warnings
> 
> [...]

Here is the summary with links:
  - [net,Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
    https://git.kernel.org/netdev/net/c/67af4ec948e8

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 11:58 [net Patchv2] octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback Hariprasad Kelam
2025-05-22 20:03 ` 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).