[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202211071154.4Kueku4l-lkp@intel.com>
Date: Mon, 7 Nov 2022 11:32:09 +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/3com/typhoon.h:169:2: warning: field within
'struct tx_desc' is less aligned than 'union tx_desc::(anonymous at
drivers/net/ethernet/3com/typhoon.h:169:2)' and is usually due to 'struct
tx_desc' being packed, which can lead to unalig...
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f0c4d9fc9cc9462659728d168387191387e903cc
commit: 250c1a694ff304e5d69e74ab32755eddcc2b8f65 ARM: pxa: convert to multiplatform
date: 6 months ago
config: arm-randconfig-r004-20221107
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 2bbafe04fe785a9469bea5a3737f8d7d3ce4aca2)
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 SHELL=/bin/bash drivers/net/ethernet/3com/ drivers/net/ethernet/sfc/
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/3com/typhoon.c:127:
>> drivers/net/ethernet/3com/typhoon.h:169:2: warning: field within 'struct tx_desc' is less aligned than 'union tx_desc::(anonymous at drivers/net/ethernet/3com/typhoon.h:169:2)' and is usually due to 'struct tx_desc' being packed, which can lead to unaligned accesses [-Wunaligned-access]
union {
^
1 warning generated.
--
>> drivers/net/ethernet/sfc/selftest.c:46:15: warning: field ip within 'struct efx_loopback_payload' is less aligned than 'struct iphdr' and is usually due to 'struct efx_loopback_payload' being packed, which can lead to unaligned accesses [-Wunaligned-access]
struct iphdr ip;
^
1 warning generated.
--
>> drivers/net/ethernet/sfc/falcon/selftest.c:43:15: warning: field ip within 'struct ef4_loopback_payload' is less aligned than 'struct iphdr' and is usually due to 'struct ef4_loopback_payload' being packed, which can lead to unaligned accesses [-Wunaligned-access]
struct iphdr ip;
^
1 warning generated.
vim +169 drivers/net/ethernet/3com/typhoon.h
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 129
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 130 /* The Typhoon transmit/fragment descriptor
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 131 *
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 132 * A packet is described by a packet descriptor, followed by option descriptors,
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 133 * if any, then one or more fragment descriptors.
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 134 *
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 135 * Packet descriptor:
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 136 * flags: Descriptor type
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 137 * len:i zero, or length of this packet
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 138 * addr*: 8 bytes of opaque data to the firmware -- for skb pointer
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 139 * processFlags: Determine offload tasks to perform on this packet.
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 140 *
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 141 * Fragment descriptor:
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 142 * flags: Descriptor type
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 143 * len:i length of this fragment
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 144 * addr: low bytes of DMA address for this part of the packet
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 145 * addrHi: hi bytes of DMA address for this part of the packet
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 146 * processFlags: must be zero
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 147 *
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 148 * TYPHOON_DESC_VALID is not mentioned in their docs, but their Linux
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 149 * driver uses it.
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 150 */
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 151 struct tx_desc {
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 152 u8 flags;
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 153 #define TYPHOON_TYPE_MASK 0x07
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 154 #define TYPHOON_FRAG_DESC 0x00
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 155 #define TYPHOON_TX_DESC 0x01
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 156 #define TYPHOON_CMD_DESC 0x02
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 157 #define TYPHOON_OPT_DESC 0x03
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 158 #define TYPHOON_RX_DESC 0x04
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 159 #define TYPHOON_RESP_DESC 0x05
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 160 #define TYPHOON_OPT_TYPE_MASK 0xf0
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 161 #define TYPHOON_OPT_IPSEC 0x00
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 162 #define TYPHOON_OPT_TCP_SEG 0x10
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 163 #define TYPHOON_CMD_RESPOND 0x40
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 164 #define TYPHOON_RESP_ERROR 0x40
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 165 #define TYPHOON_RX_ERROR 0x40
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 166 #define TYPHOON_DESC_VALID 0x80
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 167 u8 numDesc;
03a710ffcb0c4e drivers/net/typhoon.h Al Viro 2007-08-23 168 __le16 len;
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 @169 union {
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 170 struct {
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 171 __le32 addr;
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 172 __le32 addrHi;
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 173 } frag;
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 174 u64 tx_addr; /* opaque for hardware, for TX_DESC */
71f1bb1a8f17db drivers/net/typhoon.h Al Viro 2007-12-21 175 };
03a710ffcb0c4e drivers/net/typhoon.h Al Viro 2007-08-23 176 __le32 processFlags;
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 177 #define TYPHOON_TX_PF_NO_CRC cpu_to_le32(0x00000001)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 178 #define TYPHOON_TX_PF_IP_CHKSUM cpu_to_le32(0x00000002)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 179 #define TYPHOON_TX_PF_TCP_CHKSUM cpu_to_le32(0x00000004)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 180 #define TYPHOON_TX_PF_TCP_SEGMENT cpu_to_le32(0x00000008)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 181 #define TYPHOON_TX_PF_INSERT_VLAN cpu_to_le32(0x00000010)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 182 #define TYPHOON_TX_PF_IPSEC cpu_to_le32(0x00000020)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 183 #define TYPHOON_TX_PF_VLAN_PRIORITY cpu_to_le32(0x00000040)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 184 #define TYPHOON_TX_PF_UDP_CHKSUM cpu_to_le32(0x00000080)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 185 #define TYPHOON_TX_PF_PAD_FRAME cpu_to_le32(0x00000100)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 186 #define TYPHOON_TX_PF_RESERVED cpu_to_le32(0x00000e00)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 187 #define TYPHOON_TX_PF_VLAN_MASK cpu_to_le32(0x0ffff000)
649aa95d75cbad drivers/net/typhoon.h Harvey Harrison 2009-01-18 188 #define TYPHOON_TX_PF_INTERNAL cpu_to_le32(0xf0000000)
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 189 #define TYPHOON_TX_PF_VLAN_TAG_SHIFT 12
ba2d3587912f82 drivers/net/typhoon.h Eric Dumazet 2010-06-02 190 } __packed;
^1da177e4c3f41 drivers/net/typhoon.h Linus Torvalds 2005-04-16 191
:::::: The code at line 169 was first introduced by commit
:::::: 71f1bb1a8f17db3caba1237dfd478c2a13faf63e typhoon: trivial endianness annotations
:::::: TO: Al Viro <viro@....linux.org.uk>
:::::: CC: Jeff Garzik <jeff@...zik.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (172896 bytes)
Powered by blists - more mailing lists