DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Gavin Hu <gavin.hu@arm.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
Date: Wed, 16 May 2018 12:15:43 +0530	[thread overview]
Message-ID: <20180516064542.GA6418@jerin> (raw)
In-Reply-To: <20180516060802.36181-3-gavin.hu@arm.com>

-----Original Message-----
> Date: Wed, 16 May 2018 14:08:02 +0800
> From: Gavin Hu <gavin.hu@arm.com>
> To: dev@dpdk.org
> CC: gavin hu <gavin.hu@arm.com>
> Subject: [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang
>  compiling issue
> X-Mailer: git-send-email 2.17.0
> 
> From: gavin hu <gavin.hu@arm.com>
> 
> The patch fixes the compile issue with clang on ARM64.

Even ARM64 gcc 8.1 could detect this as an error and this patch fixes
too.

> 
> Newly introduced #pragma pack(1) in the header file caused comipiling
> issues for the files who included it.
> 
> In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/
> ifpga_fme_dperf.c:5:
> In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/
> ifpga_feature_dev.h:8:
> ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
> the current #pragma
> pack alignment value is modified in the included file [-Werror,
> -Wpragma-pack]
> ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note:
> previous '#pragma pack' directive that modifies alignment is here.
> 
> The fix is to change the #pragma pack alignment locally and not have
> effect on other files who included this header file.
> 
> Fixes: 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")
> 
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

The subject could change to raw/ifpga: if Maintainer wishes to do so to
maintain the consistency.

> ---
>  drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_defines.h b/drivers/raw/ifpga_rawdev/base/ifpga_defines.h
> index 0b9622d5f..aa0252720 100644
> --- a/drivers/raw/ifpga_rawdev/base/ifpga_defines.h
> +++ b/drivers/raw/ifpga_rawdev/base/ifpga_defines.h
> @@ -97,7 +97,7 @@ enum port_feature_id {
>  /*
>   * All headers and structures must be byte-packed to match the spec.
>   */
> -#pragma pack(1)
> +#pragma pack(push, 1)
>  
>  struct feature_header {
>  	union {
> @@ -1659,4 +1659,5 @@ struct bts_header {
>  	(((bts_hdr)->guid_h == GBS_GUID_H) &&		\
>  	((bts_hdr)->guid_l == GBS_GUID_L))
>  
> +#pragma pack(pop)
>  #endif /* _BASE_IFPGA_DEFINES_H_ */
> -- 
> 2.17.0
> 

  reply	other threads:[~2018-05-16  6:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15  8:28 [dpdk-dev] [PATCH 0/4] *** fix native clang compiling errors on ARM64 *** Gavin Hu
2018-05-15  8:28 ` [dpdk-dev] [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib Gavin Hu
2018-05-15  9:00   ` Bruce Richardson
2018-05-15 10:10     ` Gavin Hu
2018-05-15  9:07   ` Jerin Jacob
2018-05-15  8:28 ` [dpdk-dev] [PATCH 2/4] Driver/Mellanox: fix PMD compiling issue Gavin Hu
2018-05-15  9:11   ` Jerin Jacob
2018-05-15  8:28 ` [dpdk-dev] [PATCH 3/4] cryptodev: fix the clang " Gavin Hu
2018-05-15  8:28 ` [dpdk-dev] [PATCH 4/4] ifpgai_rawdev: " Gavin Hu
2018-05-15  9:23 ` [dpdk-dev] [PATCH v2 1/4] app: add LDFLAGS -latomic to link atomic lib Gavin Hu
2018-05-15  9:23   ` [dpdk-dev] [PATCH v2 2/4] Driver/Mellanox: fix PMD compiling issue Gavin Hu
2018-05-15 17:05     ` Yongseok Koh
2018-05-15 17:52       ` Sirshak Das
2018-05-15 18:38         ` Yongseok Koh
2018-05-15  9:23   ` [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang " Gavin Hu
2018-05-15 11:41     ` Jerin Jacob
2018-05-15 13:34       ` De Lara Guarch, Pablo
2018-05-15  9:23   ` [dpdk-dev] [PATCH v2 4/4] ifpgai_rawdev: " Gavin Hu
2018-05-16  5:13     ` Jerin Jacob
2018-05-15 11:38   ` [dpdk-dev] [PATCH v2 1/4] app: add LDFLAGS -latomic to link atomic lib Jerin Jacob
2018-05-16  6:08 ` [dpdk-dev] [PATCH v3 1/3] net/mlx5: fix the clang compiling issue Gavin Hu
2018-05-16  6:08   ` [dpdk-dev] [PATCH v3 2/3] eventdev: " Gavin Hu
2018-05-16  6:08   ` [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: " Gavin Hu
2018-05-16  6:45     ` Jerin Jacob [this message]
2018-05-17  1:47       ` Gavin Hu
2018-05-20 22:28         ` Thomas Monjalon
2018-05-17  2:46 ` [dpdk-dev] [PATCH v4 1/3] net/mlx5: " Gavin Hu
2018-05-17  2:46   ` [dpdk-dev] [PATCH v4 2/3] eventdev: " Gavin Hu
2018-05-17  2:46   ` [dpdk-dev] [PATCH v4 3/3] raw/ifpga: " Gavin Hu
2018-05-20 23:02   ` [dpdk-dev] [PATCH v4 1/3] net/mlx5: " Thomas Monjalon

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=20180516064542.GA6418@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    /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).