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 18339A0548 for ; Sun, 28 Nov 2021 16:03:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F97042732; Sun, 28 Nov 2021 16:03:19 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2066.outbound.protection.outlook.com [40.107.220.66]) by mails.dpdk.org (Postfix) with ESMTP id 9158E4068E for ; Sun, 28 Nov 2021 16:03:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PFHASQYp3LMCLIjYAeJ2/8JqQz0KKxpz8aWhD8y053C2iBZ6L3WDgmjhcS55BFIEfTrglBfMEFZIgi25RFOgkhQrG9PhyaCr/HYDSA0nlmQi0eVVEstG4utaRzhtQNKY77qteJrC/rV/tpOObIQr0ONprluqi62LOOTMCNbCM8MDNQvAdpMvJmgzhGDA1NniBBUNM2CfN6ojFQp0xcIPE6JR3ocyLXNy5XKLKhYmELrODo5Q6kOkclu+80gmaPRjPdRdHrbBtmjMaaqaZ9fzk3BzvWQlvUdWTOKkxbDkYWafCdv0xZVJ1b1k46P4bX2lgaEr55sgvD2jHe28H6Ckdg== 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=+ZVuazM42srFlEPWyQaL5joW21TMCXrz9cr1SM1O/LA=; b=cByE2zh7y99dkRaUSbcQPfrftDPflytvMZW93DtpMqaLJrabXWxUqFwGYPwtGSfsf6GDWkZvKlWCcCwr/yRn80aQknAvB4SoSdBgpQw/FaTTJmVulOWUjt5T4YLhPlOoZl++NLEMYm1GBRy7oJuVjcrHhMbvtPVgCn19Tk+ORQqsqxhHEjeTeWXAskEB1hlJdcNzj2ykvQG8ooWWKrlIS7c0kgKa+7/yciyAXjEXqxLjOsVdhs6znFAPF47ggYEX/DmMB4xjLR+ll7z7K+8lGR47/oYoMAaOBNP459ydj10nXQefqiTJ6G0sOrpHLaKXiXLLrIF/lYKOTeHQjb/FKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=+ZVuazM42srFlEPWyQaL5joW21TMCXrz9cr1SM1O/LA=; b=KsGgp4+5EE8Msb4PyumlWQs2an2BKidny3PIDTkq8HbWtnfC3veO1m1dqtE2G+dLMLGm+0xl0KDdZALXWX7Dq9kRBSM5EHePIrWGoxiCZaMRQxYTBPX8Rx5NFIdi7QPXJrfavihV3qMQ6FbWiBrgD4ix4T2ZWXO8AQFXe14ZIqOECXS2G5wUUq8eSMxgeQooVrFMVb/L8UrZOdAyyd+zOgiHJiDDyMG6s2e00Xvzra5PXoYVJXUN+eTcBrACsBbvzS/r7RKlJyFEfW18HfirAO6Xy443VEQTdyJMfyO4iWafLg+ON90k0VFa7DwVZND67wtEJbKmzIiXdHVwiz/hXQ== Received: from BN0PR04CA0137.namprd04.prod.outlook.com (2603:10b6:408:ed::22) by BN7PR12MB2594.namprd12.prod.outlook.com (2603:10b6:408:28::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Sun, 28 Nov 2021 15:03:16 +0000 Received: from BN8NAM11FT055.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ed:cafe::6d) by BN0PR04CA0137.outlook.office365.com (2603:10b6:408:ed::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.21 via Frontend Transport; Sun, 28 Nov 2021 15:03:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT055.mail.protection.outlook.com (10.13.177.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:03:15 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 15:03:13 +0000 From: Xueming Li To: Michael Baum CC: Luca Boccassi , Matan Azrad , "dpdk stable" Subject: patch 'net/mlx5: fix devargs validation for multi-class probing' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:54:22 +0800 Message-ID: <20211128145423.3974892-79-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78946334-5725-4f3d-5a8e-08d9b28034b9 X-MS-TrafficTypeDiagnostic: BN7PR12MB2594: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TTmct7MP/Jl/BxvirU3ylYUV+O9bQ6OmLtrFCFWewxcKQOOI3lpTesEgBRZSokH2yy+g3xTb4cWMH17z49WgFpfHZKah6d2W+jsWDlp8sjtk7telQ8aiWlcR3J8QcqP3EaP9wS1SCuT3ttqgenUqMp/7hbZnyUeMIA1MvniabfsvV/3C8Kyxb6045NW1WrF8I/NEQNwu0hnTLR+L7SKqGe7xCMpiq+KY9DGL4YhsuHYHrh7RLzHn6ePDinpsA5zZB73TtWvFA4kSC1xzHAmA/ML8mPO5r+OPC4OKVCKUgIqWPm7EoCH6W5OqZCIvqK5wxy87D56nkbzytzAedj+IAntfJcLjdOregoMnQBPXOeaz9LeDzSwhog8ZymFFaP9ndRZn6TsBhEIPJMPr5Jd+46rbeivvbVoFLbZNaSsZXiT8edJnwJT6yE+LzWLNPFm2m+zqdYwYOXCBbeeKOVVTubTKJDkIYH/0HrzLcgniqYkvZo9D7iU+1EzuWXC3WdVIyZ/DTVXQdxlbXUNvxVk4KiFAF8cZeaM05uWrfLQdwe9Js3RRg1alR/f/o7G33zQjZOFH1ubgu7GJhII9un0WDp6oVN0DRXglx3wpMfjktKdppNA7LzMSrDT2U2+4w5NpuzGOzKm5Ii8uH+RtML8ADgvKguNaGBzPv9asnt0agFO6RN07uR0M7TLWixpuer/P8vw9zVo/ikvlABvg1mMup5LcqigTSjnNPGc8jk7W/sD7sK5K6DZK9+oE2sF+XzpnPcto6n4ZsQU/Vhg6lQEskij7N0nTrUesd9iJE8wvLHj8v8kqPIu3Zxf70O3DrGr2+AnHjeNQH4gq+npoqn0c1Up5q3PziYwgyZLdPoHTNhU= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(2616005)(7696005)(36860700001)(6636002)(82310400004)(36756003)(8936002)(4001150100001)(70586007)(47076005)(5660300002)(966005)(1076003)(426003)(4326008)(6286002)(7636003)(55016003)(54906003)(26005)(53546011)(70206006)(316002)(16526019)(508600001)(6862004)(8676002)(6666004)(186003)(83380400001)(37006003)(336012)(2906002)(356005)(86362001)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:03:15.8157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 78946334-5725-4f3d-5a8e-08d9b28034b9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT055.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR12MB2594 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/f22425186efbea2a330270a76baa9ce1cdef6d12 Thanks. Xueming Li --- >From f22425186efbea2a330270a76baa9ce1cdef6d12 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Thu, 25 Nov 2021 08:16:55 +0200 Subject: [PATCH] net/mlx5: fix devargs validation for multi-class probing Cc: Xueming Li [ upstream commit 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e ] The mlx5_args function reads the devargs and checks if they are valid for this driver and if not it returns an error. This was normal behavior as long as all the devargs come to this driver, but since it is possible to run several drivers together, the function may return an error for another driver's devarg even though it is completely valid. In addition the function does not allow the user to know which of the devargs is incorrect, but returns an error without printing the unknown devarg. This patch eliminates the error return in the case of an unknown devarg, and prints a warning for each such devarg specifically. Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5.c | 64 ++++++----------------------------------- 1 file changed, 9 insertions(+), 55 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 800ca6af0a..0953561802 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1745,9 +1745,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque) } else if (strcmp(MLX5_DECAP_EN, key) == 0) { config->decap_en = !!tmp; } else { - DRV_LOG(WARNING, "%s: unknown parameter", key); - rte_errno = EINVAL; - return -rte_errno; + DRV_LOG(WARNING, + "%s: unknown parameter, maybe it's for another class.", + key); } return 0; } @@ -1766,71 +1766,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque) int mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs) { - const char **params = (const char *[]){ - MLX5_RXQ_CQE_COMP_EN, - MLX5_RXQ_PKT_PAD_EN, - MLX5_RX_MPRQ_EN, - MLX5_RX_MPRQ_LOG_STRIDE_NUM, - MLX5_RX_MPRQ_LOG_STRIDE_SIZE, - MLX5_RX_MPRQ_MAX_MEMCPY_LEN, - MLX5_RXQS_MIN_MPRQ, - MLX5_TXQ_INLINE, - MLX5_TXQ_INLINE_MIN, - MLX5_TXQ_INLINE_MAX, - MLX5_TXQ_INLINE_MPW, - MLX5_TXQS_MIN_INLINE, - MLX5_TXQS_MAX_VEC, - MLX5_TXQ_MPW_EN, - MLX5_TXQ_MPW_HDR_DSEG_EN, - MLX5_TXQ_MAX_INLINE_LEN, - MLX5_TX_DB_NC, - MLX5_TX_PP, - MLX5_TX_SKEW, - MLX5_TX_VEC_EN, - MLX5_RX_VEC_EN, - MLX5_L3_VXLAN_EN, - MLX5_VF_NL_EN, - MLX5_DV_ESW_EN, - MLX5_DV_FLOW_EN, - MLX5_DV_XMETA_EN, - MLX5_LACP_BY_USER, - MLX5_MR_EXT_MEMSEG_EN, - MLX5_REPRESENTOR, - MLX5_MAX_DUMP_FILES_NUM, - MLX5_LRO_TIMEOUT_USEC, - MLX5_CLASS_ARG_NAME, - MLX5_HP_BUF_SIZE, - MLX5_RECLAIM_MEM, - MLX5_SYS_MEM_EN, - MLX5_DECAP_EN, - NULL, - }; struct rte_kvargs *kvlist; int ret = 0; - int i; if (devargs == NULL) return 0; /* Following UGLY cast is done to pass checkpatch. */ - kvlist = rte_kvargs_parse(devargs->args, params); + kvlist = rte_kvargs_parse(devargs->args, NULL); if (kvlist == NULL) { rte_errno = EINVAL; return -rte_errno; } /* Process parameters. */ - for (i = 0; (params[i] != NULL); ++i) { - if (rte_kvargs_count(kvlist, params[i])) { - ret = rte_kvargs_process(kvlist, params[i], - mlx5_args_check, config); - if (ret) { - rte_errno = EINVAL; - rte_kvargs_free(kvlist); - return -rte_errno; - } - } + ret = rte_kvargs_process(kvlist, NULL, mlx5_args_check, config); + if (ret) { + rte_errno = EINVAL; + ret = -rte_errno; } rte_kvargs_free(kvlist); - return 0; + return ret; } /** -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:07.236902258 +0800 +++ 0078-net-mlx5-fix-devargs-validation-for-multi-class-prob.patch 2021-11-28 22:41:03.560203302 +0800 @@ -1 +1 @@ -From 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e Mon Sep 17 00:00:00 2001 +From f22425186efbea2a330270a76baa9ce1cdef6d12 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8648fa2f4688c2ef2d7991bcc3bfa20753862e8e ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -26,2 +28,2 @@ - drivers/net/mlx5/mlx5.c | 68 ++++++----------------------------------- - 1 file changed, 9 insertions(+), 59 deletions(-) + drivers/net/mlx5/mlx5.c | 64 ++++++----------------------------------- + 1 file changed, 9 insertions(+), 55 deletions(-) @@ -30 +32 @@ -index 4e04817d11..aa5f313c1a 100644 +index 800ca6af0a..0953561802 100644 @@ -33,3 +35,3 @@ -@@ -1975,9 +1975,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque) - config->std_delay_drop = !!(tmp & MLX5_DELAY_DROP_STANDARD); - config->hp_delay_drop = !!(tmp & MLX5_DELAY_DROP_HAIRPIN); +@@ -1745,9 +1745,9 @@ mlx5_args_check(const char *key, const char *val, void *opaque) + } else if (strcmp(MLX5_DECAP_EN, key) == 0) { + config->decap_en = !!tmp; @@ -46 +48 @@ -@@ -1996,75 +1996,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque) +@@ -1766,71 +1766,25 @@ mlx5_args_check(const char *key, const char *val, void *opaque) @@ -51 +52,0 @@ -- MLX5_DRIVER_KEY, @@ -83 +84 @@ -- RTE_DEVARGS_KEY_CLASS, +- MLX5_CLASS_ARG_NAME, @@ -88,3 +88,0 @@ -- MLX5_ALLOW_DUPLICATE_PATTERN, -- MLX5_MR_MEMPOOL_REG_EN, -- MLX5_DELAY_DROP,