summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNorbert Ciosek <norbertx.ciosek@intel.com>2021-01-28 21:17:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-14 09:42:06 +0300
commitd4d4c6a4ca7c1b931c460e5b2678c2262cbc79ee (patch)
treef9c94b2869115aaf3fd7e1e85a55a5001f26bfde /include/linux
parent95d58bf5ed4324437ab02dfd0ba4143d0d1afd82 (diff)
downloadlinux-d4d4c6a4ca7c1b931c460e5b2678c2262cbc79ee.tar.xz
virtchnl: Fix layout of RSS structures
[ Upstream commit 22f8b5df881e9f1302514bbbbbb8649c2051de55 ] Remove padding from RSS structures. Previous layout could lead to unwanted compiler optimizations in loops when iterating over key and lut arrays. Fixes: 65ece6de0114 ("virtchnl: Add missing explicit padding to structures") Signed-off-by: Norbert Ciosek <norbertx.ciosek@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/avf/virtchnl.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 40bad71865ea..532bcbfc4716 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -476,7 +476,6 @@ struct virtchnl_rss_key {
u16 vsi_id;
u16 key_len;
u8 key[1]; /* RSS hash key, packed bytes */
- u8 pad[1];
};
VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
@@ -485,7 +484,6 @@ struct virtchnl_rss_lut {
u16 vsi_id;
u16 lut_entries;
u8 lut[1]; /* RSS lookup table */
- u8 pad[1];
};
VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);