[dpdk-dev] [PATCH v2 3/9] vfio_user: implement device and region related APIs

Xia, Chenbo chenbo.xia at intel.com
Tue Jan 19 04:22:24 CET 2021


Hi David,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of David Christensen
> Sent: Friday, January 15, 2021 2:49 AM
> To: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 3/9] vfio_user: implement device and region
> related APIs
> 
> 
> 
> 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

Thanks! Will fix it new version.

Chenbo
> 
> Dave


More information about the dev mailing list