Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5765065rwl; Sun, 8 Jan 2023 22:26:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXtYIiKj9HxJS9k7a69EgriMRYzWiHfT+Vd03wfUEmywQF+97In46SlT5kKMs2GVY0XLiPKZ X-Received: by 2002:a17:906:82c3:b0:7c1:9041:8c5 with SMTP id a3-20020a17090682c300b007c1904108c5mr72831689ejy.41.1673245582475; Sun, 08 Jan 2023 22:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673245582; cv=none; d=google.com; s=arc-20160816; b=kY7glNBZQQiZdavBfzL/JZu9U2KykVwKfoTMxwwf1l2fDY9I0M+UgsQOQaczkDNOuJ UPTEjk/Qi4Wpo2JDHEUEI29qoJXbqyKuFiN3Cnbp0tlzvOPONVwup8RI8wOvIIcAEoJ1 KiAC9kz9EzR9JoSiNjhsaKOCKBJB/7wRB1SX7M9aYLm4mj5N5DKQKcSDmstV6mCqqH5c i62EVtBI5EYDNSnMiBPNhwQxoazZtHjs/8n+BOxK46Ony7Wbn5Hou/OekRpOyVjmrvh1 kxj3xzpR5C6eSbVLqns5rm3E5hNa5V91fJmUZ4tiD4T/E1E4E/l5umbvCTuuGPO2Rxoe YTlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=0oXfUSucqDnprNu/xjDfCXx1MiNwuNLq5i0naIl8Ado=; b=uqU4PvWMPER4IX4hf6PAAIULlSSw+4auBA0j0eVoNo/eNqGAwLpa1mF+0HKMhKmJVY p9KrU7oAgU7k4WpBfiaqeMTilU4GIaivm2YLWL0mXNc8NO2VNoJgxqJoCfLUObP8j6CZ 3Pn3B9JiRp+19AFROhZ56C/GNIatKHsyZfa6caEP8xMaJWw/3P2VqSFcZlFqSnQWDcJ5 oPw3hf3WScFwvdzflEHekFq2b68yML8xddX69NjEbfZFgpY205eSSJ3Z/ylyrFL1oh4U fvUbSaA0WBf8OnNJASZIEDxXE+GrJCBhGmpvYUv10eGGqmCoOLP7QRzwpmK54dMttX75 naMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=eKIFupSz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170906340d00b007c1479b6a78si6736739ejb.816.2023.01.08.22.26.10; Sun, 08 Jan 2023 22:26:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=eKIFupSz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233780AbjAIGNr (ORCPT + 53 others); Mon, 9 Jan 2023 01:13:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbjAIGNp (ORCPT ); Mon, 9 Jan 2023 01:13:45 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 217AEA197; Sun, 8 Jan 2023 22:13:44 -0800 (PST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 308McDcN018600; Sun, 8 Jan 2023 22:13:31 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=0oXfUSucqDnprNu/xjDfCXx1MiNwuNLq5i0naIl8Ado=; b=eKIFupSz/vaiFF0HGQIZpg3G3SVaivFMcIqb6Z+zyWVYh76DmJ7aN6Gd3RM4h8Bz7z8S +lg6gI7CTteNj9ZRohtn4f27yjuWcN+84I5wVokqmf77OEXXmg9J6q7u5tlXnJSSgUIK uS3WpWHsYhyHTFE3swfWuOvJLm79R2AdOmWRzrAYiMUxS/iLftNFwT7MdnDqaeZji5zV 8szZ9ER6PDK6KUkEkRs+tEq1I4H0rVNlIRDUPNLf1U4IwivWBqYbi49AluA3TnBOGiGE b4FmuHkgUTQqsAazjmmuDQvWroq2iF776uRdUu84hOlFKcd3qnpGS6gbPPAiZUZ6r2bu Xw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3my94tmbgf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 08 Jan 2023 22:13:31 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Sun, 8 Jan 2023 22:13:29 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Sun, 8 Jan 2023 22:13:29 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 6D7E93F7090; Sun, 8 Jan 2023 22:13:26 -0800 (PST) From: Hariprasad Kelam To: , CC: , , , , , , Subject: [net PATCH] octeontx2-pf: Fix resource leakage in VF driver unbind Date: Mon, 9 Jan 2023 11:43:25 +0530 Message-ID: <20230109061325.21395-1-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: D2BdtYno9FprCMkB1oCNyC5ZRHhCIqe_ X-Proofpoint-GUID: D2BdtYno9FprCMkB1oCNyC5ZRHhCIqe_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-09_02,2023-01-06_01,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org resources allocated like mcam entries to support the Ntuple feature and hash tables for the tc feature are not getting freed in driver unbind. This patch fixes the issue. Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count") Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index 86653bb8e403..7f8ffbf79cf7 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -758,6 +758,8 @@ static void otx2vf_remove(struct pci_dev *pdev) if (vf->otx2_wq) destroy_workqueue(vf->otx2_wq); otx2_ptp_destroy(vf); + otx2_mcam_flow_del(vf); + otx2_shutdown_tc(vf); otx2vf_disable_mbox_intr(vf); otx2_detach_resources(&vf->mbox); if (test_bit(CN10K_LMTST, &vf->hw.cap_flag)) -- 2.17.1