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 878E845493; Tue, 18 Jun 2024 19:05:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AF0F40DD8; Tue, 18 Jun 2024 19:05:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 6996B402E3 for ; Tue, 18 Jun 2024 19:05:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718730339; x=1750266339; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=mxccGOklq/WavAyKcmp552nunNjxVn0JCJIQjXZlUVI=; b=K6vY6bR8xyLgZhdIjC76arIz2HSV/nrIv9TQzWWSYZgRbukHTX75VhuB DNIgwjiheP9v/OirC1aKrNbFdpY10ynw08FD9D/K4ewqZ0rpCXfaFzJgn vhBlk7mXzzy+wkud9M6dDXUB/usjZRGvXD8DQw2h68ExnXnGSvYGxgXFG DGHpLq6My5ud6CYuhHYqvlj5iFopzbve2cznO5gIfQG/fLuWaLIpfmueb KVnqQcaO4XqFQafpKgyP60lqgK4DRQjKyQVhGh6Wa8BwA2tHhpvggASqw ibaCrwl6A0dj2WO2SD4EfFsQs8W1lLMSJPUIgzS6feKOX/b3kQUBjTAmC g==; X-CSE-ConnectionGUID: HdPXFxc/T0e73I8Obsx4XA== X-CSE-MsgGUID: cacDHw8sTuqMqrEAs+5GQw== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="15759280" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="15759280" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 10:05:38 -0700 X-CSE-ConnectionGUID: ev97Vxm4TfmJW1CVdmMLWw== X-CSE-MsgGUID: pZwbkK7MS3CU65a9PYmrsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="46064379" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Jun 2024 10:05:38 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 18 Jun 2024 10:05:37 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 18 Jun 2024 10:05:37 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.43) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 18 Jun 2024 10:05:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGTmTELlV6fRlaZ7kUYPQkTM4vDrHgTU1j4ltpWe8kT6yYhA3/XR83MPaMp5Us6svLbsw8wzVPJBk7tDe04iHnPJkHly2dV9gXz8JP6shb3sQzCs8TQJGLyE+OTw/o3dlPukR9MQUvQuMv1D0XvZk3r2dGp4EVTItnXtokWaYDkizfGqWdILvpLUC5YjSwyMtux6gfmNmSsDNm2gYFiUJ42ez/9W3F1Y7OCY2NMcl/FTlo7SGnGuQluuJ6v8HZ62jBJbAYvJsKvZyhlNmKZR+xi/HGnWKAwC2GQerB2Zuh4DfmJA0EklUCaeWuxXUysunzMZ5yUtCTn3ZDaUvo7iBQ== 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=1xFc3008NU8+8EUgV6UvzzHy3Wv7hTQq7y2eEPeCtSk=; b=np0CEQGGAlyOR63sGehRGL9sVrXWj97ZAeJbpolPTMvqc828ReNVU984VGUP/TVBQahD8SsGDDnTgNKmGk20yOLvPmt4hQuHl9ch0BqmB6+zQE2hNFR1CEg9Q8Tc1+RX9Pl7JGvS5REe8HusO+Ih8dnvYUkjWbPxFyPZ9kKZEbDujZjICDAarir19UDtSmGVOOfutKJiGHM0DBdrZrRMfRZraHTgzaRe9kUrk5OOYv1GB2szFFnsLfC8XPZgdaOPwbdasBUSs+b5Mv5vYOEvpUvpGlH6/XaDSYvYC3lT5icb9rL2/lUDk6s+5QREikmZixAUzkXexmCYFm/bXb7nbA== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SA1PR11MB6965.namprd11.prod.outlook.com (2603:10b6:806:2bf::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Tue, 18 Jun 2024 17:05:35 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%7]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 17:05:35 +0000 Date: Tue, 18 Jun 2024 18:05:27 +0100 From: Bruce Richardson To: Anatoly Burakov CC: , Subject: Re: [PATCH v2 125/148] net/ice/base: fix compile issues on some targets Message-ID: References: <20240430154014.1026-1-ian.stokes@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DUZP191CA0002.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA1PR11MB6965:EE_ X-MS-Office365-Filtering-Correlation-Id: b36096f4-1002-4d7a-ec34-08dc8fb8de40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|376011|1800799021; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?812wWZ6dmTD7GA5AIqhOC8+KNuY+uj1FSyvcthsLbnXcYAqFtPZvPHOZPaZH?= =?us-ascii?Q?PoiOf6ekVg9AnbJzRjHijYPg/9QNjY/TSqQzv6n9Lv0uoqzYBt2/NOclP3DF?= =?us-ascii?Q?bq+/WW/vjm1TQUF5V3AjkqKGYF2o41XBt9T9tJBT2yhJSrSZWoVaU9z+CsOW?= =?us-ascii?Q?3M4Zvv9rPHIbS5HM5j1+joXLaJYtLWGJIZMIhRzFyd73GcJwMvHx51HyeHNu?= =?us-ascii?Q?8Rv8Ft9t/dFHFWzHB4IbFm1HxdXCxx7hTHYogqCoBPlfebygYWhDX9P0uthC?= =?us-ascii?Q?td8wix0a/k+sYH8YKUOLYdu6Cq9dQbsJZ0IWXoKFC90NcYdUGu8D32F+06WL?= =?us-ascii?Q?diu2Q3Zi3VTgrYy8ntGrnD3TLONUiUBEltFbAU8s05S4IxUWV9S8Of002gXl?= =?us-ascii?Q?UKmq0FGGx/0OMybGq7OgeTa4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-ascii?Q?gg1FCGz5IFi31SsEYFOKns+U?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(366013)(376011)(1800799021); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?iylvcX9GvHGV1gVewNvxJnHg8Wd+kLqKF2EJ7msgyCTs0NL47cvEPGo7O6AF?= =?us-ascii?Q?yBdZEaXx5lhg7+V3wA/rs9mKOW1Pul8PSV22BVM+Mc5+aYO8vm4TbpElKnkm?= =?us-ascii?Q?hdcPo96BgbPBi6Vn8uHh89bw9EE1yP5zMxr7DQTqFDSrhtICf2pEHI1yiWIJ?= =?us-ascii?Q?gCZpkmoiqGqmbRoOO5QOGvNfJfTnWeueCrDih2/l78H1n/jAocK2nYIY6615?= =?us-ascii?Q?7vYgQeQEkD7LoWlHXfelcyH6niNzrrXu00UKV58bFAEx2OEgim+LEY1D+QW+?= =?us-ascii?Q?302oIuggWs1XKK+3uB3k2dmgzCa6cM1OrVMsl1g2wRzVHtQPMAFAmUcKcxBc?= =?us-ascii?Q?DyNReYBw2nDiHdA9F7V2S/722uWCH7GiEmx9F70j0PINQhF7cG3irOc4ldZF?= =?us-ascii?Q?hhJ+yrLYI3JN1x305jmVVbaxR1YMBq8P7dx3aYeH5wpf1F8RU6dpIVjy0LXN?= =?us-ascii?Q?wb2hq9fDHXYDmne2vxgj7C7Xk0PfnrfP+c21WUU09rms9isJ8wsoRHzyB0TG?= =?us-ascii?Q?dTdzPw7Zk81hvMmY/O7NMlcXzdNVlVnRCFfXfCIG+CdvjjbGhVm6YY1CmnrV?= =?us-ascii?Q?kvbqQjPmAGUqZIX4WcjufvwfLrIUi2F8bz1jfRefiIJDu+py7jPl61fDJtHs?= =?us-ascii?Q?fXaxsxWYb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Z8z08k?= =?us-ascii?Q?GSLg7QzxrLvHVqYElBhquHYofETjQVHl4oFoLuY4fKZ4KyJ9WivvGw3R7Us7?= =?us-ascii?Q?Pw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b36096f4-1002-4d7a-ec34-08dc8fb8de40 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 17:05:34.8914 (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: /smjWKRMc/uZ5QRUdqOeNeu6c7j811lBeq1u6zIjmzDwozk7L2SdtUFz5aSAcnLLUmN4ZDxTGTECQdahahDe5NLOk+EI1qWxpNh0YnHfdBA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6965 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 Wed, Jun 12, 2024 at 04:01:59PM +0100, Anatoly Burakov wrote: > To avoid triggering compile errors reported on some targets, use > explicit type casts to specify type conversion. > > Signed-off-by: Anatoly Burakov > --- > drivers/net/ice/base/ice_flow.h | 2 +- > drivers/net/ice/base/ice_parser.c | 7 ++++--- > drivers/net/ice/base/ice_ptp_hw.c | 9 +++++---- > drivers/net/ice/base/ice_switch.c | 7 ++++--- > 4 files changed, 14 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h > index fd2ec39c1e..65b261beca 100644 > --- a/drivers/net/ice/base/ice_flow.h > +++ b/drivers/net/ice/base/ice_flow.h > @@ -485,7 +485,7 @@ struct ice_flow_entry { > u8 acts_cnt; > }; > > -#define ICE_FLOW_ENTRY_HNDL(e) ((intptr_t)e) > +#define ICE_FLOW_ENTRY_HNDL(e) ((u64)e) > #define ICE_FLOW_ENTRY_PTR(h) ((struct ice_flow_entry *)(h)) > > struct ice_flow_prof { > diff --git a/drivers/net/ice/base/ice_parser.c b/drivers/net/ice/base/ice_parser.c > index c9bcf9ea5e..e242fa8353 100644 > --- a/drivers/net/ice/base/ice_parser.c > +++ b/drivers/net/ice/base/ice_parser.c > @@ -96,7 +96,7 @@ void *ice_parser_sect_item_get(u32 sect_type, void *section, > if (index >= LE16_TO_CPU(hdr->count)) > return NULL; > > - return (void *)((uintptr_t)section + data_off + index * size); > + return (void *)((u64)section + data_off + index * size); > } > This change (and below) gives compilation errors with 32-bit, since you are casting from a 64-bit int to a 32-bit pointer. Better to keep as uintptr_t. > /** > @@ -146,9 +146,10 @@ void *ice_parser_create_table(struct ice_hw *hw, u32 sect_type, > if (no_offset) > idx++; > else > - idx = hdr->offset + state.entry_idx; > + idx = LE16_TO_CPU(hdr->offset) + > + state.entry_idx; > parse_item(hw, idx, > - (void *)((uintptr_t)table + idx * item_size), > + (void *)((u64)table + idx * item_size), > data, item_size); > } > } while (data); /Bruce