DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, thomas@monjalon.net,
	Bruce Richardson <bruce.richardson@intel.com>,
	Kevin Laatz <kevin.laatz@intel.com>,
	Chengwen Feng <fengchengwen@huawei.com>,
	Conor Walsh <conor.walsh@intel.com>
Subject: Re: [dpdk-dev] [PATCH] dma/idxd: fix build on Windows
Date: Sat, 23 Oct 2021 11:37:57 +0300	[thread overview]
Message-ID: <20211023113757.728b2e32@sovereign> (raw)
In-Reply-To: <20211023065558.818-1-david.marchand@redhat.com>

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


  reply	other threads:[~2021-10-23  8:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23  6:55 David Marchand
2021-10-23  8:37 ` Dmitry Kozlyuk [this message]
2021-10-23 10:20   ` David Marchand
2021-10-23 10:18 ` David Marchand
2021-10-25 20:00   ` Kevin Laatz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211023113757.728b2e32@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=conor.walsh@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=kevin.laatz@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).