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 DE40945CB4; Fri, 8 Nov 2024 17:08:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42C67433F4; Fri, 8 Nov 2024 17:08:38 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2046.outbound.protection.outlook.com [40.107.212.46]) by mails.dpdk.org (Postfix) with ESMTP id D79B743348 for ; Fri, 8 Nov 2024 17:08:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ahGgLag6umh/mZAF11AK4Rax7J+jXiGTgl7tbNWUpF1U0wc263MjU6ULI71wCtV5M8zw8Z12k4mxYgIeniJL2cx8D71EdFtf4c5T0HKIaD6ICR9LMO2rGikBUwUDdUPVDIGKIHMUt/9ChoOcvqhuoWSyn2DjIe7BIrw180lLIM6JLJ7yetVvxRHb/BG6FIbxzBmgd+dhZYP1gzGSpLJ3ropkNtdqgczjlzMq9gadUSaL0CH1kOahl67uvz2IkhU6JEOtR9omS3HyUW7nwUExP7sB2LVhmuRBsoeMLu6LhqVS27dqo4rzXopUCU8h0UFNCn2d5A0k3QuhH+LdeM/JNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=noFTHp4FpS7JHEosre95GVmPuKJ6tE22FGdgNoKUY/8=; b=qUVZv2ED1RV8hUuMFGM6DhHZQnQVKvJognE/BQMbR/Rj+vJiYwTdVOKI9OxP9hsYJXCqwaQhpbzxx0/K9mH/gT+KNLd9Zjcsd+V+D2SIqGFvEcKe93cVMxIClJXsVeZAAT8McYbobhXz6C+Lehyd1dXduEbB+hx7jQ++oAG1WXfGsVG2fZg/e8q7MqBql0AfVV0MQFqaiisoa+M5BfzpcXoJCu5I5DRXtUSBxv5w769TeS2yAt2NjPRIS4etMrFv8Yc6FcdEhxcX8tphfGDTXPn+d05MXG9Ln3HMcwiGcJ5FRcbF5mep8267v+GoMeM4jb2hGBh7YjirzL4gOHFVjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=noFTHp4FpS7JHEosre95GVmPuKJ6tE22FGdgNoKUY/8=; b=XD6wB8hYMOvlyYM1dDQqlQwdpF0IUHwROE3IIZLw54OTL14ZGTHIbkrigumx/Pp0/1RPyNbfGTMrlUzJlZpXvXmsrys3AK9OnXN3tUzh7J9epinNxptwvdWwFVe1H1GCcDGheK3M4nu+g7F4r5g4eCnHVYZ84gF2guVbnvovhpho+3atkqSwZob9r66OkOCirBm8rfQRSld/3vYZuhumFujrhMXqg8U0EFG25bx/ggHQ2NcRtE+Yes5T6sV+VnYNwIjJSWVCP6Vdg8FwgLdFIq5tiry3ICiE+/5J0hB4S7zCnwOiX3fyFxzojIgorMcOvlUVu3sUET4l9ZTMrj21tA== Received: from DS0PR17CA0024.namprd17.prod.outlook.com (2603:10b6:8:191::29) by MN0PR12MB5715.namprd12.prod.outlook.com (2603:10b6:208:372::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20; Fri, 8 Nov 2024 16:08:31 +0000 Received: from DS3PEPF0000C380.namprd04.prod.outlook.com (2603:10b6:8:191:cafe::aa) by DS0PR17CA0024.outlook.office365.com (2603:10b6:8:191::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.20 via Frontend Transport; Fri, 8 Nov 2024 16:08:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS3PEPF0000C380.mail.protection.outlook.com (10.167.23.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Fri, 8 Nov 2024 16:08:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 8 Nov 2024 08:08:16 -0800 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.1544.4; Fri, 8 Nov 2024 08:08:14 -0800 From: Dariusz Sosnowski To: Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad CC: , Ferruh Yigit Subject: [PATCH] net/mlx5: fix MAC address initialization Date: Fri, 8 Nov 2024 17:07:24 +0100 Message-ID: <20241108160724.730989-1-dsosnowski@nvidia.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: DS3PEPF0000C380:EE_|MN0PR12MB5715:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b422dc5-da78-4e29-7f25-08dd000f96de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OHlZUWx0UU91Q1pSY2ZiOHIzVFhXZ1hyRUlsQ2ZJQVdnY1FBcUtrQUx5Y2R4?= =?utf-8?B?WnlxNzNlbjFObmtZd2VEY0ZhOGM4QVErcnpUY0c2Mnhvb1hzWDFFc2h5alJn?= =?utf-8?B?Q3ZJZERtMHFScktFeTZEWFNUSkZQcmlIVEhLK3RFVzlwRFRIQzZrZ1V0YlMz?= =?utf-8?B?UWllbTV3ejBKSEcreDl5Y1RWa3NOL2VMRUtiNVBCY3RNU0tNMXc4Z3RYcVRi?= =?utf-8?B?aGhPeFQ0L3RLd2oyZDF5a2p3THdxV3VtNTNiOWdRTU1JaTZZSVFuL3pCbjI4?= =?utf-8?B?SGlTTTFqbU9HZngvb3MvdmJqSmI0dThVVFZBTERuSkwvckttMitabG9jSVJE?= =?utf-8?B?eUszdUEzb0Q1dVRJS1NQUnVxYlRmMWRtNUdmRnJ0V1h6YjdXYW5CbUorZFJp?= =?utf-8?B?ak5Mb2M3RWU4YS9BUlozQ2xlR1QxV3FqZ001S2UvQndLaUsxbWo4enFCcElT?= =?utf-8?B?d0VzaTV0Q0R0V0NTWUtJdEM1Wi9NRm8vK3BJR3B4c0JWVkFLNWlJVnV1NVp0?= =?utf-8?B?K3FteW5KRHNZbnV0YU13ZVlNbjQ4SUo2VE5CWTFyVGtQMEhCdUltQUJLSkpX?= =?utf-8?B?VklOQjJrWWdFVXdXTzd1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utf-8?B?UmJRMzNPNG1BdTI5TEU0ZEtiNmI4YlhRUktCc00yeE5mWHZ1by9MSXQ0SVhm?= =?utf-8?B?d2NidmZkVi8zRVAybTIxQlZqcFRiR0hic1JMd2xSVGEvZlIrYUdSKzdYcTBj?= =?utf-8?B?aUUvMjAxd2F6a2UyN09oZmIyMnV0ME4xWHY2enhiNGdTWHVyWjhpUjZuMGMw?= =?utf-8?B?SzNzdWJsNEFFWkZFZ3BIRHJyQnU1WFA2bkp4Y252ZVZDc3hkMjVBMGlJdHZU?= =?utf-8?B?WlY4YlNvQ3U1UWNjTzJoaEVTRiswZE1xM3lDMDcrZy9iZDFJRVZ6VU1aV2ly?= =?utf-8?B?WDlMcVFmQk1FTUhTY3pqV3daSkhFUDc4cWszdmZFc2VQTmZHSXBUUDhHOGla?= =?utf-8?B?U1lJMVZmb05KVTR5eVBHd2hFeHJiRk1TMytkRkRYVHdSc1E9PQ==?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 16:08:31.0589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b422dc5-da78-4e29-7f25-08dd000f96de 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF0000C380.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5715 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 Offending patch added code which broke compilation on GCC 15, where MAC address was initialized with a string, causing the following errors: ../drivers/net/mlx5/mlx5_flow.c: In function ‘mlx5_legacy_dmac_flow_create’: ../drivers/net/mlx5/mlx5_flow.c:8568:44: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization] 8568 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/net/mlx5/mlx5_flow.c: In function ‘mlx5_legacy_dmac_vlan_flow_create’: ../drivers/net/mlx5/mlx5_flow.c:8583:44: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization] 8583 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", | ^~~~~~~~~~~~~~~~~~~~~~~~~~ This patch fixes this issue by converting it to array initialization. Fixes: cf99567fe566 ("net/mlx5: add legacy unicast flow rules management") Signed-off-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 9c43201e05..f8cfa661ec 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -8565,7 +8565,7 @@ mlx5_legacy_dmac_flow_create(struct rte_eth_dev *dev, const struct rte_ether_add .hdr.dst_addr = *addr, }; struct rte_flow_item_eth unicast_mask = { - .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", + .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, }; return mlx5_ctrl_flow(dev, &unicast, &unicast_mask); @@ -8580,7 +8580,7 @@ mlx5_legacy_dmac_vlan_flow_create(struct rte_eth_dev *dev, .hdr.dst_addr = *addr, }; struct rte_flow_item_eth unicast_mask = { - .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", + .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, }; struct rte_flow_item_vlan vlan_spec = { .hdr.vlan_tci = rte_cpu_to_be_16(vid), -- 2.39.5