DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
@ 2021-10-23  6:55 David Marchand
  2021-10-23  8:37 ` Dmitry Kozlyuk
  2021-10-23 10:18 ` David Marchand
  0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2021-10-23  6:55 UTC (permalink / raw)
  To: dev; +Cc: thomas, Bruce Richardson, Kevin Laatz, Chengwen Feng, Conor Walsh

Windows compilation gives us a splat:
In file included from ../drivers/dma/idxd/idxd_pci.c:10:
In file included from ..\drivers\dma\idxd/idxd_internal.h:11:
..\drivers\dma\idxd/idxd_hw_defs.h:46:21: error: expected member name or
 ';' after declaration specifiers
        uint16_t __reserved[13];
        ~~~~~~~~           ^
1 error generated.

Ironically, __reserved is probably a reserved token.
Some drivers that build fine on Windows have structs with a "reserved"
field, let's go with this.

Fixes: 82147042d062 ("dma/idxd: add datapath structures")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/dma/idxd/idxd_hw_defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/idxd_hw_defs.h b/drivers/dma/idxd/idxd_hw_defs.h
index 55ca9f7f52..2a219c1312 100644
--- a/drivers/dma/idxd/idxd_hw_defs.h
+++ b/drivers/dma/idxd/idxd_hw_defs.h
@@ -43,7 +43,7 @@ struct idxd_hw_desc {
 	uint16_t intr_handle; /* completion interrupt handle */
 
 	/* remaining 26 bytes are reserved */
-	uint16_t __reserved[13];
+	uint16_t reserved[13];
 } __rte_aligned(64);
 
 #define IDXD_COMP_STATUS_INCOMPLETE        0
-- 
2.23.0


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

* Re: [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
  2021-10-23  6:55 [dpdk-dev] [PATCH] dma/idxd: fix build on Windows David Marchand
@ 2021-10-23  8:37 ` Dmitry Kozlyuk
  2021-10-23 10:20   ` David Marchand
  2021-10-23 10:18 ` David Marchand
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Kozlyuk @ 2021-10-23  8:37 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, thomas, Bruce Richardson, Kevin Laatz, Chengwen Feng, Conor Walsh

2021-10-23 08:55 (UTC+0200), David Marchand:
> Windows compilation gives us a splat:
> In file included from ../drivers/dma/idxd/idxd_pci.c:10:
> In file included from ..\drivers\dma\idxd/idxd_internal.h:11:
> ..\drivers\dma\idxd/idxd_hw_defs.h:46:21: error: expected member name or
>  ';' after declaration specifiers
>         uint16_t __reserved[13];
>         ~~~~~~~~           ^
> 1 error generated.
> 
> Ironically, __reserved is probably a reserved token.

Yes, and it's used in system headers for static analyzer annotations:
https://docs.microsoft.com/en-us/windows/win32/winprog/header-annotations#advanced-annotations

> Some drivers that build fine on Windows have structs with a "reserved"
> field, let's go with this.
> 
> Fixes: 82147042d062 ("dma/idxd: add datapath structures")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/dma/idxd/idxd_hw_defs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/idxd/idxd_hw_defs.h b/drivers/dma/idxd/idxd_hw_defs.h
> index 55ca9f7f52..2a219c1312 100644
> --- a/drivers/dma/idxd/idxd_hw_defs.h
> +++ b/drivers/dma/idxd/idxd_hw_defs.h
> @@ -43,7 +43,7 @@ struct idxd_hw_desc {
>  	uint16_t intr_handle; /* completion interrupt handle */
>  
>  	/* remaining 26 bytes are reserved */
> -	uint16_t __reserved[13];
> +	uint16_t reserved[13];
>  } __rte_aligned(64);
>  
>  #define IDXD_COMP_STATUS_INCOMPLETE        0


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

* Re: [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
  2021-10-23  6:55 [dpdk-dev] [PATCH] dma/idxd: fix build on Windows David Marchand
  2021-10-23  8:37 ` Dmitry Kozlyuk
@ 2021-10-23 10:18 ` David Marchand
  2021-10-25 20:00   ` Kevin Laatz
  1 sibling, 1 reply; 5+ messages in thread
From: David Marchand @ 2021-10-23 10:18 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Bruce Richardson, Kevin Laatz, Chengwen Feng,
	Conor Walsh

On Sat, Oct 23, 2021 at 8:56 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> Windows compilation gives us a splat:
> In file included from ../drivers/dma/idxd/idxd_pci.c:10:
> In file included from ..\drivers\dma\idxd/idxd_internal.h:11:
> ..\drivers\dma\idxd/idxd_hw_defs.h:46:21: error: expected member name or
>  ';' after declaration specifiers
>         uint16_t __reserved[13];
>         ~~~~~~~~           ^
> 1 error generated.
>
> Ironically, __reserved is probably a reserved token.
> Some drivers that build fine on Windows have structs with a "reserved"
> field, let's go with this.
>
> Fixes: 82147042d062 ("dma/idxd: add datapath structures")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Tested via CI@UNH.

Applied.


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
  2021-10-23  8:37 ` Dmitry Kozlyuk
@ 2021-10-23 10:20   ` David Marchand
  0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2021-10-23 10:20 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, Thomas Monjalon, Bruce Richardson, Kevin Laatz,
	Chengwen Feng, Conor Walsh

On Sat, Oct 23, 2021 at 10:38 AM Dmitry Kozlyuk
<dmitry.kozliuk@gmail.com> wrote:
>
> 2021-10-23 08:55 (UTC+0200), David Marchand:
> > Windows compilation gives us a splat:
> > In file included from ../drivers/dma/idxd/idxd_pci.c:10:
> > In file included from ..\drivers\dma\idxd/idxd_internal.h:11:
> > ..\drivers\dma\idxd/idxd_hw_defs.h:46:21: error: expected member name or
> >  ';' after declaration specifiers
> >         uint16_t __reserved[13];
> >         ~~~~~~~~           ^
> > 1 error generated.
> >
> > Ironically, __reserved is probably a reserved token.
>
> Yes, and it's used in system headers for static analyzer annotations:
> https://docs.microsoft.com/en-us/windows/win32/winprog/header-annotations#advanced-annotations

Thanks for confirming.


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
  2021-10-23 10:18 ` David Marchand
@ 2021-10-25 20:00   ` Kevin Laatz
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Laatz @ 2021-10-25 20:00 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: Thomas Monjalon, Bruce Richardson, Chengwen Feng, Conor Walsh

On 23/10/2021 11:18, David Marchand wrote:
> On Sat, Oct 23, 2021 at 8:56 AM David Marchand
> <david.marchand@redhat.com> wrote:
>> Windows compilation gives us a splat:
>> In file included from ../drivers/dma/idxd/idxd_pci.c:10:
>> In file included from ..\drivers\dma\idxd/idxd_internal.h:11:
>> ..\drivers\dma\idxd/idxd_hw_defs.h:46:21: error: expected member name or
>>   ';' after declaration specifiers
>>          uint16_t __reserved[13];
>>          ~~~~~~~~           ^
>> 1 error generated.
>>
>> Ironically, __reserved is probably a reserved token.
>> Some drivers that build fine on Windows have structs with a "reserved"
>> field, let's go with this.
>>
>> Fixes: 82147042d062 ("dma/idxd: add datapath structures")
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Tested via CI@UNH.
>
> Applied.


Thanks for investigating and sending the fix for this, David.

/Kevin


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

end of thread, other threads:[~2021-10-25 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-23  6:55 [dpdk-dev] [PATCH] dma/idxd: fix build on Windows David Marchand
2021-10-23  8:37 ` Dmitry Kozlyuk
2021-10-23 10:20   ` David Marchand
2021-10-23 10:18 ` David Marchand
2021-10-25 20:00   ` Kevin Laatz

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).