[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212261603.fu5Shy4n-lkp@intel.com>
Date: Mon, 26 Dec 2022 16:09:45 +0800
From: kernel test robot <lkp@...el.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/aquantia/atlantic/aq_ring.h:67:2: warning:
field within 'struct aq_ring_buff_s' is less aligned than 'union
aq_ring_buff_s::(anonymous at
drivers/net/ethernet/aquantia/atlantic/aq_ring.h:67:2)' and is usually due
to 'struct aq_ring_b...
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b929c02afd37871d5afb9d498426f83432e71c2
commit: 250c1a694ff304e5d69e74ab32755eddcc2b8f65 ARM: pxa: convert to multiplatform
date: 8 months ago
config: arm-randconfig-r033-20221225
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project f5700e7b69048de958172fb513b336564e7f8709)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=250c1a694ff304e5d69e74ab32755eddcc2b8f65
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 250c1a694ff304e5d69e74ab32755eddcc2b8f65
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/net/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.c:14:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_ptp.h:15:
>> drivers/net/ethernet/aquantia/atlantic/aq_ring.h:67:2: warning: field within 'struct aq_ring_buff_s' is less aligned than 'union aq_ring_buff_s::(anonymous at drivers/net/ethernet/aquantia/atlantic/aq_ring.h:67:2)' and is usually due to 'struct aq_ring_buff_s' being packed, which can lead to unaligned accesses [-Wunaligned-access]
union {
^
1 warning generated.
--
In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c:12:
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_ring.h:67:2: warning: field within 'struct aq_ring_buff_s' is less aligned than 'union aq_ring_buff_s::(anonymous at drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_ring.h:67:2)' and is usually due to 'struct aq_ring_buff_s' being packed, which can lead to unaligned accesses [-Wunaligned-access]
union {
^
1 warning generated.
vim +67 drivers/net/ethernet/aquantia/atlantic/aq_ring.h
46f4c29d9de6e4 Igor Russkikh 2019-03-23 24
018423e90bee89 David VomLehn 2017-01-23 25 /* TxC SOP DX EOP
018423e90bee89 David VomLehn 2017-01-23 26 * +----------+----------+----------+-----------
018423e90bee89 David VomLehn 2017-01-23 27 * 8bytes|len l3,l4 | pa | pa | pa
018423e90bee89 David VomLehn 2017-01-23 28 * +----------+----------+----------+-----------
018423e90bee89 David VomLehn 2017-01-23 29 * 4/8bytes|len pkt |len pkt | | skb
018423e90bee89 David VomLehn 2017-01-23 30 * +----------+----------+----------+-----------
d3ed7c5cf79bb9 Igor Russkikh 2019-06-26 31 * 4/8bytes|is_gso |len,flags |len |len,is_eop
018423e90bee89 David VomLehn 2017-01-23 32 * +----------+----------+----------+-----------
018423e90bee89 David VomLehn 2017-01-23 33 *
018423e90bee89 David VomLehn 2017-01-23 34 * This aq_ring_buff_s doesn't have endianness dependency.
018423e90bee89 David VomLehn 2017-01-23 35 * It is __packed for cache line optimizations.
018423e90bee89 David VomLehn 2017-01-23 36 */
018423e90bee89 David VomLehn 2017-01-23 37 struct __packed aq_ring_buff_s {
018423e90bee89 David VomLehn 2017-01-23 38 union {
46f4c29d9de6e4 Igor Russkikh 2019-03-23 39 /* RX/TX */
46f4c29d9de6e4 Igor Russkikh 2019-03-23 40 dma_addr_t pa;
018423e90bee89 David VomLehn 2017-01-23 41 /* RX */
018423e90bee89 David VomLehn 2017-01-23 42 struct {
018423e90bee89 David VomLehn 2017-01-23 43 u32 rss_hash;
018423e90bee89 David VomLehn 2017-01-23 44 u16 next;
018423e90bee89 David VomLehn 2017-01-23 45 u8 is_hash_l4;
018423e90bee89 David VomLehn 2017-01-23 46 u8 rsvd1;
46f4c29d9de6e4 Igor Russkikh 2019-03-23 47 struct aq_rxpage rxdata;
d3ed7c5cf79bb9 Igor Russkikh 2019-06-26 48 u16 vlan_rx_tag;
018423e90bee89 David VomLehn 2017-01-23 49 };
018423e90bee89 David VomLehn 2017-01-23 50 /* EOP */
018423e90bee89 David VomLehn 2017-01-23 51 struct {
018423e90bee89 David VomLehn 2017-01-23 52 dma_addr_t pa_eop;
018423e90bee89 David VomLehn 2017-01-23 53 struct sk_buff *skb;
018423e90bee89 David VomLehn 2017-01-23 54 };
018423e90bee89 David VomLehn 2017-01-23 55 /* TxC */
018423e90bee89 David VomLehn 2017-01-23 56 struct {
018423e90bee89 David VomLehn 2017-01-23 57 u32 mss;
018423e90bee89 David VomLehn 2017-01-23 58 u8 len_l2;
018423e90bee89 David VomLehn 2017-01-23 59 u8 len_l3;
018423e90bee89 David VomLehn 2017-01-23 60 u8 len_l4;
386aff88e32ec3 Pavel Belous 2017-03-23 61 u8 is_ipv6:1;
386aff88e32ec3 Pavel Belous 2017-03-23 62 u8 rsvd2:7;
018423e90bee89 David VomLehn 2017-01-23 63 u32 len_pkt;
d3ed7c5cf79bb9 Igor Russkikh 2019-06-26 64 u16 vlan_tx_tag;
018423e90bee89 David VomLehn 2017-01-23 65 };
018423e90bee89 David VomLehn 2017-01-23 66 };
018423e90bee89 David VomLehn 2017-01-23 @67 union {
018423e90bee89 David VomLehn 2017-01-23 68 struct {
822cd114cd05a4 Igor Russkikh 2019-11-07 69 u32 len:16;
018423e90bee89 David VomLehn 2017-01-23 70 u32 is_ip_cso:1;
018423e90bee89 David VomLehn 2017-01-23 71 u32 is_udp_cso:1;
018423e90bee89 David VomLehn 2017-01-23 72 u32 is_tcp_cso:1;
018423e90bee89 David VomLehn 2017-01-23 73 u32 is_cso_err:1;
018423e90bee89 David VomLehn 2017-01-23 74 u32 is_sop:1;
018423e90bee89 David VomLehn 2017-01-23 75 u32 is_eop:1;
822cd114cd05a4 Igor Russkikh 2019-11-07 76 u32 is_gso_tcp:1;
822cd114cd05a4 Igor Russkikh 2019-11-07 77 u32 is_gso_udp:1;
018423e90bee89 David VomLehn 2017-01-23 78 u32 is_mapped:1;
018423e90bee89 David VomLehn 2017-01-23 79 u32 is_cleaned:1;
018423e90bee89 David VomLehn 2017-01-23 80 u32 is_error:1;
d3ed7c5cf79bb9 Igor Russkikh 2019-06-26 81 u32 is_vlan:1;
15beab0a9d797b Dmitry Bezrukov 2020-02-14 82 u32 is_lro:1;
15beab0a9d797b Dmitry Bezrukov 2020-02-14 83 u32 rsvd3:3;
c7545689244b50 Pavel Belous 2017-09-25 84 u16 eop_index;
c7545689244b50 Pavel Belous 2017-09-25 85 u16 rsvd4;
018423e90bee89 David VomLehn 2017-01-23 86 };
c7545689244b50 Pavel Belous 2017-09-25 87 u64 flags;
018423e90bee89 David VomLehn 2017-01-23 88 };
018423e90bee89 David VomLehn 2017-01-23 89 };
018423e90bee89 David VomLehn 2017-01-23 90
:::::: The code at line 67 was first introduced by commit
:::::: 018423e90bee8978105eaaa265a26e70637f9f1e net: ethernet: aquantia: Add ring support code
:::::: TO: David VomLehn <vomlehn@...as.net>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (211309 bytes)
Powered by blists - more mailing lists