From patchwork Mon Jan 9 06:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 40673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1999979wrt; Sun, 8 Jan 2023 22:17:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXvja76eC01ER3iYl2ubww2+cuA9pDv+8Ad6uypiYRicpqNoEA+ip5v3J6nElKUqswWe5EJo X-Received: by 2002:a17:907:d50e:b0:7c1:5982:d729 with SMTP id wb14-20020a170907d50e00b007c15982d729mr63326261ejc.56.1673245062323; Sun, 08 Jan 2023 22:17:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673245062; cv=none; d=google.com; s=arc-20160816; b=jb1Oi9mgiGRRJJGCrMQTOqaAGOgpD/9UPhZnCTvdXA18zVm7IALVGWu33klg1WU5za WtzQv6KClMkpYdfshZbTHAT0YyAk2NFl+xn35/QK1o6cQtSWa8fMKhI9Fip2xx4uQhEY Ia/OU4+ygpR02Ivxgg+OpWnDIYiircJ4wvt5/K1yyqBlY0rY7aEoc7OhFALlCE2707OG lElTwAIesWuGt6VxWLb4Dqz2UsnkZT34nauShvVDBL95q5ELYwTWw4TNHrhDOCi1zgsU 50eT4MaKusyzbjLuMkPlSzUFC7QVxVK/kUhBTxOhaCM8Nov/pVVOYIyROUchU0bemc0k 9YpA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg5-20020a17090705c500b0084d5de1fc0asi211130ejb.606.2023.01.08.22.17.18; Sun, 08 Jan 2023 22:17:42 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754524614393675246?= X-GMAIL-MSGID: =?utf-8?q?1754524614393675246?= 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))