linux-stable/drivers/net
Pavan Kumar Linga f0588b157f idpf: avoid compiler padding in virtchnl2_ptype struct
In the arm random config file, kconfig option 'CONFIG_AEABI' is
disabled which results in adding the compiler flag '-mabi=apcs-gnu'.
This causes the compiler to add padding in virtchnl2_ptype
structure to align it to 8 bytes, resulting in the following
size check failure:

include/linux/build_bug.h:78:41: error: static assertion failed: "(6) == sizeof(struct virtchnl2_ptype)"
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
      77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^~~~~~~~~~~~~~~
drivers/net/ethernet/intel/idpf/virtchnl2.h:26:9: note: in expansion of macro 'static_assert'
      26 |         static_assert((n) == sizeof(struct X))
         |         ^~~~~~~~~~~~~
drivers/net/ethernet/intel/idpf/virtchnl2.h:982:1: note: in expansion of macro 'VIRTCHNL2_CHECK_STRUCT_LEN'
     982 | VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~

Avoid the compiler padding by using "__packed" structure
attribute for the virtchnl2_ptype struct. Also align the
structure by using "__aligned(2)" for better code optimization.

Fixes: 0d7502a9b4 ("virtchnl: add virtchnl version 2 ops")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.com
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Tested-by: Krishneil Singh  <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240131222241.2087516-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-02-01 09:10:41 -08:00
..
arcnet
bonding
caif
can net: can: Use device_get_match_data() 2024-01-19 08:08:53 -06:00
dsa net: dsa: mv88e6xxx: Fix failed probe due to unsupported C45 reads 2024-01-31 15:57:07 -08:00
ethernet idpf: avoid compiler padding in virtchnl2_ptype struct 2024-02-01 09:10:41 -08:00
fddi
fjes fjes: fix memleaks in fjes_hw_setup 2024-01-24 18:03:53 -08:00
hamradio
hippi
hyperv hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove 2024-02-01 08:33:43 -08:00
ieee802154
ipa
ipvlan ipvlan: Remove usage of the deprecated ida_simple_xx() API 2024-01-07 22:32:48 +00:00
mctp
mdio net: mdio: mux-bcm-iproc: Use alignment helpers and SZ_4K 2024-01-03 16:40:59 -08:00
netdevsim net: netdevsim: don't try to destroy PHC on VFs 2024-01-17 10:56:44 +00:00
pcs
phy net: phy: mediatek-ge-soc: sync driver with MediaTek SDK 2024-01-25 17:34:57 -08:00
plip
ppp ppp: Fix spelling typo in comment in ppp_async_encode() 2024-01-02 16:26:09 -08:00
pse-pd
slip net: fill in MODULE_DESCRIPTION()s for SLIP 2024-01-11 16:16:08 -08:00
team
thunderbolt
usb USB / Thunderbolt changes for 6.8-rc1 2024-01-18 11:43:55 -08:00
vmxnet3
vxlan vxlan: mdb: Add MDB bulk deletion support 2023-12-20 11:27:21 +00:00
wan net: fill in MODULE_DESCRIPTION()s for ds26522 module 2024-01-11 16:16:08 -08:00
wireguard
wireless wireless fixes for v6.8-rc2 2024-01-23 08:38:13 -08:00
wwan
xen-netback xen-netback: properly sync TX responses 2024-02-01 08:29:36 -08:00
amt.c amt: do not use overwrapped cb area 2024-01-11 16:55:17 -08:00
bareudp.c
dummy.c
eql.c
geneve.c geneve: use DEV_STATS_INC() 2024-01-05 19:07:18 -08:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c Revert "net: macsec: use skb_ensure_writable_head_tail to expand the skb" 2024-01-23 17:17:04 -08:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
netkit.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
tun.c tun: add missing rx stats accounting in tun_xdp_act 2024-01-22 10:58:04 +00:00
veth.c
virtio_net.c virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings 2024-01-11 16:54:34 -08:00
vrf.c
vsockmon.c
xen-netfront.c