DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build
@ 2020-10-05 17:02 Ferruh Yigit
  2020-10-06  7:47 ` Thomas Monjalon
  2020-10-06  7:47 ` David Marchand
  0 siblings, 2 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-10-05 17:02 UTC (permalink / raw)
  To: David Hunt, Lee Daly, Marcin Hajkowski; +Cc: dev, stable, David Marchand

Compiler version:
gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"

Build error:
../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:346:23:
 warning: format ‘%ld’ expects argument of type ‘long int’, but
	argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’}
	[-Wformat=]
  346 |    cmdline_printf(cl, "Capabilities of [%d] vcore are:"
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
  349 |      pkt_caps_list.turbo[i],
      |      ~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         uint64_t {aka long long unsigned int}

Fixes: 07525d1a047a ("examples/vm_power: send capabilities request from guest")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: David Marchand <david.marchand@redhat.com>
Cc: David Hunt <david.hunt@intel.com>

Fixed patch is not new, not sure why getting the error now but was not
getting it before, do you have any clue?
Or is the CI having this error?
---
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 96c1a1ff69..58029f8fb9 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -344,13 +344,13 @@ cmd_query_caps_list_parsed(void *parsed_result,
 		unsigned int i;
 		for (i = 0; i < pkt_caps_list.num_vcpu; ++i)
 			cmdline_printf(cl, "Capabilities of [%d] vcore are:"
-					" turbo possibility: %ld, is priority core: %ld.\n",
+					" turbo possibility: %"PRId64", is priority core: %"PRId64".\n",
 					i,
 					pkt_caps_list.turbo[i],
 					pkt_caps_list.priority[i]);
 	} else {
 		cmdline_printf(cl, "Capabilities of [%d] vcore are:"
-				" turbo possibility: %ld, is priority core: %ld.\n",
+				" turbo possibility: %"PRId64", is priority core: %"PRId64".\n",
 				lcore_id,
 				pkt_caps_list.turbo[lcore_id],
 				pkt_caps_list.priority[lcore_id]);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build
  2020-10-05 17:02 [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build Ferruh Yigit
@ 2020-10-06  7:47 ` Thomas Monjalon
  2020-10-06  7:47 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-10-06  7:47 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: David Hunt, Lee Daly, Marcin Hajkowski, dev, stable, David Marchand

05/10/2020 19:02, Ferruh Yigit:
> Compiler version:
> gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"
> 
> Build error:
> ../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:346:23:
>  warning: format ‘%ld’ expects argument of type ‘long int’, but
> 	argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’}
> 	[-Wformat=]
>   346 |    cmdline_printf(cl, "Capabilities of [%d] vcore are:"
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ......
>   349 |      pkt_caps_list.turbo[i],
>       |      ~~~~~~~~~~~~~~~~~~~~~~
>       |                         |
>       |                         uint64_t {aka long long unsigned int}
> 
> Fixes: 07525d1a047a ("examples/vm_power: send capabilities request from guest")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: David Marchand <david.marchand@redhat.com>
> Cc: David Hunt <david.hunt@intel.com>
> 
> Fixed patch is not new, not sure why getting the error now but was not
> getting it before, do you have any clue?
> Or is the CI having this error?

Probably because we don't test this example in 32-bit env.
Note: it requires 32-bit libvirt.

Applied with spaces around PRId64, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build
  2020-10-05 17:02 [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build Ferruh Yigit
  2020-10-06  7:47 ` Thomas Monjalon
@ 2020-10-06  7:47 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2020-10-06  7:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Hunt, Lee Daly, Marcin Hajkowski, dev, dpdk stable

On Mon, Oct 5, 2020 at 8:57 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> Compiler version:
> gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"
>
> Build error:
> ../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:346:23:
>  warning: format ‘%ld’ expects argument of type ‘long int’, but
>         argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’}
>         [-Wformat=]
>   346 |    cmdline_printf(cl, "Capabilities of [%d] vcore are:"
>       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ......
>   349 |      pkt_caps_list.turbo[i],
>       |      ~~~~~~~~~~~~~~~~~~~~~~
>       |                         |
>       |                         uint64_t {aka long long unsigned int}
>
> Fixes: 07525d1a047a ("examples/vm_power: send capabilities request from guest")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: David Marchand <david.marchand@redhat.com>
> Cc: David Hunt <david.hunt@intel.com>
>
> Fixed patch is not new, not sure why getting the error now but was not
> getting it before, do you have any clue?
> Or is the CI having this error?

Personally, I do not have a libvirt for 32 bits on my build system.

In Intel CI, I can see a 32 bits job, but I guess there is no libvirt
for i386 available in it.
http://mails.dpdk.org/archives/test-report/2020-October/156516.html

The UNH lab has no 32 bits job.

In Travis, we have a "static" cross compilation job.
But static jobs only build l2fwd and l3fwd examples.

We could switch this job to shared to get all examples built, but we
would still need the libvirt devel headers + libs for i386 to get this
specific example to get built (I tried, but did not find the right
magic to install a i386 package).

We can at least add libvirt-devel for 64 bits in Travis.


> ---
>  examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
> index 96c1a1ff69..58029f8fb9 100644
> --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
> +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
> @@ -344,13 +344,13 @@ cmd_query_caps_list_parsed(void *parsed_result,
>                 unsigned int i;
>                 for (i = 0; i < pkt_caps_list.num_vcpu; ++i)
>                         cmdline_printf(cl, "Capabilities of [%d] vcore are:"
> -                                       " turbo possibility: %ld, is priority core: %ld.\n",
> +                                       " turbo possibility: %"PRId64", is priority core: %"PRId64".\n",
>                                         i,
>                                         pkt_caps_list.turbo[i],
>                                         pkt_caps_list.priority[i]);
>         } else {
>                 cmdline_printf(cl, "Capabilities of [%d] vcore are:"
> -                               " turbo possibility: %ld, is priority core: %ld.\n",
> +                               " turbo possibility: %"PRId64", is priority core: %"PRId64".\n",
>                                 lcore_id,
>                                 pkt_caps_list.turbo[lcore_id],
>                                 pkt_caps_list.priority[lcore_id]);
> --
> 2.26.2
>

Installed a libvirt-devel for i686 on a fc32, reproduced and tested the fix.
Tested-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-06  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 17:02 [dpdk-dev] [PATCH] examples/vm_power: fix 32-bit build Ferruh Yigit
2020-10-06  7:47 ` Thomas Monjalon
2020-10-06  7:47 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).