提交 22f8b5df 编写于 作者: N Norbert Ciosek 提交者: Tony Nguyen

virtchnl: Fix layout of RSS structures

Remove padding from RSS structures. Previous layout
could lead to unwanted compiler optimizations
in loops when iterating over key and lut arrays.

Fixes: 65ece6de ("virtchnl: Add missing explicit padding to structures")
Signed-off-by: NNorbert Ciosek <norbertx.ciosek@intel.com>
Tested-by: NKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 e43accba
...@@ -476,7 +476,6 @@ struct virtchnl_rss_key { ...@@ -476,7 +476,6 @@ struct virtchnl_rss_key {
u16 vsi_id; u16 vsi_id;
u16 key_len; u16 key_len;
u8 key[1]; /* RSS hash key, packed bytes */ u8 key[1]; /* RSS hash key, packed bytes */
u8 pad[1];
}; };
VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key); VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
...@@ -485,7 +484,6 @@ struct virtchnl_rss_lut { ...@@ -485,7 +484,6 @@ struct virtchnl_rss_lut {
u16 vsi_id; u16 vsi_id;
u16 lut_entries; u16 lut_entries;
u8 lut[1]; /* RSS lookup table */ u8 lut[1]; /* RSS lookup table */
u8 pad[1];
}; };
VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut); VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册