[dpdk-dev] [PATCH] ether: mark ethernet addresses as being 2-byte aligned
Martins Eglitis
martins at sitilge.id.lv
Sun Feb 9 20:32:47 CET 2020
Hi,
Thank you for the help. I think it has something to do how the NFF-Go is
being built. Will address the question to NFF-Go devs.
Thank you,
Martins
On 2020-02-05 14:45, Bruce Richardson wrote:
> 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 at v0.9.1/internal/low/low.h:11,
>> from
>> ../../go/pkg/mod/github.com/intel-go/nff-go at 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
--
Best regards,
Martins Eglitis
More information about the dev
mailing list