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 AFE36A0093; Sun, 2 Jan 2022 07:59:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AB3240698; Sun, 2 Jan 2022 07:59:57 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2055.outbound.protection.outlook.com [40.107.220.55]) by mails.dpdk.org (Postfix) with ESMTP id 615574067E for ; Sun, 2 Jan 2022 07:59:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kuidhuObnHN66Fq7vJbW1qdm4UwKgMaC0XO080W3uil+c/4Y7roL5xaHxrEiYupOTYyjpgXnV+FgFKcsE9d4gItFD/SYmUoQ5C2n+daFOPsGfnQS8y9LZax5ThIVxgAW8wyVf3rLjBkO7G5AQaVs/vzxMkZXXvYS1x0wJbX+i+fh61qBOMs4XgahTQRq7IBgAdtPgmcCH/Cw/7Tlt2CpjGgNjTv2j/UNP59uTB8LtMZcRjKNivUeYZAHfPqnja0G+URAm1cJG/Q6Bi8J4urLIecFGt/a/Mbmko7nPaQba17eDephie1pzApqV5A2ksW4x5+ak6osJrMQgt2p83kLGA== 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=C4HiKWeglWG+EL1oD5F7wX04bbMrpXVwpvEcS3uzGk8=; b=MawIvp5rcFcvaDKEnpBqEno+PW5BTVIC7JzyPuIXX29pMVnMWl9hQ1m2hxIwauZB7GKbr4rFaG3nFL5kt33QgRTy7wNFlo1WA6PNMJdBd2uUlohqNpfHFOFPOj33fKvoctPujeU2A4dECdfwWXJNKiyPA7xkT3S7TFDRd+bOsdKIP36qHiD90uJJvP5UGohpxAlabg/oPUBUAg5LLdiNQ/ZtUzBB/YwFV7e0YYRDUPpjbKB2GWbCaMVNZA/Mj3bxll0jqx47mwmf3w7BXCWYCT0Z4EZkBpme7Ppu1d9jFDqsHGpEbeD0SjLsbQWTVieEwy4BoHVY1YN6g66CwqZKlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=monjalon.net 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=C4HiKWeglWG+EL1oD5F7wX04bbMrpXVwpvEcS3uzGk8=; b=gU/XssiS3hmJF/v0kMy+z9WRnS2sP3jogO/vVs8pcLzu+oSNRShEtT0bNe7GkK6kCKwig7ac7ob/RAgxD4Du+h07TkZyY0p4Eg05thVHk4JSr+/ZZ7dTo/xuzzKV6PrH8pSVVFbC0HL7NBSXpuB/NF33nkDBbdwKqc/1ib1mEZwb5EjgXfYIq29CPXbHV3TP07pTRuUnlL4TayjP65TSDkShhlz36/G2X/jRHKLp9QE1snYkuovT8o6nraGMc+n1rQusFnA/w7GM84ha20ihjVDMiW/a8Payq9hOPNEOzrEyO6zKG8FP1bf7o9jp6dPpnrg9bQxLx3Ty8L+yAXP2wg== Received: from MWHPR14CA0039.namprd14.prod.outlook.com (2603:10b6:300:12b::25) by BN9PR12MB5081.namprd12.prod.outlook.com (2603:10b6:408:132::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.14; Sun, 2 Jan 2022 06:59:53 +0000 Received: from CO1NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:300:12b:cafe::fc) by MWHPR14CA0039.outlook.office365.com (2603:10b6:300:12b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.14 via Frontend Transport; Sun, 2 Jan 2022 06:59:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT009.mail.protection.outlook.com (10.13.175.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4844.14 via Frontend Transport; Sun, 2 Jan 2022 06:59:52 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 2 Jan 2022 06:59:51 +0000 Received: from nvidia.com (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Sat, 1 Jan 2022 22:59:50 -0800 From: To: CC: Matan Azrad , Thomas Monjalon , Michael Baum Subject: [RFC 0/3] common/mlx5: refactor devargs management Date: Sun, 2 Jan 2022 08:59:23 +0200 Message-ID: <20220102065927.2210733-1-michaelba@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: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 984392fc-55d4-44f7-f107-08d9cdbd79b1 X-MS-TrafficTypeDiagnostic: BN9PR12MB5081:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J/pErUYiV/5S+QH1343fYI7Shg5hZD3d0bnMSBDx0/zqHO3EsYPlW4TtQmZg34J8qPjhlhilRGI2uQsr8OCeBMdWtAxHNdhuBQVf+xlAyzFKRFy8xWA9/OrmtWbZ7ICM3GcrpIVuX2be39JvUTMHa84F3L1c+lSU2SfQQQS7UvgxlFOvUVMNc74e/1QQJQsL0k8ldFxJqJMU8Azq5yzwOoH13ps4n+J3tCt2LZn+fCrbTiIkgQxAcU6uzgJ/A19JnERsvBuCvvd8KSWDHYEc1QQrus+WfBoOEjHB6JCxtUV+axXHXpLBLSIZQ14PxVEV42j4U5QwVYr1gvRZ6h7a68QBWC7DtZcRpKVi0bq9s9tZgJKxLIT/7eqKXQRAthJOp22VkNUqh38orj2YHNN6q4a3rIqhzTsj1lv1d6mC0olKUtf7ng0JsWlJtlPkle5UY0gMj64PUZmfqGyiC7lsW4MH8TzijH28Wadk1K2tqyhBIPf3gruyPVSHSDglQhRuxzN5tYi+1nfNm8py3Ci9UD/r38Tf5m4BTUzuzt6GYnHXYLQCV7lPL06IZXVFazdG6osP9ZGDnXP8/ARzixKnizEJ2fLwoAdNDzy62aegTcdXsPbrShINQcmaCLm/EZIapKqw2Y+21jj4ADBOjWuRaJlK63BodsKoQv/Sz/jAPON/MJLhLZmdzsRuKyPSZRfMSlLYIkeFgP92wyqKpMmC4uq/AGgLccoHdzmCprQi5YLdBbYQqcubtHaGYpUNyEdJftMFs6mQNTv7NyhOZyPAaeBQ71xgTJAcUBYC95zoMPc= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(40470700002)(36840700001)(46966006)(26005)(6916009)(2876002)(6286002)(356005)(316002)(70206006)(83380400001)(2906002)(107886003)(8936002)(1076003)(36756003)(426003)(70586007)(508600001)(7696005)(336012)(47076005)(6666004)(2616005)(82310400004)(8676002)(36860700001)(5660300002)(55016003)(16526019)(86362001)(4326008)(40460700001)(54906003)(81166007)(186003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2022 06:59:52.2603 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 984392fc-55d4-44f7-f107-08d9cdbd79b1 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.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5081 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: Michael Baum These patches rearrange the management of the devargs on two different levels. The first splits the net driver's devargs into two categories, device-dependent devargs and port-dependent devargs. Arguments that depend on the device are updated once in the creation of the shared device context structure, and do not change even if the user has sent new devargs in the probe again. In contrast, the arguments that depend on the port are updated separately for each port. The second layer deals with the parsing of devargs in the common driver. The common driver once parses the devargs into a dictionary, and sends it to all the drivers that will use it during the probe and update within it which keys they used. The shared driver then receives the dictionary and reports about unknown devargs to the user. Michael Baum (3): net/mlx5: remove some duplications net/mlx5: refactor devargs handling in spawn common/mlx5: refactore devargs management drivers/common/mlx5/mlx5_common.c | 313 ++++++- drivers/common/mlx5/mlx5_common.h | 51 +- drivers/common/mlx5/mlx5_common_pci.c | 18 + drivers/common/mlx5/version.map | 3 + drivers/compress/mlx5/mlx5_compress.c | 38 +- drivers/crypto/mlx5/mlx5_crypto.c | 39 +- drivers/net/mlx5/linux/mlx5_os.c | 1233 +++++++++++++------------ drivers/net/mlx5/linux/mlx5_verbs.c | 4 +- drivers/net/mlx5/linux/mlx5_vlan_os.c | 3 +- drivers/net/mlx5/mlx5.c | 713 +++++++------- drivers/net/mlx5/mlx5.h | 275 ++++-- drivers/net/mlx5/mlx5_devx.c | 12 +- drivers/net/mlx5/mlx5_ethdev.c | 26 +- drivers/net/mlx5/mlx5_flow.c | 103 ++- drivers/net/mlx5/mlx5_flow.h | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 138 +-- drivers/net/mlx5/mlx5_flow_flex.c | 4 +- drivers/net/mlx5/mlx5_flow_meter.c | 126 +-- drivers/net/mlx5/mlx5_rxmode.c | 8 +- drivers/net/mlx5/mlx5_rxq.c | 47 +- drivers/net/mlx5/mlx5_trigger.c | 27 +- drivers/net/mlx5/mlx5_tx.c | 2 +- drivers/net/mlx5/mlx5_txpp.c | 14 +- drivers/net/mlx5/mlx5_txq.c | 45 +- drivers/net/mlx5/mlx5_vlan.c | 4 +- drivers/net/mlx5/windows/mlx5_os.c | 524 +++++++---- drivers/regex/mlx5/mlx5_regex.c | 3 +- drivers/vdpa/mlx5/mlx5_vdpa.c | 32 +- 28 files changed, 2250 insertions(+), 1557 deletions(-) -- 2.25.1