mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Edward Cree <ecree.xilinx@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	Andy Moreton <andy.moreton@amd.com>,
	Simon Horman <simon.horman@corigine.com>
Subject: drivers/net/ethernet/sfc/falcon/selftest.c:45:16: warning: field ip within 'struct ef4_loopback_payload::(anonymous at drivers/net/ethernet/sfc/falcon/selftest.c:43:2)' is less aligned than 'struct iphdr' and is usually due to 'struct ef4_loopback_payload...
Date: Tue, 15 Aug 2023 20:30:23 +0800	[thread overview]
Message-ID: <202308152020.SxCOJiOI-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   91aa6c412d7f85e48aead7b00a7d9e91f5cf5863
commit: 55c1528f9b97ff3b7efad73e8f79627fc2efb298 sfc: fix field-spanning memcpy in selftest
date:   2 weeks ago
config: arm-randconfig-r011-20230815 (https://download.01.org/0day-ci/archive/20230815/202308152020.SxCOJiOI-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230815/202308152020.SxCOJiOI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308152020.SxCOJiOI-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/sfc/falcon/selftest.c:45:16: warning: field ip within 'struct ef4_loopback_payload::(anonymous at drivers/net/ethernet/sfc/falcon/selftest.c:43:2)' is less aligned than 'struct iphdr' and is usually due to 'struct ef4_loopback_payload::(anonymous at drivers/net/ethernet/sfc/falcon/selftest.c:43:2)' being packed, which can lead to unaligned accesses [-Wunaligned-access]
      45 |                 struct iphdr ip;
         |                              ^
>> drivers/net/ethernet/sfc/falcon/selftest.c:45:16: warning: field ip within 'struct ef4_loopback_payload::(unnamed at drivers/net/ethernet/sfc/falcon/selftest.c:43:2)' is less aligned than 'struct iphdr' and is usually due to 'struct ef4_loopback_payload::(unnamed at drivers/net/ethernet/sfc/falcon/selftest.c:43:2)' being packed, which can lead to unaligned accesses [-Wunaligned-access]
   2 warnings generated.


vim +45 drivers/net/ethernet/sfc/falcon/selftest.c

5a6681e22c1409 Edward Cree 2016-11-28  34  
5a6681e22c1409 Edward Cree 2016-11-28  35  /*
5a6681e22c1409 Edward Cree 2016-11-28  36   * Loopback test packet structure
5a6681e22c1409 Edward Cree 2016-11-28  37   *
5a6681e22c1409 Edward Cree 2016-11-28  38   * The self-test should stress every RSS vector, and unfortunately
5a6681e22c1409 Edward Cree 2016-11-28  39   * Falcon only performs RSS on TCP/UDP packets.
5a6681e22c1409 Edward Cree 2016-11-28  40   */
5a6681e22c1409 Edward Cree 2016-11-28  41  struct ef4_loopback_payload {
1186c6b31ee14f Edward Cree 2023-06-23  42  	char pad[2]; /* Ensures ip is 4-byte aligned */
55c1528f9b97ff Edward Cree 2023-07-28  43  	struct_group_attr(packet, __packed,
5a6681e22c1409 Edward Cree 2016-11-28  44  		struct ethhdr header;
5a6681e22c1409 Edward Cree 2016-11-28 @45  		struct iphdr ip;
5a6681e22c1409 Edward Cree 2016-11-28  46  		struct udphdr udp;
5a6681e22c1409 Edward Cree 2016-11-28  47  		__be16 iteration;
5a6681e22c1409 Edward Cree 2016-11-28  48  		char msg[64];
55c1528f9b97ff Edward Cree 2023-07-28  49  	);
1186c6b31ee14f Edward Cree 2023-06-23  50  } __packed __aligned(4);
55c1528f9b97ff Edward Cree 2023-07-28  51  #define EF4_LOOPBACK_PAYLOAD_LEN	\
55c1528f9b97ff Edward Cree 2023-07-28  52  		sizeof_field(struct ef4_loopback_payload, packet)
5a6681e22c1409 Edward Cree 2016-11-28  53  

:::::: The code at line 45 was first introduced by commit
:::::: 5a6681e22c1409089132085811857d6da828761b sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver

:::::: TO: Edward Cree <ecree@solarflare.com>
:::::: CC: David S. Miller <davem@davemloft.net>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-08-15 12:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202308152020.SxCOJiOI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy.moreton@amd.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=simon.horman@corigine.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

all inboxes | Powered by JetHome®