All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Habets <habetsm.xilinx@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: drivers/net/ethernet/sfc/siena/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
Date: Wed, 7 Dec 2022 09:09:55 +0000	[thread overview]
Message-ID: <Y5BYY71+ifu3D45z@gmail.com> (raw)
In-Reply-To: <202212050514.lAJ4GhwN-lkp@intel.com>

On Mon, Dec 05, 2022 at 06:09:17AM +0800, kernel test robot wrote:
> Hi Martin,
> 
> FYI, the error/warning still remains.

We are looking into this, it will take a bit of a rewrite for fix
the warning. We have not had reports of an actual unaligned accesses
happening.

Martin

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   c2bf05db6c78f53ca5cd4b48f3b9b71f78d215f1
> commit: c5a13c319e10e795850b61bc7e3447b08024be2e sfc: Add a basic Siena module
> date:   7 months ago
> config: arm-randconfig-r012-20221205
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 6e4cea55f0d1104408b26ac574566a0e4de48036)
> 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=c5a13c319e10e795850b61bc7e3447b08024be2e
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout c5a13c319e10e795850b61bc7e3447b08024be2e
>         # 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/sfc/siena/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/ethernet/sfc/siena/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.
> 
> 
> vim +46 drivers/net/ethernet/sfc/siena/selftest.c
> 
> d48523cb88e0703 Martin Habets 2022-05-09  37  
> d48523cb88e0703 Martin Habets 2022-05-09  38  /*
> d48523cb88e0703 Martin Habets 2022-05-09  39   * Loopback test packet structure
> d48523cb88e0703 Martin Habets 2022-05-09  40   *
> d48523cb88e0703 Martin Habets 2022-05-09  41   * The self-test should stress every RSS vector, and unfortunately
> d48523cb88e0703 Martin Habets 2022-05-09  42   * Falcon only performs RSS on TCP/UDP packets.
> d48523cb88e0703 Martin Habets 2022-05-09  43   */
> d48523cb88e0703 Martin Habets 2022-05-09  44  struct efx_loopback_payload {
> d48523cb88e0703 Martin Habets 2022-05-09  45  	struct ethhdr header;
> d48523cb88e0703 Martin Habets 2022-05-09 @46  	struct iphdr ip;
> d48523cb88e0703 Martin Habets 2022-05-09  47  	struct udphdr udp;
> d48523cb88e0703 Martin Habets 2022-05-09  48  	__be16 iteration;
> d48523cb88e0703 Martin Habets 2022-05-09  49  	char msg[64];
> d48523cb88e0703 Martin Habets 2022-05-09  50  } __packed;
> d48523cb88e0703 Martin Habets 2022-05-09  51  
> 
> :::::: The code at line 46 was first introduced by commit
> :::::: d48523cb88e0703055c1b33e61eb644a7976f92b sfc: Copy shared files needed for Siena (part 2)
> 
> :::::: TO: Martin Habets <martinh@xilinx.com>
> :::::: CC: Jakub Kicinski <kuba@kernel.org>
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://01.org/lkp

  reply	other threads:[~2022-12-07  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 22:09 drivers/net/ethernet/sfc/siena/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 kernel test robot
2022-12-07  9:09 ` Martin Habets [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-26 20:41 kernel test robot
2022-07-06 15:39 kernel test robot
2022-07-06 15:29 kernel test robot

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=Y5BYY71+ifu3D45z@gmail.com \
    --to=habetsm.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.