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 CAFEDA0350; Mon, 28 Feb 2022 08:10:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 585314068C; Mon, 28 Feb 2022 08:10:11 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2071.outbound.protection.outlook.com [40.107.243.71]) by mails.dpdk.org (Postfix) with ESMTP id 36D644068A; Mon, 28 Feb 2022 08:10:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PUTrg+Q/E8Ymg9nE5G5D5Lj0glqvBTS1HkeG/7QFMdOkMHLNrlvF65kE06NkGTUwDghHr6y6fqp9qisHExPK/jnx4ZKrMdBaH9AaZkbdAT8PicJEhGmv/jmohIzvMiBne7HbsV7L2H2uaJzhT7i7ZWRJy2yuB3tH9nPyk4unIfeuSa9AUL/Ht9qUsKZSeuL3eGBAJcODVNghjlHROMQw6elwPvpGgC4xhGFMM1c7gj7IRph/hk0Dz3p8lm/yAYKmTMgy3X1k223NIBM/WJtEzV8zPIheKeMEFKfbgbidKS4pUMFtpsph4iu1jgCbiM0tMfMc7IEZYFklNq/OjxjwGA== 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=ZllyKGnFgeXo8l3Oa9kS/c5Ez7e/FhZ6xblT3Yt/QnE=; b=Qg226bd+3i1w6sy4Q52R23XgoWp+kvkAf6gVmNpYKlrTahBzwrtwOG6dgTS0CQfmx4GcYy4ayRkyk1M2U/a9Lkoei+Cn/IBYw3Dd/13pGPctLt3UDKZFWEM+Y9PRjmHXKkEU4iCxhFgedE7NTME/1WfCrfS59jbqqT59Dc32OhiImhA+o6NckF+UENPGQ8MlLBTHS5MGhqrX9/te7dpxHBVMNVhg+s1emTbR47fMGkPr9LfcSeljzTEkoFoqTsTiQ8PznI70NO9OPRQMXcrrJaMnj/yoF46sZ9FcvzSZxMeOtnPA9MUxut4ZQhOZM5yvzLzd95ONxD2zUYyGGu1VMQ== 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=ZllyKGnFgeXo8l3Oa9kS/c5Ez7e/FhZ6xblT3Yt/QnE=; b=UDuyP7jjMTNba76uxesHCSm0uyf/dOHdsHXqAHe6RG3XKRXI8m21BOjKfRhtN+EkL3B7IFvKZ+EzWvChZuEJr5ypKoBBbixXsAAKLV5GR6hqSv8+omXHTJwfV9rOKuas8moMO/mWGtiQzDcPiAp1R6AvyzRwA627J4etMozYrsPvPI/sgY/zybXXk865InSnNen7vdtWjN+fpmmgwcgoMTksBZ3NO9ZzdV3Pq8MsLTfT5vPKXnHiD7YoWK/6WDrfpOEB9hHzHW94FyB2vvdvy1uziIlFnrxu6g5hwR/WROE2yzhtz+TwR5zENAFpMKkoMrbB08qUbrlAxNZ/Y9l8uA== Received: from BN8PR15CA0067.namprd15.prod.outlook.com (2603:10b6:408:80::44) by MWHPR12MB1360.namprd12.prod.outlook.com (2603:10b6:300:12::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.25; Mon, 28 Feb 2022 07:10:08 +0000 Received: from BN8NAM11FT007.eop-nam11.prod.protection.outlook.com (2603:10b6:408:80:cafe::3) by BN8PR15CA0067.outlook.office365.com (2603:10b6:408:80::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.26 via Frontend Transport; Mon, 28 Feb 2022 07:10:07 +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 BN8NAM11FT007.mail.protection.outlook.com (10.13.177.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Mon, 28 Feb 2022 07:10:07 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 28 Feb 2022 07:10:04 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Sun, 27 Feb 2022 23:10:03 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend Transport; Sun, 27 Feb 2022 23:10:01 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Subject: [PATCH 1/2] net/mlx5: fix overridden flag in flow validation Date: Mon, 28 Feb 2022 09:09:53 +0200 Message-ID: <20220228070954.3813602-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220228070954.3813602-1-michaelba@nvidia.com> References: <20220228070954.3813602-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1e0039e-2533-43fd-1aed-08d9fa8959d9 X-MS-TrafficTypeDiagnostic: MWHPR12MB1360: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: uUudlmfLrVSq3xvTTDxIZlTRUQ+gXMJXN/8XBZ+lFgQx/+DVGcJb5BNuSP3k6nY848h/2RhoTDZbZHRm3C/cWL72glFujArXZpBs5jgAiVgbXP++p6fW9wdmoZ19ugbX7U8CI+6vS8vvCV6p1X33N+M2H+6Hnwhdm004AyuksecYg/cL6sBEseJeQLHJgkewFzF1YKKU0Ncx6Qf3MZiosoax22UjNSqTUyhsQxsUakcTeG8cMibh8kIsidTYGsr8MX9WDjrrQtJ1VJlr2XbaE9j/go3RgMBTf96uw3OpcPdcR/G0uTWuXxKP1jDRs9FeT+jWn/nB66RMXwnCAL+efoDLWFN3kR8ktZhx8a+qliXlGY9vbdsCBUMapM6mrQGBJ9bUobrEKvYHK9wv1K5Q/gWuDsRa4f10teQfukXS4Agh8NJp5aKecWRSr0xPoSY9+W0yBBlatwt1urne36dB5UfW07YkPKnLncjEjIaK8eSTXx4iUeALm4PyvroeKFoMubOtffMYpBjinMz1/EhyTDyAyKiPTkFKwMxfUlSHkkJ+zbr8y6YVZ/0RTt54fs8U9iXATQqliaETuK1rqUpiY9Gf7toYSDC0buXBjBNT/l0jBLS16PyHienbO2P4RRCvf8MxaUbse5qn5zRXtMpDU2frWW383AnwbnjIhpXcfW9Dl8xVLJrgdTYLFrP6BrQvBSJtlaGV/pc2B/GP/DQAew== 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)(40470700004)(46966006)(6666004)(36860700001)(8676002)(450100002)(7696005)(47076005)(4326008)(83380400001)(426003)(2616005)(336012)(186003)(26005)(1076003)(6286002)(54906003)(6916009)(316002)(86362001)(36756003)(70586007)(508600001)(70206006)(5660300002)(2906002)(55016003)(8936002)(356005)(40460700003)(81166007)(82310400004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2022 07:10:07.1531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1e0039e-2533-43fd-1aed-08d9fa8959d9 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: BN8NAM11FT007.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1360 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 AGE action can be implemented by either counters or ASO mechanism. When user ask count action in the flow rule, AGE action is implemented by the same counter. However, if user ask indirect count action, it cannot be used for AGE. The flow_dv_validate() function has a flag named "shared_count" which indicates whether AGE action validate is depend on ASO support or not. This flag is initialized to false and is updated if there is indirect count action in the action list. This flag is mistakenly set within the loop that reads the action list and in each iteration it is reinitialized to false, regardless of the existence of an indirect count action in the list. This patch moves the flag initialization out of the loop. Fixes: f3191849f2c2 ("net/mlx5: support flow count action handle") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 2191ce6e58..de6bf8c660 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -6907,6 +6907,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, const struct rte_flow_item *integrity_items[2] = {NULL, NULL}; const struct rte_flow_item *port_id_item = NULL; bool def_policy = false; + bool shared_count = false; uint16_t udp_dport = 0; if (items == NULL) @@ -7284,7 +7285,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, } for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) { int type = actions->type; - bool shared_count = false; if (!mlx5_flow_os_action_supported(type)) return rte_flow_error_set(error, ENOTSUP, -- 2.25.1