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 F2FAB43C35; Thu, 29 Feb 2024 12:54:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0B4C42EE6; Thu, 29 Feb 2024 12:53:02 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2053.outbound.protection.outlook.com [40.107.94.53]) by mails.dpdk.org (Postfix) with ESMTP id 57F7942DF6; Thu, 29 Feb 2024 12:53:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H78+nKGA3hIN329AHXBbvR/kfgK0EHP1eTHYyu9f7FnC0fIlgDRzPLkTS2FHZ5THky1aTV8Cb9feQx86ndmTxOfZMWiVvj50KY779LWXr6ih9cGqK7g9qPqZrAxFPRFtKiwvqXgNAplLfe5rJUa+e0jjPk5SCPN/ZegxzV3TFLuowclZr/D8OnS643nwGj4JzTBFz83tkp25GN1Lh//F8hM6GMBhQVnd1RpFenW+d3lIwU1Xb5CCD3OV4JSdu7sDMNYSNmxkI4xOGVRdIskQpdc6HtzVAijXdWMwLjwz/8dG/enIT3sytbTNV9BqHI5sxSY4zphQOQRaOoXoq3miRQ== 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=s6YGBD5H2+1nXj7b/oqB7m1Zx+vDTA3h3kVGU8wzhOo=; b=eeoq5NKDZif3sGAATFibYTRa3YACgQHpMJ+v9Kv8r6cAHeE2/KdjFjiL6btheJecNUS0kyKQM+0H+01h+iqWzipRnb9clXUKohgLdwVs3NnZDYCclemeOJSoePrQy6Ymjh6riGlVadis8sQMvdf8YKcK+lo4U1YcaJkoHadEXDSSNEHY8XFMYGh1DV1XTgJ1ku4g/LUttakWcS4qKQiPQmkMCz5USfcS6dbOyFak3R/Y6jdL+SZcLdod5FifkRrHNIQ/NMN4rZTF0qPXSs9QnkiqOpPgqIBTLgfy3YqASexoQfwo3lWO0PyfcV/j+VOy1FFagVKG7EsCt1+YvZMV8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=s6YGBD5H2+1nXj7b/oqB7m1Zx+vDTA3h3kVGU8wzhOo=; b=iHzVlRq5/X78p7XRIpp9+Cwc8ptTp6FDa1fgXQa9d3tPljEjLOaBTdQGfXfEQ860Qr7ZFSLpmKmOeTLEa08+kKtiqo7v7T+KemQMXWSiJSmBStkm3U/pUT2YhgKlwrBd8hX965hEM70Ts8k+ZiTpBWxfUtTlBuriMThzUBKaCRkZBegDiAG5t+M/L6xmcuHyJnLYFhIobdzQeb/st0crFSIQY+WvjH8s2i14gZO22SolMfbhz3MjIfASDK9nGhUQAHMx+mP7fZCXe//NUGpIgePF7/WQhbXHCHfpEw71/jrm4m4rI4lQXH109pWyiS1QC1kTR+QWzv7l2bYRKAnuIw== Received: from MN2PR16CA0010.namprd16.prod.outlook.com (2603:10b6:208:134::23) by CY8PR12MB7537.namprd12.prod.outlook.com (2603:10b6:930:94::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Thu, 29 Feb 2024 11:52:58 +0000 Received: from BL6PEPF0001AB4E.namprd04.prod.outlook.com (2603:10b6:208:134:cafe::1b) by MN2PR16CA0010.outlook.office365.com (2603:10b6:208:134::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.50 via Frontend Transport; Thu, 29 Feb 2024 11:52:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL6PEPF0001AB4E.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 29 Feb 2024 11:52:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 29 Feb 2024 03:52:35 -0800 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.1258.12; Thu, 29 Feb 2024 03:52:32 -0800 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad CC: , Raslan Darawsheh , Bing Zhao , Subject: [PATCH v2 11/11] net/mlx5: remove unneeded device status checking Date: Thu, 29 Feb 2024 12:51:56 +0100 Message-ID: <20240229115157.201671-12-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240229115157.201671-1-dsosnowski@nvidia.com> References: <20240228170046.176600-1-dsosnowski@nvidia.com> <20240229115157.201671-1-dsosnowski@nvidia.com> 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-TrafficTypeDiagnostic: BL6PEPF0001AB4E:EE_|CY8PR12MB7537:EE_ X-MS-Office365-Filtering-Correlation-Id: f04a465a-1616-4326-96d8-08dc391cf8df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NPbMoE1BWaskmJLJqPcx2tnmGEW4vFO1Mn0HsVf9JLgfOgSHZrbhFGWzrw0fEMPcQT1VGqC5rYB1FtkKCa8dEUa5dwoKoG7eY8PpsEU67lZps0ozB6845PxFXwvU8zU0ea76poYykrXFi/+ZFOdBKlDew6pUDF3Od5I5dP7xpSK5PAf/hSDQmy3LH1axaH4SNelCmHRTm/wJ1T+fqP4q/gQVh2MUrMsOZh3hJwGxdypiTwpJF9UjAWfK7bTgLKDcoYCivFlc6jHuBVBSYMxJy7tMfqzLwqSof+CS9GwNRXoH0NM2s4McSVDwod6GgrLuv4yjE+YGRy1FFLAKeZ/4kzxQ4aKP/r9T6XEb42fo9taSfYYYLiPTA5/7C9VGuYEcfUBerBDCydhYqOiNICCFlYqsOr9h947YMt2BarxltuEyPxm9l861n8YqzWnVs/0PXOr+2sg4PcxPNUMBrb5uJ0+zuogLCSx5VF6Xu/ujZPnpD9Fk895LwyGoURaOPmCUl4bWlsh34gTIsQ1oZEiHQOTGxGbnH07MPeHnNRYbGarVHEQcqvtGThEoqWm6ZKdhWRZypjO/sVXQAxiAycgbJtwJmy4MO9gZrvAhl2KcH+wGAl+Tkm9KsE/jWAzAiX6e0qrvle8jm4rReQV+1f4ferZdHwjl6tyqzGiElxu+zeAyZ/5+VKvrE/vcWyKZ5V7tXQ++KKgPBNAlXRdcdTH4RJsvsz93QuWaiDipRl04dMpSWS+KXZCKlXjKXDVQackN X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 11:52:57.4225 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f04a465a-1616-4326-96d8-08dc391cf8df X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB4E.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7537 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 From: Bing Zhao The flow rule can be inserted even before the device started. The only exception is for a queue or RSS action. For the other interfaces of template API, the start status is not checked. The checking would cause some cache miss or eviction since the flag locates on some other cache line. Fixes: f1fecffa88df ("net/mlx5: support Direct Rules action template API") Cc: stable@dpdk.org Signed-off-by: Bing Zhao Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow_hw.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 979be4764a..285ec603d3 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -3520,11 +3520,6 @@ flow_hw_async_flow_create(struct rte_eth_dev *dev, uint32_t res_idx = 0; int ret; - if (unlikely((!dev->data->dev_started))) { - rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, - "Port must be started before enqueueing flow operations"); - return NULL; - } flow = mlx5_ipool_malloc(table->flow, &flow_idx); if (!flow) goto error; -- 2.39.2