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 740C6455C2; Mon, 8 Jul 2024 13:00:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBED740E32; Mon, 8 Jul 2024 13:00:07 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2089.outbound.protection.outlook.com [40.107.96.89]) by mails.dpdk.org (Postfix) with ESMTP id 383044003C; Mon, 8 Jul 2024 13:00:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oAAs2DNpSOOkdwul/EdaGO4ogx7FTU9IF9KE/BgBqqsphfaFyWKSifK+MeQuFKgD1EiO/PYM59IP+ZT19EnEQeorELQX5KrVS60sOpkBDpRLtSbfdyAk/2nR/sF+/U63TJZBHBk87GfD+zugE46r1kiy+cHEhfKg2YuCRyNt/BAaao5M60132YSpwf1USbsda7+ZDuTIA16D+oHrK6hxIsSY4YVlltDNxa3i8iI8yAnqTycuoL1YaZi6LqC9P7Tfo6VbApybxGviRCvsW3Lp6NaFeVurUiZ3PLd8Bszw3jyHG8bamPVqFD3t0hPC3Sn/YwZUCb4lNU4JJ4bTSiQVJQ== 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=MSPTOCctQ+/3rQ1G7B7G6/IMCWefW+KnR6hOgMFTGPw=; b=LllzCd4JvRj3LFQ1VtgE43Fkssif60snvMVNDLX6pSOvqCMJxSliz+hA+PRMpJqoQrD05WDQgs/d0NrE65bTxlgkooWzudfoWOYbzHzdaUDlbQBGS6Y6syPWeI+QD+LKB0G8qHszO/04fXjvAx3foKSrRTZyQCLd5dix1xac4tfCHMwXRRyTyOT12mdH2VNyp+6VS4oU3PvnfwW4iTmJGorXEmP8GqilNogn+OzrDzR4eRnCHXVs+W4m8/ys5y6Oxqvhyfr9UQ5VlubqX9bhlMdDQo8TtxEHiu+nHdBR+0D3E4LP/8qaKJ+98mnsWanQZFsSoZLIP4+R+C07M2do4Q== 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=MSPTOCctQ+/3rQ1G7B7G6/IMCWefW+KnR6hOgMFTGPw=; b=bPiAf2fIfglxyns8zgZg7LSk9QMxKgQVCy4al6DNZZIxVpZVTbxXqrMzB6V4Vvgae/iaqH0rHLaHvr1WtdeLgDYpAmOCFXJjN7PO2fd7XLn8vnBZamYtJbbpqug/CskvIiATmoEvHNclTOCd/fLKGBxQPUl+rWbWFZ74JEXi1/RbstCKWMotZHtraEfRaGlPPWhRDmnmNkZ2OPnlMS/1bMX1eY6ZKBzd5Ux2cG/5GtE4f6toIVd3UtfCfl1SO9AekgV4zf3hHRcvQD2OrF6+Xc2OS7td03iF234eY3JHFc6LN+vl389xY0PgXyWxMbA9dyzLkUCeaVPRE7jN8xlJzg== Received: from BY5PR17CA0025.namprd17.prod.outlook.com (2603:10b6:a03:1b8::38) by DS7PR12MB8203.namprd12.prod.outlook.com (2603:10b6:8:e1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Mon, 8 Jul 2024 11:00:02 +0000 Received: from CO1PEPF000044F1.namprd05.prod.outlook.com (2603:10b6:a03:1b8:cafe::74) by BY5PR17CA0025.outlook.office365.com (2603:10b6:a03:1b8::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36 via Frontend Transport; Mon, 8 Jul 2024 11:00:01 +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 CO1PEPF000044F1.mail.protection.outlook.com (10.167.241.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Mon, 8 Jul 2024 11:00:01 +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.1544.4; Mon, 8 Jul 2024 03:59:49 -0700 Received: from nvidia.com (10.126.230.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.1544.4; Mon, 8 Jul 2024 03:59:47 -0700 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad CC: , Subject: [PATCH] net/mlx5: fix MTU configuration Date: Mon, 8 Jul 2024 12:59:31 +0200 Message-ID: <20240708105931.1842134-1-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F1:EE_|DS7PR12MB8203:EE_ X-MS-Office365-Filtering-Correlation-Id: 5bd22e16-ea83-4832-4e60-08dc9f3d1d5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Dhzly/KTCcgezbMNUBn0milx4/kxUzAwBmkdniXIq4n01I0xstkfXPmLQmJz?= =?us-ascii?Q?4mZoBRkXNtgVvQ4OG8KBJTsbvMPI08lfpVrqII13adtzZUJVI0/9JJSuRm4J?= =?us-ascii?Q?z6Rw00MUIB6OLdSTB9yCy9c0B0GBkQ44nyHkpH7K+fJeGGh+l5gOzZQaTumj?= =?us-ascii?Q?5qEh+RlVkvmmF9g59sJ6m4hAXrauD8vk30dYw7kYjlDsWV6DEy2wnLLUAt+i?= =?us-ascii?Q?DlIJ265GDS+keUJEH6K2E1GTYReCo56yZ6Qcpd4rZTfDVx029uokgJwF2Cfq?= =?us-ascii?Q?vpZiq5YpcAvi0RqFdUEYoQ4yYYLJ1D6kd/joBdh/BcOKjsJrpnTlgu1gszRX?= =?us-ascii?Q?NMosQF3jrWdbU1S3g6SWlqQUG0Arrcj1sAxZs6GCXFdMeDGinD+DhkFFGHwC?= =?us-ascii?Q?ITZWQT0v3VZrcrQyB/pS9f5zr9O5at0nPFZ/vHQZYEqhj0jEu5LvSBrA02/l?= =?us-ascii?Q?Ga9Mmr2fVGNNHly6rpy0BoJy9G1b1hAXMOAP+1Dj4BBUIJJ7i9TkYCai3Ju/?= =?us-ascii?Q?iTZCyxiU2mbNlm2PAZzdcFYt5wJ5LO5yzNRC026+pGMqkf8BAF0JdAjLE6Vn?= =?us-ascii?Q?yYwKVMcWIppdWO5N9eCW8XYTagujFnSZHxI1nMK/O0MpZ+OtmUb+8NpdqWIx?= =?us-ascii?Q?C8cX9emFn242dsrHEnMFwukNuKaWoW0DSpcPvL4km9+2L7HnbtM0bCDU7r4c?= =?us-ascii?Q?F35xtH0g16ezuIon73Vma/tHJ9FnAc5pBkZvb1D60CJMS/fFD/V0XGq760q3?= =?us-ascii?Q?OlyHpffAcsfM9xf8ukEi9I3oZ3NzwXCj6pXowQeWbUftp8J/+wC+VRerhYfe?= =?us-ascii?Q?VEOftwDZRqaxIBVl804yLMe/Fw9dU7PWRJFGjuTL+r5dXj9SRLqGEIYmn9Sf?= =?us-ascii?Q?Kz4nOEooi8OCgJf01SG8GYQg8yF3MuOl/jXZcHbHBdL4XV4bCx4XlMmhM/va?= =?us-ascii?Q?FTfO3PcvBUUFCZSgmSeDz8kxU+X39J1FbIE460+m6A6Vc/YLpUFITzMlPqw5?= =?us-ascii?Q?60zcE54NlLqBdDpIrhHIn9rV4NCWyMOjjqC9UhMKsV1FBpTDxbOq0uQh7ESn?= =?us-ascii?Q?GN56qZ4q9kPrpYwwvjW8VvEzT8XH1P1ea4KA1XScGEPodIWaFgciHbmiMogn?= =?us-ascii?Q?DiOqWx/NLx7usOneuvk24KyOPEYp6sy6n2fw8s08VnTRFuGuFdMx8vlJTV9B?= =?us-ascii?Q?5lNMQ83Xem2zt953g7XMsZS5PUkkzKKcVhZIeShm6DmnWkDBApUvVWsAVJ09?= =?us-ascii?Q?KWjizyHkZ+2RuWd37pf4GD42MAGWOLuUhamoRontthc77uKAMqotOw2JqWPg?= =?us-ascii?Q?vNyULKNaV4OvQH8BNJJWbDcMotjt+sMSEitcPAaJJ8eM5KO9gygKTT09A4Oi?= =?us-ascii?Q?S9AZrNqWYDd2ZiSnuhjdvWL7NDPY3uC5F1HhioSJygUClJbpu0ClviE14Esu?= =?us-ascii?Q?/ae10KC6M2y37LW0PKQjQmmhDwdv4HN4?= 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:(13230040)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 11:00:01.3305 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5bd22e16-ea83-4832-4e60-08dc9f3d1d5d 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: CO1PEPF000044F1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8203 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 Apply provided MTU, derived from rte_eth_conf.rxmode.mtu, on port configuration. Bugzilla ID: 1483 Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop") Cc: stable@dpdk.org Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 1b721cda5e..6a678d6dcc 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -154,6 +154,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev) ret = mlx5_proc_priv_init(dev); if (ret) return ret; + ret = mlx5_dev_set_mtu(dev, dev->data->mtu); + if (ret) { + DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id, + dev->data->mtu); + return ret; + } return 0; } -- 2.39.2