From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 53D93A0A02;
	Thu, 14 Jan 2021 19:48:49 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 7BC70140D09;
	Thu, 14 Jan 2021 19:48:48 +0100 (CET)
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com
 [148.163.156.1])
 by mails.dpdk.org (Postfix) with ESMTP id B0B21140DE3
 for <dev@dpdk.org>; Thu, 14 Jan 2021 19:48:46 +0100 (CET)
Received: from pps.filterd (m0187473.ppops.net [127.0.0.1])
 by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id
 10EIXMIF010184 for <dev@dpdk.org>; Thu, 14 Jan 2021 13:48:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com;
 h=subject : to :
 references : from : message-id : date : mime-version : in-reply-to :
 content-type : content-transfer-encoding; s=pp1;
 bh=3vnr1Bpds9ppkc9yOT2spAu4HbWPhjfIMePQAHiObkU=;
 b=mqgU30jrcT/zl6095NNufcxPy+q62LIqi9B7nyx/Ae3hVfCj3fQQd8LLNYsSsTI2U/X8
 z8lNkaPVczJ2+n3mtpmhb3S8PM3kCdmXYAbYklhXRlTKQCEF4Q/ApH6kULcl4j1f1NQf
 ENmv7PWHVzOfG0hEUeifrDHdDFvJ60Wat1lbT3/tkWfvxVaqhrxAPk+iaefB7s1XSYa5
 Fo1PXpmKCWYFAhMjMeAntah0LqHxBXx+awNhM1vLum6f/bj0JrAE+kCFq5kv7jLYajR4
 lUwZOecDzgYvQ0B0njzXGZJsL3HuhVwlJz2fPB8KOpa2kf+tdzfxzWHjMOciX4L+jan1 Zw== 
Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com
 [169.55.91.170])
 by mx0a-001b2d01.pphosted.com with ESMTP id 362u590mm1-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <dev@dpdk.org>; Thu, 14 Jan 2021 13:48:45 -0500
Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1])
 by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10EIZwVd027576
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:42 GMT
Received: from b03cxnp07029.gho.boulder.ibm.com
 (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16])
 by ppma02wdc.us.ibm.com with ESMTP id 35y449f7nm-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:42 +0000
Received: from b03ledav003.gho.boulder.ibm.com
 (b03ledav003.gho.boulder.ibm.com [9.17.130.234])
 by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id
 10EImgwP23134638
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:42 GMT
Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1])
 by IMSVA (Postfix) with ESMTP id F0F466A04F
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:41 +0000 (GMT)
Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1])
 by IMSVA (Postfix) with ESMTP id CD4EA6A04D
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:41 +0000 (GMT)
Received: from Davids-MBP.randomparity.org (unknown [9.163.92.50])
 by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP
 for <dev@dpdk.org>; Thu, 14 Jan 2021 18:48:41 +0000 (GMT)
To: dev@dpdk.org
References: <20201218073851.93609-1-chenbo.xia@intel.com>
 <20210114061411.39166-1-chenbo.xia@intel.com>
 <20210114061411.39166-4-chenbo.xia@intel.com>
From: David Christensen <drc@linux.vnet.ibm.com>
Message-ID: <8704b148-8010-88cf-55c0-b0cd600dccd0@linux.vnet.ibm.com>
Date: Thu, 14 Jan 2021 10:48:41 -0800
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0)
 Gecko/20100101 Thunderbird/78.6.1
MIME-Version: 1.0
In-Reply-To: <20210114061411.39166-4-chenbo.xia@intel.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737
 definitions=2021-01-14_07:2021-01-14,
 2021-01-14 signatures=0
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
 mlxscore=0 bulkscore=0
 adultscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0
 suspectscore=0 phishscore=0 mlxlogscore=781 clxscore=1015
 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2101140107
Subject: Re: [dpdk-dev] [PATCH v2 3/9] vfio_user: implement device and
 region related APIs
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



On 1/13/21 10:14 PM, Chenbo Xia wrote:
> This patch introduces device and region related APIs, which are
> rte_vfio_user_set_dev_info() and rte_vfio_user_set_reg_info().
> The corresponding vfio-user command handling is also added with
> the definition of all vfio-user command identity.

Receiving a build warning on RHEL 8.3 (gcc 8.3.1) for POWER with this patch:

In file included from ../lib/librte_vfio_user/vfio_user_server.h:10,
                  from ../lib/librte_vfio_user/vfio_user_server.c:12:
../lib/librte_vfio_user/vfio_user_server.c: In function 
‘vfio_user_device_get_reg_info’:
../lib/librte_vfio_user/vfio_user_base.h:24:2: warning: format ‘%llx’ 
expects argument of type ‘long long unsigned int’, but argument 7 has 
type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   "VFIO_USER: " fmt, ## args)
   ^~~~~~~~~~~~~
../lib/librte_vfio_user/vfio_user_server.c:92:2: note: in expansion of 
macro ‘VFIO_USER_LOG’
   VFIO_USER_LOG(DEBUG, "Region(%u) info: addr(0x%" PRIx64 "), fd(%d), "
   ^~~~~~~~~~~~~
../lib/librte_vfio_user/vfio_user_server.c:93:12: note: format string is 
defined here
    "sz(0x%llx), argsz(0x%x), c_off(0x%x), flags(0x%x) "
          ~~~^
          %lx
In file included from ../lib/librte_vfio_user/vfio_user_server.h:10,
                  from ../lib/librte_vfio_user/vfio_user_server.c:12:
../lib/librte_vfio_user/vfio_user_base.h:24:2: warning: format ‘%llx’ 
expects argument of type ‘long long unsigned int’, but argument 11 has 
type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   "VFIO_USER: " fmt, ## args)
   ^~~~~~~~~~~~~
../lib/librte_vfio_user/vfio_user_server.c:92:2: note: in expansion of 
macro ‘VFIO_USER_LOG’
   VFIO_USER_LOG(DEBUG, "Region(%u) info: addr(0x%" PRIx64 "), fd(%d), "
   ^~~~~~~~~~~~~
../lib/librte_vfio_user/vfio_user_server.c:94:13: note: format string is 
defined here
    "off(0x%llx)\n", vinfo->index, (uint64_t)reg_info->base,
           ~~~^
           %lx

Dave