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 3E6E842555; 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 D17184029E; Sat, 9 Sep 2023 16:51:59 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 74BF040295 for ; Sat, 9 Sep 2023 16:51:58 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-68a41035828so2514362b3a.1 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=VKnsngWQ0Ii7Dtp4BLIa4o2F734xWprEuXSo2GznkCzd3rY/7XU0mkisb9xAhjczaS L024ThHCc09WSh4QV5q4iufV4pjTm8gKZBTg7rpGQG5w7+4a9NCCCL5l34rjEM18Vtrm SpuOk1d+FJVIVRPDATkh2KidW5P7efi1I7cQ7KhtnNdOPsrGbTa9zGADIihGbLbNSR/k 5ukDGu7lFu10AH+3ShOTajW4mrO7lZYYKwNGsEWp1DqPrG3Em5LTDcqGhbpPNMyFWfx3 HtHbtSrYNy738oTnHttsl4WFKubuSLIEVRWzHwNt/kDuCihWNc+xyVCh43Eik7e762cG vXaQ== X-Gm-Message-State: AOJu0Yypd1pSAzPK+ipTL7Gn0A+QVpmhQXXWOD0AOGZByeDVsbhun0xG xvz9vuHGhvNd4Yho6vc6hVpstA== 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: 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 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.