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 36FAE43238; Sun, 29 Oct 2023 17:33:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F7F740F35; Sun, 29 Oct 2023 17:33:08 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2089.outbound.protection.outlook.com [40.107.92.89]) by mails.dpdk.org (Postfix) with ESMTP id 4141540E78 for ; Sun, 29 Oct 2023 17:33:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FyhFxcGw2AP1MJT1d8OIZ8I/dB0rvy1oWTFmWdNubSI6l0FA3i78iXAJ0Nztjn21+JjLgqV1i39WbgZ8Z82LuSJ/jMwKN6Jjb1ZlWF274Nr1dqo9kgkGea/XNzMN0xh6Rpiv+/ugyqIQxtDcyUYIH/MecDJopvxT2hImBG+G+aDLRlTUtPoI9ZxcSEN3xUzElhIHVurY4acnBG3meeftp9Ah5BiqG03vf22EE6x5QO8SeU52d6CHk/6Tq/jbLylyEjJiOjWYlKjg2Rtdaxii3YjefZzeeLLqk6POGWwoGsQ2X1H80LWmyR7klSvmFLh90trLqFVrSSIZI6aZvAuZSQ== 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=qHUWBstBLsbGtM6lIyC0wQk4Y9WGMYDUHuBa4vC6Dac=; b=d94vujdou4aC0rfFbj8tKbo7EC3xmeFf6KgxIkN8Jgvnt5jQGTjrVR4hYPGd0DibDC3EENWvnvpj0RKKBWDnVc1e4eFdQDuFHp6ZY6x16XgE3+A9s1KHtOzaooj67O2WOY19CBt2XUzBvg3jQc1XPvvGALW5wOt27rypB2lmz1UnpPGQ6mEuN68U7noxM90itaueY5emP0CCEspLPCTtpKx66IcmEsW+De7fN407f5D4vd4zk/Ma386eXl+Clhxg8f2H00Jdo/Y/AfRk+3kSibpR1MTNYMVN6TmRahTzAYqEd1oNYwqCixrVoC6y3pciU5h6xoVJqosu9Jnnm1IH6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=qHUWBstBLsbGtM6lIyC0wQk4Y9WGMYDUHuBa4vC6Dac=; b=rExOvUzjGv5TXxRHLq65+lLmZ+gTL0XOZT1KuQWxxN5C3kozB85E8E/MSNMCJQil3ZvdIbeMsur6+DU4NzagR4rZ39ywok3bpCo7tYH34w2HItXa8+G0YK/8tSCHR5qoYsyl1W0ht0QCIlc4dgGBge9c+nb55Ql8sr0ZX0Ioh1XIEpNa7fAeJOoyN7AVIavBE3Xt/bSkqc2+xUalXdt9JB8V1s3eNPGYGaNi3yB160r5OO0AvPWwOl99WbpqkTZhgB8xy1rQ80Y2osHJndPpGpfugb5mS0BeQCO4MMEBbA0MmuXfGkkZrxznlP+knR2jbpfgyo+2mjESaOuQi5NXmg== Received: from MN2PR16CA0012.namprd16.prod.outlook.com (2603:10b6:208:134::25) by DS7PR12MB6190.namprd12.prod.outlook.com (2603:10b6:8:99::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.26; Sun, 29 Oct 2023 16:33:04 +0000 Received: from BL02EPF0001A0FC.namprd03.prod.outlook.com (2603:10b6:208:134:cafe::e8) by MN2PR16CA0012.outlook.office365.com (2603:10b6:208:134::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.30 via Frontend Transport; Sun, 29 Oct 2023 16:33:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A0FC.mail.protection.outlook.com (10.167.242.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 29 Oct 2023 16:33:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 29 Oct 2023 09:32:48 -0700 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.41; Sun, 29 Oct 2023 09:32:45 -0700 From: Gregory Etelson To: CC: , , , "Ori Kam" , , Matan Azrad , Viacheslav Ovsiienko , Suanming Mou , Alex Vesker Subject: [PATCH 10/30] net/mlx5: fix insert by index Date: Sun, 29 Oct 2023 18:31:42 +0200 Message-ID: <20231029163202.216450-10-getelson@nvidia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231029163202.216450-1-getelson@nvidia.com> References: <20231029163202.216450-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-TrafficTypeDiagnostic: BL02EPF0001A0FC:EE_|DS7PR12MB6190:EE_ X-MS-Office365-Filtering-Correlation-Id: e8b0117f-da26-48f8-f2fa-08dbd89cb9bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uuYRLOMMbJsEMFIgkLoE6gSVcILZ6Q/hiMfELA4xewO44ZnRBlY+asY4BVTdp64pKvpvIS8lnELkngLGQ2auDfUdJFzTbRBOzZvajKPHWEhJByB82Qsgmt65w42pQDv78OMBiUU/VrrZHd8JdGdFSvOlZyGNkPxqPf5Z7xkXAtogCvWvAWV/bReRniNYvMrUBUHE5DpYra6alBZFE8wmi7OChqv7YazmxuJsg3LqFM3O6DtS2ZqgPhDv5jiIrlOppioGA0MRdDUrXDBfzB17yD7QF4kfkXZqp+SIeYKOfARsPD48KS52MZz/ahl6npq82nDLEa1CN9PE3fwbzsH6ZYh2FGiHmvLRAjyrbNrq/9EBVLA44vf/C3Z6xJRYimGvN766rhUItp94oP0Z/1DQICUi+0u0mPrT4JSfZ+Lv3cGMMLkplv4+kxHPdoAFLui/qfgIfu12d5mHAHUyIZ3DUNPd49VUCNZjzPibA/S86/SrA6zEObgtzxGWxT5ujqMAUeOeU16EgNmvY+Vl56l19AbREWcOKnToK9JoaEQ0UKragnb66Q9ZYs7KbP8TChhlK509NhdwLMORXfoDs+QxNAQfwYlu2ofZQIVvrvJSeyaCbpmQBD/UXOH6GdqtnG0tjw3FpMdWcATbyQrBfTPULFt4OBWiN892qd/7L3/89H+JVWfaaQceOw/alGTKBqPIw1ZaP//QReFgzdy6CgItMJVggoG1AsQSNSJkANxFb2Kls7RYJy1jCNAHUXX/o0JR X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(376002)(396003)(136003)(346002)(230922051799003)(186009)(451199024)(82310400011)(64100799003)(1800799009)(40470700004)(46966006)(36840700001)(82740400003)(83380400001)(40480700001)(40460700003)(47076005)(356005)(7636003)(36860700001)(478600001)(2906002)(7696005)(6666004)(8676002)(8936002)(4326008)(70586007)(70206006)(6916009)(316002)(54906003)(5660300002)(41300700001)(426003)(6286002)(16526019)(1076003)(26005)(336012)(2616005)(55016003)(107886003)(86362001)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2023 16:33:04.3847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8b0117f-da26-48f8-f2fa-08dbd89cb9bc 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6190 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: Ori Kam Due to mlx5dr internal logic calling the rule_create function must have items structure. This commit create such temp structure. Fixes: fa16fead9a68 ("net/mlx5/hws: support rule update after its creation") Cc: erezsh@nvidia.com Signed-off-by: Ori Kam --- drivers/net/mlx5/mlx5_flow_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 67ef272a2d..9e549a1ba2 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -2987,6 +2987,7 @@ flow_hw_async_flow_create_by_index(struct rte_eth_dev *dev, void *user_data, struct rte_flow_error *error) { + struct rte_flow_item items[] = {{.type = RTE_FLOW_ITEM_TYPE_END,}}; struct mlx5_priv *priv = dev->data->dev_private; struct mlx5dr_rule_attr rule_attr = { .queue_id = queue, @@ -3050,7 +3051,7 @@ flow_hw_async_flow_create_by_index(struct rte_eth_dev *dev, goto free; } ret = mlx5dr_rule_create(table->matcher, - 0, NULL, action_template_index, rule_acts, + 0, items, action_template_index, rule_acts, &rule_attr, (struct mlx5dr_rule *)flow->rule); if (likely(!ret)) return (struct rte_flow *)flow; -- 2.39.2