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 C8AE4A04A6; Thu, 27 Jan 2022 16:40:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A173542833; Thu, 27 Jan 2022 16:40:06 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by mails.dpdk.org (Postfix) with ESMTP id 26F974281A; Thu, 27 Jan 2022 16:40:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C5Y9Jr/KwckR6ff5JhdYCfae3+ucJjoC2JfbkGBdgFETlqWdVd1TajOPEyeSxK2Uy9dgubsGLzCTxbS0Cr8H25D/tTj5U6emlAF2+0/twFwm0AJY21Cfi3QujvvsC8LJRcINGIv1yiShiYEhKQfsxjzZokrPlj8EekVU969me87dwEVEUWSt01GiVKfKRcjk9IZBDiboopbad29vws4D7v10EDdqKkBJwx7x+5kpD6m2FHfnH6sVWjE6rK4wRQziVWwvYXi01cMjeAjwOzCfmp3sO0fR5q+Hk20vdWks262Ex9Ta47A/xdCmch+HFGmYfIQPzvqhljaPfE3fJluo7A== 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=77ThsbPFh3dSOHqzbc1Y1jwOnCuhABervSapNDxJEuc=; b=J3DgwiZhatu3061TOGXm1pW7pONhIR1TpEmsnd51M63WS+VuydNTqWrV6FPu6nF0qCf2FwqgskuqCO3fwVF6zY8zsN6bJnwbIQaiK4QhCRsxp8cUAolGziKyM2nRLvG2ewhIxfwq43ImfMZq+CGUHhBho23K7HfCFCd/Rk4CArOJt+jOo93J9UHXo/2PADCLAwMGxd2W1i9IEFcxmYDhQu0400TTRirjFyXfx/oi5g9BZb0+qg85fa7oBDgPrMPAJIi6s4kRu6SaoJdniftoFBC9IRx+mx8qTC1AEv2dQUq6T2w4E18R+zcWKbCjLeJ4FS87m4pDPfcKPtD4jAstCA== 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=77ThsbPFh3dSOHqzbc1Y1jwOnCuhABervSapNDxJEuc=; b=KqPXKgTf7/P8OWoI9zVVhO1CaZ404zgPC2wh7jp9HHBmnq3NzQDDskY26v9lvGjXjl99FShP0EYaaYt27LGrtHXhIRxjxIK0OlatmsJmYmRXm0kR8XGXwI+m++k5EdAf8BfzCOcgs4eExHngizsMP0Z2KZ+iJ6bgPZhFuEv+1vG9ElybZ5IHFNnCpI8ho08YplrSur8M5C9MtoPzvAp7nKtX7reHPFoLNX3MAK8FvPQ+KA0Icyr0FrdWBbEgYCrTpz0tzi5k3v6OaCWZEfS9PFGHj1Z+KKxPO1SVjAYov3PgLXL4rBWfYr3BLRmZX4j1n587H92WGv+uBSJr8sdMMA== Received: from DM5PR07CA0116.namprd07.prod.outlook.com (2603:10b6:4:ae::45) by BN8PR12MB4594.namprd12.prod.outlook.com (2603:10b6:408:a2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.17; Thu, 27 Jan 2022 15:40:02 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::e7) by DM5PR07CA0116.outlook.office365.com (2603:10b6:4:ae::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15 via Frontend Transport; Thu, 27 Jan 2022 15:40:01 +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 DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4930.15 via Frontend Transport; Thu, 27 Jan 2022 15:40:01 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 27 Jan 2022 15:40:00 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Thu, 27 Jan 2022 07:39:59 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend Transport; Thu, 27 Jan 2022 07:39:58 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Subject: [PATCH 02/20] net/mlx5: fix ineffective metadata argument adjustment Date: Thu, 27 Jan 2022 17:39:32 +0200 Message-ID: <20220127153950.812953-3-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220127153950.812953-1-michaelba@nvidia.com> References: <20220127153950.812953-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: c71c83ac-cfdd-4f57-da7a-08d9e1ab4805 X-MS-TrafficTypeDiagnostic: BN8PR12MB4594:EE_ 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: bHG86MBw+wBOPZJQMD5iLaV01kjUB4Ikm9ZmhdrLjb6J0pFRIRhwucbaSIgSFfunrcB5JfnPssf61LMEJ1PHaHDWiutMcFT4aNJRA569YoqUG2L6zKDiVILLho/Fkz8ODXi63AnEsICjo2yB+c4BQd9aDELsUlf7eC/QJYk2vx3oVg3taRokhuf4vjm6JkBB33h6Y9eZnPkOZHlgswu1LdpXv8u2IrqFMKRZX4028+V3RA/m+i8bw6IXF3mzGISiJEfo5DpdRiXgFM132c8C5pR5bJutHEO1wThvCPGA5t2bJ/qRUKamcvEVQPHpoBFOr37z3sF7NiF5AR283ABU9UgRZsi370P1PivClKmmL/JUzYgjgcTEiKMfJnsb29kC1oLzlwmkh0+Qfpa9h7b0QmdLnvi0wqHYTHiVusIlkxkbskZh6KQbVQ8Q6m8grr5BG9UeHKfEnHr5Hl967RPcDKBxmmiVQ8d7I5IOMJV0h6/ld/GSW4qCIJ9VM83oS/VRPas//dUxXjIZMyPmtCs6uZ+6+tculBUCCYm0kMaIa77c9UuMrobAtT7/kA68IhrLFg1yiFSfn3OR7nrJjm1AD0FrwK7sIwbqJu30vrTYSTcQ+63gIpcLCS5De+RcM1ZwcuZRb7/BGFIO4DNxRm1cS2jLRgomMtqL1nsLYSC+kWob1YOLIE3M8gywEc2aGtYHUMEClrqqBiCRPdXQrdOIAA== 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)(46966006)(36840700001)(40470700004)(83380400001)(81166007)(2906002)(356005)(82310400004)(26005)(186003)(1076003)(336012)(426003)(6286002)(55016003)(2616005)(5660300002)(450100002)(316002)(70206006)(70586007)(8676002)(8936002)(4326008)(86362001)(40460700003)(54906003)(508600001)(6916009)(7696005)(47076005)(36756003)(36860700001)(6666004)(36900700001)(20210929001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2022 15:40:01.2386 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c71c83ac-cfdd-4f57-da7a-08d9e1ab4805 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: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB4594 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 In "dv_xmeta_en" devarg there is an option of dv_xmeta_en=3 which engages tunnel offload mode. In E-Switch configuration, that mode implicitly activates dv_xmeta_en=1. The update according to E-switch support is done immediately after the first parsing of the devargs, but there is another adjustment later. This patch moves the adjustment after the second parsing. Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index de0bb87460..e45e56f4b6 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -977,10 +977,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, strerror(rte_errno)); goto error; } - if (config->dv_miss_info) { - if (switch_info->master || switch_info->representor) - config->dv_xmeta_en = MLX5_XMETA_MODE_META16; - } sh = mlx5_alloc_shared_dev_ctx(spawn, config); if (!sh) return NULL; @@ -1242,6 +1238,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, /* Override some values set by hardware configuration. */ mlx5_args(config, dpdk_dev->devargs); /* Update final values for devargs before check sibling config. */ + if (config->dv_miss_info) { + if (switch_info->master || switch_info->representor) + config->dv_xmeta_en = MLX5_XMETA_MODE_META16; + } #if !defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_MLX5DV_DR) if (config->dv_flow_en) { DRV_LOG(WARNING, "DV flow is not supported."); -- 2.25.1