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 2DB5C45710; Thu, 1 Aug 2024 12:33:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1975742830; Thu, 1 Aug 2024 12:33:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mails.dpdk.org (Postfix) with ESMTP id 2CD86427E5 for ; Thu, 1 Aug 2024 12:33:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722508427; x=1754044427; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=S04S5guSCemaGOdGVM+S6B/o0JvBMOKPsDH5x6urJ58=; b=UXfFc/+YdmNj6mlHL2xjVmxtaewwBY7kbup0VIabYb43aFLodqvySrI/ bT/9Nxm106dXfQLGewZQXwZA21yLyWRBXtEC8cTjOGtbc3kIhUw4IEDL1 S2+Yql8qqoTS0CPVm+XpYb3L3fOWvQcTqFgG9LBzxJjUEWOthoivdT2vC pFXGeqxWjLBS+FKS9iNv4Dl0IJEyi6qBEz/vSDBzgNcbJ83Uboi447XQB ywIYZsxh1F51D5uNpv6Iuu/88RlHfYsXJ2Mru+00WjwREcgSHQAKEw4Zx WWxbIZ9Em5ez2L+UQFmfEGMqJkhblWQ/FYVYdBsO5x8p/+XKdr6StQrYh w==; X-CSE-ConnectionGUID: 2Jyhx23dRSaXbxFS2pEc7A== X-CSE-MsgGUID: A5NspY/UT56Uf75g6Qws8A== X-IronPort-AV: E=McAfee;i="6700,10204,11150"; a="31848911" X-IronPort-AV: E=Sophos;i="6.09,254,1716274800"; d="scan'208";a="31848911" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2024 03:33:46 -0700 X-CSE-ConnectionGUID: 3TxH/5yGS5C0XIaBKAhbRQ== X-CSE-MsgGUID: ePvCprFiSmKsi6bGlKIv1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,254,1716274800"; d="scan'208";a="54660758" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Aug 2024 03:33:46 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 1 Aug 2024 03:33:45 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 1 Aug 2024 03:33:45 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 1 Aug 2024 03:33:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DfIZHrFPrZz3sJSWj9FLXq5J8lPwDCSAe8z0zqqXE9IJFZEV6xee60+JIlWvo78d4VtVLgesvw2PpiQMXTV5+KHcK9HfgB+K3X7nVkPK3O6hJ2DZEGBtH1aBaJpv2xIwuPVWZxGc5bYOvpTg5tLnKT6mohcFTQy2XOUYyZ99nihMopcsC8s74HCNl94LvBFqLWUeL+50vSyffNJCfLy+fbgjEB91uOBZhe7GdhC1hInrqVLxGDUU3uCEhxVgpD9Q+YMu3PXgLmbAW2aA6dgJNzvN6nvUA+6h0uaNqkkuVSq69u+ZkLdT/uBv045OsAtWWEADPzMMQq+jWqx3rxSoDQ== 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=vSnEHtB9ak811Y+NCVfl324ygnK985KXLyVcnFXIkDE=; b=uTw91VDshwEEuoV6C3EqZzPcYxjPwjJBBsCUgKEa6GCmcxMKKmGmUKVod2LCxYCSRU4433ULOW+3WYUR/l2w2Gz6gNZz5tWYs60E7iLZNx8DOfFTu4bcNYIsJe+BV0k4dt2LLhLyKnTHaKJry2g1KTayPFbDl5d51yMWdDS5WEO28lEIYd3rZ7yZB7eMb8lSENqQWMJ9LCTTmFNvQg0RHOkmMQlb5i9kN8zsh6nXXunCnq87x0DZ/Miqnua9ykSAY4ySYDmOeDC4C2bKhZVC6o3R0lOvQY8D4OeRgNb4GnoZ/9ldADc0LcttSl1FrBXIv4g9OqrvgPYcpL12EqOxEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) by SJ0PR11MB5149.namprd11.prod.outlook.com (2603:10b6:a03:2d1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21; Thu, 1 Aug 2024 10:33:42 +0000 Received: from CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971]) by CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::2fa:a105:f81e:5971%5]) with mapi id 15.20.7828.021; Thu, 1 Aug 2024 10:33:42 +0000 Date: Thu, 1 Aug 2024 11:33:37 +0100 From: Bruce Richardson To: Ferruh Yigit CC: Thomas Monjalon , Ori Kam , "Andrew Rybchenko" , Subject: Re: [RFC] ethdev: convert string initialization Message-ID: References: <20240801092722.3732917-1-ferruh.yigit@amd.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240801092722.3732917-1-ferruh.yigit@amd.com> X-ClientProxiedBy: DU7P194CA0028.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::12) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|SJ0PR11MB5149:EE_ X-MS-Office365-Filtering-Correlation-Id: b258dfa5-97be-4a27-ceda-08dcb2156a3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bGdEUGphKzh6M292Zkp3bnJNZEh4dVE4VGlCWnM0L2MvREJaRzN5bWVQZmQz?= =?utf-8?B?ZHBNTHlqVFhvaXQyblhzMVZONUlTWUEvY1FJUlgxZlFFbWdqamU3QTRoY2lv?= =?utf-8?B?NWxZbUFhZncvSEhwbjZVK1VsMWRxSzA5MXNBUUsyOWJvc09hR0cxQ2xYakor?= =?utf-8?B?Z0ErcE10NlRMTlVKWWIyVVRUbE9MaE9wbi81dHd6OCtxRVAyMGRzbnFaNGhO?= =?utf-8?B?LzcvZXQ5MW1TYllNL2NNUjIxcmpCdHpFYjJXckZ6MFpzVThURzhkYXRLOXpw?= =?utf-8?B?VnJNZTZ5a0VrUzBWTUI5cUo5SEg2VE9sUTVOUzViY0w4Sm1wRThNUEwvV29w?= =?utf-8?B?U0NZSWxvVU94OXRaVEo5cnBLRi9WQ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GxrMXRhNkZJY0hDWDVUVlJpL2lQc0dHUmJoZkx2UEhKaDhMZ2RGWXVOWmxa?= =?utf-8?B?ellkbEpMN1h3Z2pXUXhCMS95OU9RSVJsZEdJZnVxMmhPM3gxVkt2OUIycW5l?= =?utf-8?B?K2tVMjZCUFhLdnVWRm1maG5RUXAzb0ljby82c1A5SnZERlV4YlQ5QzBsRkRn?= =?utf-8?B?UmpaMmI4endGMTl1UkVSM0VhL3BWdE1SOVJlTHJzZUVBajRXb1pUMEU1T0hj?= =?utf-8?B?UHV2SHZkTjNNMWNYM2hXeHU2R0h3ZVJHZElpcXRQSWNRTitqYU9NUTUxdTFT?= =?utf-8?B?Ti91K2toZldTNEJhMTc1L01XTG0rd3FRTmhqN1VsN2dsWDI1WTVzUENhL2ph?= =?utf-8?B?OURxSkpxT29qYW45OVRibDhscGtEMGoxOXhrQW04emxaZzVHaTNyeHhEck1s?= =?utf-8?B?SUNYdnh6S1Z3NEtTSkx4ajZvYVlTaXAvcG82Y0N5OWdndEVHTU5CRVVjTldO?= =?utf-8?B?V3JralpMdk4vN2R3MFh6WGFtbmRKeE5YQWE0cVp6QjNkODZ5ck1CVy8vN1RX?= =?utf-8?B?THdDWTNGRlA0OHd5aGY1Zz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR11MB7290.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWJmU2RPeGVPL05Lelc4elo0dnVZRWMrS1prUTVYeTZqZ216ZmRHdjM5dnJZ?= =?utf-8?B?Z3V3WG5IQkV3c1dxLzg0T3JhaGZ3dFlZUGVNMEdBQ3c3SDArQlZXUk56Umoy?= =?utf-8?B?N0VjaGVKOGpTQTlhUDNQY2hFeEVIMVVOU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ZaFczQzR4czNLYTlWOVJjaXhoU2ZYMGZEUC9TMkNGMG9u?= =?utf-8?B?L1BLNUcrLzNpeGVnZ3IwbEpFRW04VEkxL1JNZG5YNXdFcnpQWHFqZ3VPb0lt?= =?utf-8?B?NzJaSm0zaHpZZ0hsUHJQSHBUYXNDQlN6TWNPZzFqRVliY3BpSWc2U2dIZUQy?= =?utf-8?B?WWhucDNFOWlPMVhGWC80dG9ld2R2ekNvd0tVY1JLWWthMWlvellXMVc1SDRH?= =?utf-8?B?ZWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: b258dfa5-97be-4a27-ceda-08dcb2156a3c X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7290.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 10:33:42.8185 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bBhzw0bmUfJFzPYXNIZH89UY3Ur7eI4nXcUCB2TyIJRGf9vfXf+Xsa8c803D8XLo4FjM/fPQXleMglRuwcJElKimw861MXCE+GKlP5ft0n4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5149 X-OriginatorOrg: intel.com 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 On Thu, Aug 01, 2024 at 02:27:22AM -0700, Ferruh Yigit wrote: > gcc 15 experimental [1], with -Wextra flag, gives warning in variable > initialization as string [2]. > > The warning has a point when initialized variable is intended to use as > string, since assignment is missing the required null terminator for > this case. But warning is useless for our usecase. > > I don't know if this behaviour will change in gcc15, as it is still > under development. But if not we may need to update our initialization. > > In this patch only updated a few instance to show the issue, there are > many instances to fix, if we prefer to go this way. > Other option is to disable warning but it can be useful for actual > string usecases, so I prefer to keep it. > > [1] > gcc (GCC) 15.0.0 20240801 (experimental) > > [2] > ../lib/ethdev/rte_flow.h:906:36: > error: initializer-string for array of ‘unsigned char’ is too long > [-Werror=unterminated-string-initialization] > 906 | .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > ../lib/ethdev/rte_flow.h:907:36: > error: initializer-string for array of ‘unsigned char’ is too long > [-Werror=unterminated-string-initialization] > 907 | .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > > ../lib/ethdev/rte_flow.h:1009:25: > error: initializer-string for array of ‘unsigned char’ is too long > [-Werror=unterminated-string-initialization] > 1009 | "\xff\xff\xff\xff\xff\xff\xff\xff" > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ../lib/ethdev/rte_flow.h:1012:25: > error: initializer-string for array of ‘unsigned char’ is too long > [-Werror=unterminated-string-initialization] > 1012 | "\xff\xff\xff\xff\xff\xff\xff\xff" > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ../lib/ethdev/rte_flow.h:1135:20: > error: initializer-string for array of ‘unsigned char’ is too long > [-Werror=unterminated-string-initialization] > 1135 | .hdr.vni = "\xff\xff\xff", > | ^~~~~~~~~~~~~~ > > Signed-off-by: Ferruh Yigit > --- > lib/ethdev/rte_flow.h | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index f864578f806b..8b623974cd44 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -903,8 +903,8 @@ struct rte_flow_item_eth { > /** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */ > #ifndef __cplusplus > static const struct rte_flow_item_eth rte_flow_item_eth_mask = { > - .hdr.dst_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", > - .hdr.src_addr.addr_bytes = "\xff\xff\xff\xff\xff\xff", > + .hdr.dst_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, > + .hdr.src_addr.addr_bytes = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, > .hdr.ether_type = RTE_BE16(0x0000), > }; > #endif > @@ -1005,12 +1005,10 @@ struct rte_flow_item_ipv6 { > #ifndef __cplusplus > static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = { > .hdr = { > - .src_addr = > - "\xff\xff\xff\xff\xff\xff\xff\xff" > - "\xff\xff\xff\xff\xff\xff\xff\xff", > - .dst_addr = > - "\xff\xff\xff\xff\xff\xff\xff\xff" > - "\xff\xff\xff\xff\xff\xff\xff\xff", > + .src_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, > + .dst_addr = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, > + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, > }, > }; > #endif > @@ -1132,7 +1130,7 @@ struct rte_flow_item_vxlan { > /** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */ > #ifndef __cplusplus > static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = { > - .hdr.vni = "\xff\xff\xff", > + .hdr.vni = { 0xff, 0xff, 0xff }, > }; > #endif This solution LGTM. Acked-by: Bruce Richardson