mbuf: align layout in Windows
authorTal Shnaiderman <talshn@mellanox.com>
Tue, 19 May 2020 18:41:11 +0000 (21:41 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 11 Jun 2020 14:26:33 +0000 (16:26 +0200)
commit4887a7e23484ed7fbba3af1d3d2bd2a2bf347993
treef673e75962f3b2a907ee86fa3a3dd27fe353d409
parentd6eb247371216315bfc8e7b088bc38f67462bd48
mbuf: align layout in Windows

Using uint32_t type bit-fields in Windows will pads the
'L2/L3/L4 and tunnel information' union with additional bits.

This padding causes rte_mbuf size misalignment and the total size
increases to 3 cache-lines.

Changed packet_type bit-fields types from uint32_t to uint8_t
to allow unified 2 cache-line structure size.

Added the __extension__ attribute over the modified struct to avoid
the warning:

type of bit-field ... is a GCC extension [-pedantic]

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
Tested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf_core.h