Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp825378lqp; Thu, 23 May 2024 00:36:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/HXYaHUrZTm3RL46rmsEL2ynU/W97FJMejsuFP9Wuh9UtbLUYBgn/WUNbI81Ixxf58sdoN/K56BEmvkSQ0969na38DHBXYdwv68RqQg== X-Google-Smtp-Source: AGHT+IEtGEj/bycOG/8WMTS2lQxsuHZUJMURyMeW3EOx+JTpnXIgozSpk2Cx76ut+DH00GtY4BXg X-Received: by 2002:a37:ef15:0:b0:792:c524:c67a with SMTP id af79cd13be357-79499419706mr394863785a.2.1716449817164; Thu, 23 May 2024 00:36:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716449817; cv=pass; d=google.com; s=arc-20160816; b=ouJxbhRIha473xmaVzeMqumYbnPOKfLWBEArnIm+uNCZ77BddYhGi8huofhTk+FkxP temMXHuF4EVeiSV6cPE1qvIgikUTQiOO1B+WUL8DdRsnsLwS30A2xlfutULRg5opOC3w mqcD7Q/1r6ZXkcM1C/pAs9mqo+CPyNVNk/j+rBYFA8mYnFsyA9ZODWcLg68QHgrTerar mKyzxGJS1AJE/PGmlo5g/M44tQnXnhLZ5lwlSF8i40FIil6Kjslfuy3eK3jQkyNN8ccW fFajldi0nn5pDAGtIaFa4ialZP+lr23R3yIlZKCVLdh3aUwWfzA4XRIlWSlkAvCKzkux ivZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=omQIKGTAw0G43e4lrwbPbbU3X9ktPiGbrIhpY/YNGhc=; fh=svnd6onmWxMjNRhu3Z0o4Ge6ptAse5yrW5CvA7CGsGM=; b=kF34UFWBHJevkqXXzB0QKJVjlDvOja4OS0SoDjuJU4sAGfI3yV0KKfJaaXWmdDJlOk deyYTD/CWmUfT1uLdN9lpyaYSgpav3JUVGGZXIU5tbciNnaJNXv3DSB7UUoL/4Gd7i6A mHQmTfJromRE9l5HyhD5++aXA5edI/UIfudkvB9GMR2sMqABBVTHmTCnQIQC9C5zNZJ6 IwdrOB3KFt/4+kGanfSgnGyB2s+blzAiffAXAVUMRu1Lrlpfw1/8ecZPVlK5dsuQuXsV n6lU2V2Aak8kLwugGAzgLxOZsCsV8kjL/dIQc0SJG3NGd42SDdFDRdtYTt7K9ek8llBI SlWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=VMvJA7Az; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-187100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf3625ffsi3486268085a.607.2024.05.23.00.36.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=VMvJA7Az; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-187100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E11971C2106C for ; Thu, 23 May 2024 07:36:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DFE913CAA2; Thu, 23 May 2024 07:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="VMvJA7Az" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC1E8339A0; Thu, 23 May 2024 07:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716449807; cv=none; b=mguWZbjEKxJYoVyQfDoMRFik1ftngBNydcGUmNTLCA/odoCN2CALrTK2qv0MAZgSsMuHDNucjI+Pb+OiRBSPx2Ns3+GSAK+GXrnnMKQDHj0bCBT3a7NujLVWK7SgLDDGjGJe75vvdz+G4BZJy14GuwKp4RSmKNZR/c2hG9hH6ag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716449807; c=relaxed/simple; bh=1dupYVzHMBIKdXDOUWquSr5ptPsMO6bdaJA+3SW+QhU=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=POtlYyuc7VrzbP65lbq8ImFLPYS56qEVok68IokJzR7QSzqbGMJ0Js3OEFEHGGErJtI4ND1lYOB4WXWdzfPgHp0OlHf6cS94msniqoc1pOTzW+D0zXB1daVrc52nMuUNR0wyrfYcCi/sVQM+9WIPHoXC+RTW7EbwST6N7h8QMqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=VMvJA7Az; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44N4lN0u003907; Thu, 23 May 2024 00:36:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= pfpt0220; bh=omQIKGTAw0G43e4lrwbPbbU3X9ktPiGbrIhpY/YNGhc=; b=VMv JA7AzJZE+IaJUdNgurzGrAQePD6KUw980a3J0VMgJYm3EswaKkgd24uwtzqErcW5 T5yjQkxlGNuF7Fmm0/mnXEx7brERpAUpgKgMs4ggwGKvU3eQx8i4zPtTAnSdIor4 VIE9dvjAkhgsmtw9Oau82L36cah/lym9zp95tgnlMYpl9Pm5oGzxVHBfqdWmjh3f sgUAjr+3Zzff3naypVk0xywzOCizmeWjIz8J/OIYjXfk8FRL1eQ6g59bsn8CN3WN mNCnDLc8pApAuW+wkx1xaLzYfKNb4w8HPozmi9LHu3EKk1gzMNl1zK3VRaCDGb3p CXLdg8odH6an93Jexpg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3y9y310eb4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 May 2024 00:36:32 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 23 May 2024 00:36:31 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 23 May 2024 00:36:31 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 110C63F7045; Thu, 23 May 2024 00:36:27 -0700 (PDT) From: Hariprasad Kelam To: , CC: , , , , , , , Subject: [net] Octeontx2-pf: Free send queue buffers incase of leaf to inner Date: Thu, 23 May 2024 13:06:26 +0530 Message-ID: <20240523073626.4114-1-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: EYgap4YHGi4DU8Dsp84L535Q8sqcytRG X-Proofpoint-ORIG-GUID: EYgap4YHGi4DU8Dsp84L535Q8sqcytRG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-23_04,2024-05-22_01,2024-05-17_01 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: 5e6808b4c68d ("octeontx2-pf: Add support for HTB offload") Signed-off-by: Hariprasad Kelam --- drivers/net/ethernet/marvell/octeontx2/nic/qos.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c index 070711df612e..edac008099c0 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c @@ -1422,7 +1422,10 @@ static int otx2_qos_leaf_to_inner(struct otx2_nic *pfvf, u16 classid, otx2_qos_read_txschq_cfg(pfvf, node, old_cfg); /* delete the txschq nodes allocated for this node */ + otx2_qos_disable_sq(pfvf, qid); + otx2_qos_free_hw_node_schq(pfvf, node); otx2_qos_free_sw_node_schq(pfvf, node); + pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ; /* mark this node as htb inner node */ 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 dwrr_del_node = true; /* destroy the leaf node */ + otx2_qos_disable_sq(pfvf, qid); otx2_qos_destroy_node(pfvf, node); pfvf->qos.qid_to_sqmap[qid] = OTX2_QOS_INVALID_SQ; -- 2.17.1