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 0CFC34257D for ; Tue, 12 Sep 2023 14:48:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F165640608; Tue, 12 Sep 2023 14:48:49 +0200 (CEST) Received: from HK2P15301CU002.outbound.protection.outlook.com (mail-eastasiaazon11020015.outbound.protection.outlook.com [52.101.128.15]) by mails.dpdk.org (Postfix) with ESMTP id 13D0340272; Tue, 12 Sep 2023 14:48:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AMRqH2/nEBpH1MqcDOFeCe9NbLv5C3bv3ESrAkaHnPgwKcRVcIrUhzDJsPHf9bj2AikUV+qXXxj3plJGCNIxs06HeXSMsSco1wle36hqJaXIPhFIHBjFZd6/wWedbjTlbFfDVZrcuwq+KrNEf/OoaMMtSMArVjdN17FN7DqZQ9YpFkl+Qsc2FbZiqHuM/D49moqc+3uTWSo/qZMlLy+xtiW7CuUkB2DiDAvGHUd+4xi/3pDFc9ldj6pn+coOmiVqN9aYJqJ9+rm5R1fWzM4oOqG6khDbBkTPHzp6/ccYIid8LA1iMIunrLLowsmrOP91KJNnPF9bIkkDSiE0X9NFFQ== 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=n+awWoM69ARc/FF6JiyGGb6Bt5itA0Kpx6uyxQXSY8E=; b=CH0iTIClh+FZwUxwxRTSYNiz4n2o8xYlQZkHVP3Dep2Ic8eLwfV6k5SQzwvELN3iWH3808pDS9prrhxYsCLZWOzuiL9Zz0+3zyifttxb1RIUK9mUJ5gt4BuK2gY6oJ9jNRB47+4xPFBU0THY1Xv3nNwIln2b9hWFX+MOHe7jczbaYErBIV65Po8gW3jJRoaNAiB38DzuF9qwrGb029Ns4XyldLz/sga0XPq/cBS649ngiKuIlYDBOG5vcbfhWFHpDyYyl5sLVZZpelduR1smLrOK9uvOOv9AWvnY29OOGSapiobjaMSgGdfLgfMCd22M8GYKR2mWRA+sBWn008wJgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n+awWoM69ARc/FF6JiyGGb6Bt5itA0Kpx6uyxQXSY8E=; b=gKfS0v5pXFtndDqK2LxOSRwiY8zm9XaSs/DMIhEnnNg4pKGTY00pFvJYJNIOh+nq2brBOR/TUkAJGMUxWMPz7n2zL5Iub83iX/7uUDKnC134GFK887MbUUAS6LMcvG81+iMQPtkty8qYfj3qoPcr1Q/a6qmFj73QzO0/LS40jmw= Received: from SI2P153MB0441.APCP153.PROD.OUTLOOK.COM (2603:1096:4:fc::7) by PSAP153MB0456.APCP153.PROD.OUTLOOK.COM (2603:1096:301:67::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.6; Tue, 12 Sep 2023 12:48:43 +0000 Received: from SI2P153MB0441.APCP153.PROD.OUTLOOK.COM ([fe80::7bae:a915:919b:6f83]) by SI2P153MB0441.APCP153.PROD.OUTLOOK.COM ([fe80::7bae:a915:919b:6f83%7]) with mapi id 15.20.6813.004; Tue, 12 Sep 2023 12:48:43 +0000 From: Wei Hu To: Stephen Hemminger CC: "dev@dpdk.org" , Long Li , "stable@dpdk.org" Subject: RE: [PATCH 1/1] net/mana: enable 32 bit build for mana driver Thread-Topic: [PATCH 1/1] net/mana: enable 32 bit build for mana driver Thread-Index: AQHZ4xfig4ffpQJ8GEKeMPZ9qhC/wbASlCgAgASR9BA= Date: Tue, 12 Sep 2023 12:48:43 +0000 Message-ID: References: <20230909121830.2043779-1-weh@microsoft.com> <20230909075154.038f6b35@hermes.local> In-Reply-To: <20230909075154.038f6b35@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=55cea042-5eb1-4ff3-87b4-b8b15c305652; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-09-12T12:39:19Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SI2P153MB0441:EE_|PSAP153MB0456:EE_ x-ms-office365-filtering-correlation-id: 627701b4-225e-4490-d431-08dbb38e98b8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tecNMFJdX5he04ct6R3r5JBaxRxPWKIRwsTvy6Cs/3toihqWqV/vopRBe9ZBYz7YgO4dLwdOEw2EyIiSl9W8IODhlnsZKKK6VjaQI3AnUHM8voneeKrBx91E6k5hyeLEtbpMU9JWdDDQL3euLvFwvXBJ2nENeA1VsKsTHqp2ttaXBMaBG+jBpowLvooE9iuDJeAqtrO+T1GOBelmZIccXUak5mhswZHaa7VaNgrw5RtCoiAYpmro6DvXynRc7GDKb2B0FLcV5SO3sKZ9vnwSvTMOCuUtv/TgtAHmGDAZuDB4g6LAJw3j7z/JZNLE8NCHzmcXnxqDAstfSq4e2IsTEqCo5ahfbzl2fA8kw6HA2BXuSAOdIx+sv3pfRup0ZiUq0I8ofOqVqz6uD1FEGJH1tUk8vfXq0i3bAlCo0yBXgguEo1VcnaSW5ui6ugwanpvlhUi1ZJinQTfrXwCnkoyP4sH1Rqkobzprzn7tiGgzsPar8aEEUX9kJenl55COUyR4n05wcJ4WznPsJ0+nJgyyRK/eYtDyWIaGzSPNyG1k7XQtAtTsaiWhyIyfDPsyXzEy0+ie80cdKohBDXt8mKTDJpqgoqUN86pLDIfsaPo/B6VtP6OQGCAA9oG/jMk30kn3ZrfN9f3wUP/h5fxotwI9EvXCsvzBPd/y1qBZVSd0J6o= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SI2P153MB0441.APCP153.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(136003)(396003)(346002)(39860400002)(186009)(1800799009)(451199024)(38070700005)(71200400001)(7696005)(6506007)(33656002)(86362001)(82960400001)(82950400001)(38100700002)(122000001)(55016003)(26005)(2906002)(9686003)(478600001)(10290500003)(316002)(5660300002)(52536014)(4326008)(76116006)(6916009)(8676002)(8936002)(41300700001)(8990500004)(66556008)(66476007)(66446008)(54906003)(64756008)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hjn/OtN88+F/Xbo5h137kz/wzWrvM0UlHSuqXu1beBVui89fxdLG6rK3dROF?= =?us-ascii?Q?+T1BBJHHDuesaRWRRpi7RNRu4GCNWMA3ZKFkeNPcVX80O9DGOyE9N3wxp5V9?= =?us-ascii?Q?UxwEZBynEvzNbLfpMfJRKV6FVNkIKjZLNseQzvbHMc30ZuHN0/kzxh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8Y2pcVnLrGrP4DI+rBy+vmbA1oUQQ/A1ikjKky?= =?us-ascii?Q?WI0iXjLFr50+iZ7AuJ96uqRUMEvsmRycpBPlAGq+xnrhijuzwQ6Q/JSHotBW?= =?us-ascii?Q?d5T2iZDKUDOra5pOmkC+n4+MJYOUMEq+QDSC1CR3hf9O2rL1f4fKfwR5ygZr?= =?us-ascii?Q?BbVnAP8O0QJYp3iX/diuR975MwkMDWR6cmvdSXubeQcS6rhKiJr8I2pHEp5o?= =?us-ascii?Q?+mFAhsdKIsLvvmvwIxCY6Y2fT3idZRlhZ7QPXQhBCKbg8g98Pq3YhUnvPgA5?= =?us-ascii?Q?icEQnyCBwLna/Gb6hi8ulS97GWAvTkzBvklgGGC91MeKf+Zi1uz7rh+uULl/?= =?us-ascii?Q?areyj3kpl7vSQOJXWSneZ5/8aTv28gCxa93P6qzO3Ekfnw4V+N2s+ep75k/H?= =?us-ascii?Q?uZnNbA/TYBIeKrgyClVQaFE2Rj2/kf/INNopyT/EHbTtcXDnNa8ngZ/mqOA1?= =?us-ascii?Q?dnypJFx0rE6fyTlXOp9YftjiRTvCKDij7M7/5ycZJnO5p3PBlHTf6GN7yQNc?= =?us-ascii?Q?dceUwVmoTTQuu6pgZtk=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SI2P153MB0441.APCP153.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 627701b4-225e-4490-d431-08dbb38e98b8 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Sep 2023 12:48:43.1434 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SzTTIqYjjGkd+Iv0lKsDmAA8gdJRjKfNd2qsEIlUob6WZcifPQzCKvX6wLNZaZrrVbfNoWpWBmUZ53g55d2PLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAP153MB0456 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > From: Stephen Hemminger > Sent: Saturday, September 9, 2023 10:52 PM > > diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index > > 7630118d4f..a20ca1a988 100644 > > --- a/drivers/net/mana/mana.c > > +++ b/drivers/net/mana/mana.c > > @@ -1260,7 +1260,7 @@ mana_probe_port(struct ibv_device *ibdev, > struct ibv_device_attr_ex *dev_attr, > > /* Create a parent domain with the port number */ > > attr.pd =3D priv->ib_pd; > > attr.comp_mask =3D IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT; > > - attr.pd_context =3D (void *)(uint64_t)port; > > + attr.pd_context =3D (void *)(size_t)port; >=20 > Since port is uint8_t, the better cast would be to uintptr_t which is alw= ays an > unsigned value of same size as pointer. >=20 > Also, not sure why using PRIxPTR is necessary; on all arch and platforms = %p > should work for printing a pointer and is more common usage. Thanks Stephen. I will send out a v2 with port casting to uintptr_t. Regarding the use of PRIxPTR, I have seen this in couple other drivers. I think it is probably because the original variable is defined as uintptr_= t, which was typedef'ed to unsigned long. We probably want to differentiate it from an actual pointer. And I was trying to stick to original code. Wei