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 A819FA00C5; Tue, 15 Feb 2022 10:46:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 426F6410F3; Tue, 15 Feb 2022 10:46:48 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2053.outbound.protection.outlook.com [40.107.96.53]) by mails.dpdk.org (Postfix) with ESMTP id 0386640E78 for ; Tue, 15 Feb 2022 10:46:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amcPG/HZguQmFz5V61aolQeTo5jhBCUGbnvfWhd8sufX8rTeRfqf6UBQP0by1JWfr/rOLPp8tbtm4lVdPw5s3e1Tj3KniVJRFLA/FJMZHycXsyOz2la5FfYJJe8/kCJrDSAQM7wBZBTFBQhhA6TpsdieTeWDn54vOnPcecqh4gEMhNN5stNIO/A6s7gA5SdjUyJ+FxHnsNPVs2qrJ4e7//2Yt6L5sWjlsbGul5z9NJtyeTueUdBNs7Teuthz7IfGg8NOT8r7otEHtwg41960Z2uLmCRjQk4uBlXn0diRC2uVOm2iDeJWy8/IoPKOZy1fYhfm6+gQy83ehJlZyYPYFg== 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=vma63Oa76wgaU4NJV+NPztAPY80ZArKDIzBZWJkBEnQ=; b=DAdYO+XF86Cwe0MhcdqV2QvXtshTSii+l33gprgNRLDJQqJFhqk7n09lOlTPzX/H5CBlQcvIdSAw+bWJn4TOUali1HKl7yGXeLnyedS6pKoZX0qJBhZLSJ6DfoRD6+nC8f4LUeaGxv6Wcop/M4nbBj93lXtfvNUYv1GoGel0A3lu2H5Jc1C1dG1Fch9YXFc5TU1+RwCU35pqrn/c9VAMXCfkGKTbHLXfesm/ZmL97JCb6EMfWDasw7seKV8dA/idMh3CLaOsAiyHdGu2rR6c8prY8fo1G1Zja9lJjBGHUYjJmleWHQ5qpnzv5SCTjXXgi6kJ2btADnJCH0R6NLAvWw== 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=vma63Oa76wgaU4NJV+NPztAPY80ZArKDIzBZWJkBEnQ=; b=kA7I3x9dZrqBZGbhJaZ9TQ884ej23flV0ijPocDSyYXgwOsK8fBh2N7KhYMXedBEQ986xv3gFfi1hpaR3gwDmnJLD22bFAcUZdi9+7z5oe4eZp3MxhINvywoJulOcDyA9g9xXoUEL4mfFjn/Otlptsd32LarUJgETijl10geoT4cyqYtt9rp2rA1kZ+Lr6/9CuHoUE6R+hAHMrGecS+3GWSns3w8WBSRzboXqYVAZVVwzEu97RAzxVm1ENF6XgZ1e60HFjrIbQr9WO1BdKsFmg/h/guYJAJtHtJ2kzNy/75pvKN0Nq0EuVSkn1/r3wd/3w3SL7jvCNb6rLOdPRmclw== Received: from DM5PR15CA0060.namprd15.prod.outlook.com (2603:10b6:3:ae::22) by DM5PR1201MB0156.namprd12.prod.outlook.com (2603:10b6:4:59::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18; Tue, 15 Feb 2022 09:46:44 +0000 Received: from DM6NAM11FT063.eop-nam11.prod.protection.outlook.com (2603:10b6:3:ae:cafe::37) by DM5PR15CA0060.outlook.office365.com (2603:10b6:3:ae::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.20 via Frontend Transport; Tue, 15 Feb 2022 09:46:44 +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 DM6NAM11FT063.mail.protection.outlook.com (10.13.172.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Tue, 15 Feb 2022 09:46:44 +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; Tue, 15 Feb 2022 09:46:43 +0000 Received: from nvidia.com (10.126.231.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, 15 Feb 2022 01:46:42 -0800 From: Suanming Mou To: , CC: , Subject: [PATCH] net/mlx5: remove unused function Date: Tue, 15 Feb 2022 11:46:23 +0200 Message-ID: <20220215094623.22655-1-suanmingm@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6cf6834d-7ff9-4196-cdb8-08d9f0681396 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0156:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:238; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: khovfofDV/OZ0Mrin78dVdhPifvVi69n+qW7CA4969v9c1rcZ9ev/skWvwtQ2HljuYOUjFEDDT9QufgEcys/C0H/EJ1pqY/ARMPjo3rb/aauzgFc4KOMj3tAjF5Tr09pwLyzRwIKCGJzEbJtbJxORcjergdHmCE2IhXU6nrG5c1xBOBlvT4SDfFSkebCl/1V35rcWKTLxOvnze1XrC7BiGvLo1GTxKj9dcHmEL8eXm7PY6HRgTJgboXoa7FUennoN/iknKWbpLQefQmP+iC+gtKl8odzQ1yKZKtomFnqjZ2oAv8u1a1rb5qmFX+STS792jPQ+VQXv+ejh4aDczzrOZ5pE7PDvnkeBQnF8oO0cNz6TJZNE2IjTVUo6tFuBDqG7bi1JOqdt1MEj2bOz0ZkJ6Bv/z/yAMgYDoEG1RIhSNkfxMz+10yZH/umt8ncaPEtCrTWo/U6OjPYCHdkHMvX9CpVLaGKos1f3r1fVXaUzfIrl7QGUuUvwD/bpMb+UDkkCXV7VHbXUQEvtTHx2doopfSAX+yDtQ1PTFTzAaBdCD+8RWpUNmV/IZ8x2ym3ceD/zMR1pNoJD5Lyr40ikL0ev/i2MDuUSln8lBIxVgMZp2dMK682IY2VovBoxIhaQWmvZZKYc32f2IB83gP8+1+QvLsJV3i64IPXX0UTuJXLeQeEyabFCKpQiGwR7pcsOmTwUigTm1C43aYpSuw2tE1Jew== 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)(40470700004)(46966006)(36840700001)(26005)(7696005)(36756003)(5660300002)(186003)(83380400001)(356005)(82310400004)(55016003)(86362001)(2906002)(81166007)(8676002)(8936002)(4326008)(508600001)(40460700003)(6286002)(16526019)(47076005)(36860700001)(426003)(336012)(2616005)(316002)(70586007)(70206006)(1076003)(110136005)(6666004)(6636002)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2022 09:46:44.4457 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6cf6834d-7ff9-4196-cdb8-08d9f0681396 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: DM6NAM11FT063.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0156 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 The mlx5_l3t_prepare_entry() function is not used anymore. This commit removes the unused mlx5_l3t_prepare_entry() function. Signed-off-by: Suanming Mou Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_utils.c | 41 ----------------------------------- drivers/net/mlx5/mlx5_utils.h | 28 ------------------------ 2 files changed, 69 deletions(-) diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c index e4e66ae4c5..be33af96fe 100644 --- a/drivers/net/mlx5/mlx5_utils.c +++ b/drivers/net/mlx5/mlx5_utils.c @@ -1184,44 +1184,3 @@ mlx5_l3t_set_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx, rte_spinlock_unlock(&tbl->sl); return ret; } - -int32_t -mlx5_l3t_prepare_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx, - union mlx5_l3t_data *data, - mlx5_l3t_alloc_callback_fn cb, void *ctx) -{ - int32_t ret; - - rte_spinlock_lock(&tbl->sl); - /* Check if entry data is ready. */ - ret = __l3t_get_entry(tbl, idx, data); - if (!ret) { - switch (tbl->type) { - case MLX5_L3T_TYPE_WORD: - if (data->word) - goto out; - break; - case MLX5_L3T_TYPE_DWORD: - if (data->dword) - goto out; - break; - case MLX5_L3T_TYPE_QWORD: - if (data->qword) - goto out; - break; - default: - if (data->ptr) - goto out; - break; - } - } - /* Entry data is not ready, use user callback to create it. */ - ret = cb(ctx, data); - if (ret) - goto out; - /* Save the new allocated data to entry. */ - ret = __l3t_set_entry(tbl, idx, data); -out: - rte_spinlock_unlock(&tbl->sl); - return ret; -} diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index e2dcbafc0a..254c879d1a 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -459,34 +459,6 @@ void mlx5_l3t_destroy(struct mlx5_l3t_tbl *tbl); int32_t mlx5_l3t_get_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx, union mlx5_l3t_data *data); -/** - * This function gets the index entry from Three-level table. - * - * If the index entry is not available, allocate new one by callback - * function and fill in the entry. - * - * @param tbl - * Pointer to the l3t. - * @param idx - * Index to the entry. - * @param data - * Pointer to the memory which saves the entry data. - * When function call returns 0, data contains the entry data get from - * l3t. - * When function call returns -1, data is not modified. - * @param cb - * Callback function to allocate new data. - * @param ctx - * Context for callback function. - * - * @return - * 0 if success, -1 on error. - */ - -int32_t mlx5_l3t_prepare_entry(struct mlx5_l3t_tbl *tbl, uint32_t idx, - union mlx5_l3t_data *data, - mlx5_l3t_alloc_callback_fn cb, void *ctx); - /** * This function decreases and clear index entry if reference * counter is 0 from Three-level table. -- 2.25.1