Skip to content

Commit 930d671

Browse files
Hariprasad KelamNipaLocal
authored andcommitted
Octeontx2-pf: Free send queue buffers incase of leaf to inner
There are two type of classes. "Leaf classes" that are the bottom of the class hierarchy. "Inner classes" that are neither the root class nor leaf classes. QoS rules can only specify leaf classes as targets for traffic. Root / \ / \ 1 2 /\ / \ 4 5 classes 1,4 and 5 are leaf classes. class 2 is a inner class. When a leaf class made as inner, or vice versa, resources associated with send queue (send queue buffers and transmit schedulers) are not getting freed. Fixes: 5e6808b ("octeontx2-pf: Add support for HTB offload") Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: NipaLocal <nipa@local>
1 parent f58f89e commit 930d671

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,10 @@ static int otx2_qos_leaf_to_inner(struct otx2_nic *pfvf, u16 classid,
14221422
otx2_qos_read_txschq_cfg(pfvf, node, old_cfg);
14231423

14241424
/* delete the txschq nodes allocated for this node */
1425+
otx2_qos_disable_sq(pfvf, qid);
1426+
otx2_qos_free_hw_node_schq(pfvf, node);
14251427
otx2_qos_free_sw_node_schq(pfvf, node);
1428+
pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ;
14261429

14271430
/* mark this node as htb inner node */
14281431
WRITE_ONCE(node->qid, OTX2_QOS_QID_INNER);
@@ -1632,6 +1635,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
16321635
dwrr_del_node = true;
16331636

16341637
/* destroy the leaf node */
1638+
otx2_qos_disable_sq(pfvf, qid);
16351639
otx2_qos_destroy_node(pfvf, node);
16361640
pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ;
16371641

0 commit comments

Comments
 (0)