From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56953A04A4; Wed, 2 Mar 2022 08:57:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC2594014E; Wed, 2 Mar 2022 08:57:56 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2064.outbound.protection.outlook.com [40.107.237.64]) by mails.dpdk.org (Postfix) with ESMTP id E067940141; Wed, 2 Mar 2022 08:57:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kzF+dlpx8/2O0aQruJ5SARK4mx3sD8q7YufGBstcdGus94mBAis26BfEAYTTgjyPsySrm8upN2EEYmbT3TaEhNbEVy4A19ZJmELu1qk0i6Ez66MVlJjYKDODTZ72veCveQSXKc3b6WRyV9nANV09NFTJG3580kKgIZ5Jbyb93vKVB83Kzd++hxDcDXCZackcvEmBYls+vd99Slq9e2dfZ2x/K7D6BZKDg1wDtWUv5j8z5VoXoreSBsXuiDdAJeECytpf93+t0uLj0Zc71xYUsHHz18jJmRRjJzEdmGOyZ8ikiRM/gxQPbT4a2UgJryARldOJN5mOc/U2xvqTOpLVVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YKn5uJ2MmnsxBvwYOeuFenfUNy3KvBroOaIPpeIwZY4=; b=KrQp5tdgmCk41Q38XQjmNdBL2SBd4bkbiEJYAswnM9en36n+aqFvwgC3/PD2mei9/hc5YKQyKsm5Kb8ovAaGo8iroZoy2oWRqPGUJ3XTbaQ/BDkFmNxefAlzgJwm1jlAiXyRMW7vHSwN+k8mXPB0No2jb/to7ksC8XpWtdtmpfX803vyyVjR34LHxOVeFTSjrOwhnQXeGTupktEwR2WDBOINzCJiqasl46FaLmXevdb2CPQLsdTGpOvVMcpTVlgKBllcpesR5gwaM/NNtFwFC0RNGqprYvH10hRSJlOMJSRGHoNXW74WcDQhni2GsV4nak2XliAHDzwb1Xz/FJ/YPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YKn5uJ2MmnsxBvwYOeuFenfUNy3KvBroOaIPpeIwZY4=; b=rj2XOuGBCx8C3Q9jxtK67kRrmU831/yyx32ml1F/hk/n6XH4/tcq3/0Nk/OBtUCXS6pBYXzwWorjSojc4po8JIS+fSUbqXacruDdotSNvuHUsuBxAAhet3GbLiV+sGAApkTPgIAywngITmHWA7Li67mYLOrgqbc32GfS4ipbVSRn9ttGzRT66WeFbfCuL53fVXX0+vSmRfHo0iWZ35i0wBH87XsKOt9Jck6YEq08HewjA4Jw1nWqLe9JIH9Dp9g1GedlelserKTr1EOd35mAIzqAbkpfZhdNmuom60DgdUEIw/iak4l9byx6onp/YEr4Jd31tBsnL2n4CloEhis6dg== Received: from MWHPR15CA0038.namprd15.prod.outlook.com (2603:10b6:300:ad::24) by CH2PR12MB3751.namprd12.prod.outlook.com (2603:10b6:610:25::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.26; Wed, 2 Mar 2022 07:57:53 +0000 Received: from CO1NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:300:ad:cafe::7b) by MWHPR15CA0038.outlook.office365.com (2603:10b6:300:ad::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14 via Frontend Transport; Wed, 2 Mar 2022 07:57:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT063.mail.protection.outlook.com (10.13.175.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5038.14 via Frontend Transport; Wed, 2 Mar 2022 07:57:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 2 Mar 2022 07:57:51 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 1 Mar 2022 23:57:49 -0800 From: Bing Zhao To: , CC: , , , Subject: [PATCH] net/mlx5: fix the needless reference count for table Date: Wed, 2 Mar 2022 09:57:35 +0200 Message-ID: <20220302075735.53985-1-bingz@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8c1354dc-e56e-449f-85ed-08d9fc225a74 X-MS-TrafficTypeDiagnostic: CH2PR12MB3751:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YnnEhj4xelIGG1b62TsONAImxtmORaEO5IJochsZF2Yzg7/Zcx8AbdgramE8ZUVmeWpPZ590RSjRZvmx1cWDD0C0Mwrd9E60rXVig8rU21wnHyt9H2Q9OEMnxEU/nqL4dywsJxj53r6/PXuW3jNnDfYQ0xE5z8IQmt8MJdK7G3MrV6oA9w2kXc+SvFon1egC27oVsc6zZRW8XeUJLnYeMxykIdzC3CfAqC6MjqtNgRXSJarzpBQBq5+eWQnmRrtHF/mHxRae0MJzI29K000o2mC5DvAfdOb2xmHIwHiYpaz6gviyLCxsz8AYTNp4uHRIDMpcbrVZugRJDs8keGnF+LvxiUeKfLkeTkSsk2reWmh+ZErr9sCA6Hi/r+owsx6ZoyO+PIIzR90QqZ9/yCzWpfTeyzjWyYohChsbFO9QtnU2jm+FtdhZMwz+m/Kr9WBL+5OWabIVWZH+AOyrxgH3a+Cf/ApK2r7VzUfLU29pkhu4wCOdq5piFEj03/SOkdW5dlO4z2Ronxq5qXbYuy4y3pN5Muzf2gxQTmXEbjT3JI90kuwmwf9EtbFBumqttC8AO7v+gWYHeBFF57kS/gWHOxFj1ANzLgmF5/i8hjKAMiNJNoma2UziHpNMlDaixxBZXmmtBOczf2lCOSu6n16uWoiBhTxUWKiwXht7Per5SWIRoNYKhyGJ+BDfJXw/4cLxVdnwTrRjmCW2HBzN04dU7g== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(356005)(36860700001)(81166007)(426003)(336012)(7696005)(6666004)(47076005)(36756003)(2906002)(40460700003)(2616005)(186003)(16526019)(6286002)(26005)(1076003)(5660300002)(70586007)(70206006)(450100002)(82310400004)(86362001)(55016003)(8676002)(4326008)(508600001)(8936002)(83380400001)(54906003)(110136005)(6636002)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2022 07:57:52.5371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8c1354dc-e56e-449f-85ed-08d9fc225a74 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3751 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In the previous implementation, a count was used to record the number of the references to a table resource, including the creation of the table, the jumping to the table and the matchers created on the table. Before releasing the table resource via the driver, it needed to ensure that there is no reference to this table. After the optimization of the resources management, the reference count now is in the hash list entry as a unified solution for all the resources management. There is no need to keep the "refcnt" in the table resource structure. It is removed in case that there is some unnecessary memory overhead. Fixes: afd7a62514ad ("net/mlx5: make flow table cache thread safe") Cc: xuemingl@nvidia.com Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 0f0045a2b5..dd5cd9209f 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -993,7 +993,6 @@ union mlx5_flow_tbl_key { /* Table structure. */ struct mlx5_flow_tbl_resource { void *obj; /**< Pointer to DR table object. */ - uint32_t refcnt; /**< Reference counter. */ }; #define MLX5_MAX_TABLES UINT16_MAX -- 2.25.1