linux/drivers/net/ethernet
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
..
3com
8390 net: fill in MODULE_DESCRIPTION()s for 8390 2024-01-24 15:12:20 -08:00
actions
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net: ena: Take xdp packets stats into account in ena_get_stats64() 2024-01-03 18:00:58 -08:00
amd pds_core: Rework teardown/setup flow to be more common 2024-01-31 18:26:59 -08:00
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-26 13:46:28 -07:00
apple
aquantia net: atlantic: eliminate double free in error handling logic 2023-12-14 18:53:54 -08:00
arc
asix net: asix: fix fortify warning 2023-12-12 13:20:37 -08:00
atheros ethernet: atheros: fix a memleak in atl1e_setup_ring_resources 2023-12-15 10:55:35 +00:00
broadcom bnxt_en: Make PTP timestamp HWRM more silent 2024-01-26 14:06:21 -08:00
brocade net: Convert some ethtool_sprintf() to ethtool_puts() 2023-12-08 10:56:25 +00:00
cadence net: macb: Convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2023-11-18 14:52:57 +00:00
calxeda
cavium net: fill in MODULE_DESCRIPTION()s for liquidio 2024-01-24 15:12:20 -08:00
chelsio net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
cirrus net: fill in MODULE_DESCRIPTION()s for ep93xxx_eth 2024-01-24 15:12:20 -08:00
cisco net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
cortina net: ethernet: cortina: Drop TSO support 2024-01-07 16:05:00 +00:00
davicom
dec
dlink net: dl2k: Use proper conversion of dev_addr before IO to device 2023-12-12 11:25:36 +01:00
emulex net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
engleder tsnep: Fix XDP_RING_NEED_WAKEUP for empty fill ring 2024-01-25 11:59:42 +01:00
ezchip net: fill in MODULE_DESCRIPTION()s for nps_enet 2024-01-24 15:12:20 -08:00
faraday
freescale net: fec: fix the unhandled context fault from smmu 2024-01-25 11:22:27 +01:00
fujitsu
fungible net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
google gve: Fix skb truesize underestimation 2024-01-25 17:08:34 -08:00
hisilicon Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
huawei net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
i825xx
ibm mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
intel idpf: avoid compiler padding in virtchnl2_ptype struct 2024-02-01 09:10:41 -08:00
litex net: fill in MODULE_DESCRIPTION()s for litex 2024-01-24 15:12:21 -08:00
marvell octeontx2-pf: Remove xdp queues on program detach 2024-02-01 15:26:23 +01:00
mediatek net: ethernet: mtk_eth_soc: set DMA coherent mask to get PPE working 2024-01-25 17:20:12 -08:00
mellanox net/mlx5e: fix a potential double-free in fs_any_create_groups 2024-01-24 00:15:38 -08:00
micrel spi: Updates for v6.8 2024-01-09 15:02:12 -08:00
microchip net: lan966x: Fix port configuration when using SGMII interface 2024-01-27 10:02:01 +00:00
microsoft RDMA v6.8 merge window 2024-01-12 13:52:21 -08:00
moxa
mscc net: mscc: ocelot: fix pMAC TX RMON stats for bucket 256-511 and above 2023-12-14 17:58:10 -08:00
myricom
natsemi
neterion net: fill in MODULE_DESCRIPTION()s for s2io 2024-01-11 16:16:08 -08:00
netronome nfp: flower: fix hardware offload for the transfer layer port 2024-01-25 17:17:29 -08:00
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
qualcomm Including fixes from bpf and netfilter. 2024-01-18 17:33:50 -08:00
rdc
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
renesas net: ravb: Fix dma_addr_t truncation in error case 2024-01-14 16:41:51 +00:00
rocker
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
sgi
silan
sis
smsc sh updates for v6.7 2023-11-02 15:34:59 -10:00
socionext eth: link netdev to page_pools in drivers 2023-11-28 15:48:39 +01:00
stmicro net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings 2024-01-30 12:58:12 +01:00
sun
sunplus
synopsys
tehuti
ti net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames 2024-01-11 16:54:45 -08:00
toshiba Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
tundra
vertexcom
via
wangxun net: fill in MODULE_DESCRIPTION()s for wx_lib 2024-01-12 12:17:37 +00:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-11-23 12:20:58 -08:00
xircom
xscale net: xscale: Drop unused PHY number 2023-11-01 22:15:15 -07:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile