numam-dpdk/drivers
Andy Green dd6f8d712e bus/dpaa: fix inconsistent struct alignment
The actual descriptor for qm_mr_entry is 64-byte aligned.

But the original code plays a trick, and puts a u8 common
to the three descriptor subtypes in the union afterwards
outside their structure definitions.

Unfortunately since they compose a struct qm_fd with
alignment 8, this trick destroys the ability of the compiler
to understand what has happened, resulting in this kind of
problem:

drivers/bus/dpaa/include/fsl_qman.h:354:3: error:
alignment 1 of ‘struct <anonymous>’ is less than 8 [-Werror=packed-not-aligned]
   } __packed dcern;

on gcc 8 / Fedora 28 out of the box.

This patch moves the u8 verb into the structure definitions
composed into the union, so the alignment of the parent struct
containing the alignment 8 object can also be seen to be
alignment 8 by the compiler.  Uses of .verb are fixed up to use
.ern.verb (the same offset of +0 inside all the structs in
the union).

The final struct layout should be unchanged.

Fixes: c47ff048b9 ("bus/dpaa: add QMAN driver core routines")
Fixes: f6fadc3e63 ("bus/dpaa: add QMAN interface driver")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-05-14 23:32:23 +02:00
..
baseband bbdev: change names of baseband devices 2018-05-10 17:46:20 +01:00
bus bus/dpaa: fix inconsistent struct alignment 2018-05-14 23:32:23 +02:00
common common/octeontx: move mbox to common folder 2018-04-04 23:14:52 +02:00
compress compress/isal: add ISA-L decomp functionality 2018-05-10 17:46:20 +01:00
crypto crypto/ccp: add meson build 2018-05-08 22:26:07 +02:00
event eventdev: add driver interface of crypto adapter 2018-05-10 14:07:37 +02:00
mempool mempool/dpaa2: add functions for CMDIF 2018-05-08 14:14:59 +02:00
net net/tap: add default name to tun 2018-05-14 22:32:23 +01:00
raw raw/ifpga/base: fix build with icc 2018-05-14 12:40:11 +02:00
Makefile compress/isal: add skeleton ISA-L compression PMD 2018-05-10 17:46:20 +01:00
meson.build compress/isal: add skeleton ISA-L compression PMD 2018-05-10 17:46:20 +01:00