Skip to content

Commit 67af4ec

Browse files
Hariprasad KelamPaolo Abeni
authored andcommitted
octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
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: 5e6808b ("octeontx2-pf: Add support for HTB offload") 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 479c580 commit 67af4ec

File tree

1 file changed

+1
-3
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
16381638
if (!node->is_static)
16391639
dwrr_del_node = true;
16401640

1641+
WRITE_ONCE(node->qid, OTX2_QOS_QID_INNER);
16411642
/* destroy the leaf node */
16421643
otx2_qos_disable_sq(pfvf, qid);
16431644
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
16821683
}
16831684
kfree(new_cfg);
16841685

1685-
/* update tx_real_queues */
1686-
otx2_qos_update_tx_netdev_queues(pfvf);
1687-
16881686
return 0;
16891687
}
16901688

0 commit comments

Comments
 (0)