fm10k/base: fix TLV structures alignment
authorXiao Wang <xiao.w.wang@intel.com>
Fri, 19 Feb 2016 11:07:02 +0000 (19:07 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 17:51:44 +0000 (18:51 +0100)
commitfbdd4dff3660de875ece3cd28fe1211967d00bb1
treef2c313eb7dda2bb684bd3211908d7ba2a0cd0141
parentb0dca40304ae0262722400b11eb15e961b06ac82
fm10k/base: fix TLV structures alignment

Per comments from an upstream kernel patch, and looking at how TLV
LE_STRUCT code works, we actually want these structures to be 4byte
aligned, not 1byte aligned.

In practice, 1byte alignment has worked so far because all our
structures end up being a multiple of 4. But if a future TLV
structure were added that had a u8 or similar sticking on the end things
would break. Fix this by using 4byte alignment which will prevent the
TLV LE_STRUCT code from breaking. Update the comment explaining that we
need 4byte alignment of our structures.

Fixes: 925c862cbc21 ("fm10k/base: pack TLV overlay structures")

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Tested-by: Heng Ding <hengx.ding@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
drivers/net/fm10k/base/fm10k_pf.h