From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 49707A04FA;
	Wed,  5 Feb 2020 14:45:34 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id C712B1C1C5;
	Wed,  5 Feb 2020 14:45:33 +0100 (CET)
Received: from mga18.intel.com (mga18.intel.com [134.134.136.126])
 by dpdk.org (Postfix) with ESMTP id 525AC1C1B7
 for <dev@dpdk.org>; Wed,  5 Feb 2020 14:45:31 +0100 (CET)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 05 Feb 2020 05:45:29 -0800
X-IronPort-AV: E=Sophos;i="5.70,405,1574150400"; d="scan'208";a="224656243"
Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.79])
 by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA;
 05 Feb 2020 05:45:28 -0800
Date: Wed, 5 Feb 2020 13:45:25 +0000
From: Bruce Richardson <bruce.richardson@intel.com>
To: Martins Eglitis <martins@sitilge.id.lv>
Cc: dev@dpdk.org
Message-ID: <20200205134525.GA687@bricha3-MOBL.ger.corp.intel.com>
References: <20190516155457.4006-1-bruce.richardson@intel.com>
 <1e5856a8-108b-1f0c-6ce7-b7c9eafac658@sitilge.id.lv>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <1e5856a8-108b-1f0c-6ce7-b7c9eafac658@sitilge.id.lv>
User-Agent: Mutt/1.12.1 (2019-06-15)
Subject: Re: [dpdk-dev] [PATCH] ether: mark ethernet addresses as being
 2-byte aligned
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Wed, Feb 05, 2020 at 01:21:54AM +0100, Martins Eglitis wrote:
> Dear Bruce and Kevin,
> 
> I tried building an application (NFF-GO) which has DPDK as a dependency.
> I am still getting the same warnings you and Kevin were discussing. My
> current DPDK version is 19.11-1.
> 
> Do you know if this issue has been resolved?
> 
> This is the output:
> 
> # github.com/intel-go/nff-go/internal/low
> In file included from
> /home/zebra/Projects/nff-go/dpdk/dpdk/x86_64-native-linuxapp-gcc-install/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:160,
>                  from
> ../../go/pkg/mod/github.com/intel-go/nff-go@v0.9.1/internal/low/low.h:11,
>                  from
> ../../go/pkg/mod/github.com/intel-go/nff-go@v0.9.1/internal/low/low.go:16:
> /home/zebra/Projects/nff-go/dpdk/dpdk/x86_64-native-linuxapp-gcc-install/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/include/rte_ether.h:
> In function ‘rte_is_same_ether_addr’:
> /home/zebra/Projects/nff-go/dpdk/dpdk/x86_64-native-linuxapp-gcc-install/usr/local/share/dpdk/x86_64-native-linuxapp-gcc/include/rte_ether.h:84:2:
> warning: converting a packed ‘const struct rte_ether_addr’ pointer
> (alignment 1) to a ‘unaligned_uint16_t’ {aka ‘const short unsigned int’}
> pointer (alignment 2) may result in an unaligned pointer value
> [-Waddress-of-packed-member]
>    84 |  const unaligned_uint16_t *w1 = (const uint16_t *)ea1;
>       |  ^~~~~
<snip>
> 

Hi,

looking at the code in DPDK for 19.11, rte_ether.h no longer has the
unaligned_uint16_t type in rte_ether.h. For example, line 84 of rte_ether.h
should read as below:

 81 static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,
 82                                      const struct rte_ether_addr *ea2)
 83 {
 84         const uint16_t *w1 = (const uint16_t *)ea1;
 85         const uint16_t *w2 = (const uint16_t *)ea2;
 86

Have you got mixed header files from two different DPDK releases?

/Bruce