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 F307542556 for ; Sat, 9 Sep 2023 16:52:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5CBC402D4; Sat, 9 Sep 2023 16:52:00 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 92E4A4029E for ; Sat, 9 Sep 2023 16:51:58 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-68fb71ded6dso6471b3a.0 for ; Sat, 09 Sep 2023 07:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1694271117; x=1694875917; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=FNiYYCXT5Qr6CHhf++G58mXa0uby1Pb9cL7cLw+IIWw=; b=RAEN5xme14pFGi1BkVS1yGeHldAflSqEPtmSkgss1q2UJRTSJBZQIdTgx9Sk1G6k/o ZOEkOEaX35+ka3xiu4chWLYUVI9hXbvril+QxkHzRpSNqTcKICZdUFxxSAQMzWeyRPcE FDfCxYqqpS5xVS3qkNmzujMt1PjcVt6pNdlS0mXIqJTplYHNuHuyZIw/Y0SG7tM5luWu fj4Tr+mh+eurTR/2aRiXFtsytbH41/gGtAHcHkMDoQYC/PV/l6k3awPVG3y4yAMtOauc ux4gTja7Xsz+wUP4BUx5aG9IJw6c2OejWlKjUTKj/QPMAtBVRwkvrJQz+OMr+OXIFPBg 6qkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694271117; x=1694875917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FNiYYCXT5Qr6CHhf++G58mXa0uby1Pb9cL7cLw+IIWw=; b=FMdhF5f8MkJiPVBplHllq9cJjKvbKrb02WffBvdZjLqn81cKHqyivOwka8eZeQSHpf y/inbX7ZMuEi0HkbwMAaxucE71upJByWQTrU470np8qstDMZlZg1+kQPCmDUumE4CUtS fGKC3uXnHqlBY9e37fYCxiZok0GGK+q3fcYq3n5j8x3xKxEd3f4GfEvSVXXXtZU1pX/v Mltz1FF8aw2lXy9stKcEIDqhjgoTCb0e51FWCysaNQT8JsBQpyr7YXcPaAhMDgyIm3kM t7frsFRb7XLivpRqtXn/Y+fRO9Z7sTTYgzIDKaA7D5e8/QC6j78LQL6+UhR0GKv3CmCx sb3w== X-Gm-Message-State: AOJu0YznSg0DeIVrzUSoEcmGWDdwSubuzbniy/5eryG7Ydmlvn2GLtgX p6qYoxQJmEA41gv3lbQ2NWczQg== X-Google-Smtp-Source: AGHT+IHAupvA2sEu8e3pyCADmuF2GNIBQ0YFV7YuN9apYQ2n9ZFCGgUQdYMBIedCp+8zDJHHF45X9w== X-Received: by 2002:a05:6a00:22c2:b0:68e:2c3a:8775 with SMTP id f2-20020a056a0022c200b0068e2c3a8775mr5755099pfj.33.1694271117500; Sat, 09 Sep 2023 07:51:57 -0700 (PDT) Received: from hermes.local (204-195-112-131.wavecable.com. [204.195.112.131]) by smtp.gmail.com with ESMTPSA id p15-20020aa7860f000000b00666e649ca46sm2875258pfn.101.2023.09.09.07.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Sep 2023 07:51:57 -0700 (PDT) Date: Sat, 9 Sep 2023 07:51:54 -0700 From: Stephen Hemminger To: Wei Hu Cc: dev@dpdk.org, Long Li , stable@dpdk.org Subject: Re: [PATCH 1/1] net/mana: enable 32 bit build for mana driver Message-ID: <20230909075154.038f6b35@hermes.local> In-Reply-To: <20230909121830.2043779-1-weh@microsoft.com> References: <20230909121830.2043779-1-weh@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sat, 9 Sep 2023 12:18:30 +0000 Wei Hu wrote: > 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 = priv->ib_pd; > attr.comp_mask = IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT; > - attr.pd_context = (void *)(uint64_t)port; > + attr.pd_context = (void *)(size_t)port; Since port is uint8_t, the better cast would be to uintptr_t which is always an unsigned value of same size as pointer. 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.