virtchnl: Fix layout of RSS structures
PATCH v3 1/1 virtchnl: Fix layout of RSS structures
From: Norbert Ciosek <[email protected]>
Remove padding from RSS structures. Previous layout could lead to unwanted compiler optimizations in loops when iterating over key and lut arrays.
---
v3: Removed footer
v2: Removed padding instead of moving "key" and "lut" fields at the end of RSS structures.
include/linux/avf/virtchnl.h | 2 -- 1 file changed, 2 deletions(-)
include/linux/avf/virtchnl.h +0 -2
@@ -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);
Signature · 1 line
2.26.2
Jankowski
PATCH v3 1/1 virtchnl: Fix layout of RSS structures
Quoted 47 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Tony Nguyen
Sent: czwartek, 28 stycznia 2021 19:17
To: intel-wired-lan at lists.osuosl.org
Cc: Ciosek, NorbertX <[email protected]>
Subject: [Intel-wired-lan] [net-queue v3] virtchnl: Fix layout of RSS structuresFrom: Norbert Ciosek <[email protected]>
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 <[email protected]>---
v3: Removed footer
v2: Removed padding instead of moving "key" and "lut" fields at the end of RSS structures.include/linux/avf/virtchnl.h | 2 -- 1 file changed, 2 deletions(-)include/linux/avf/virtchnl.h index renamed from include/linux/avf/virtchnl.h +0
-0
40bad71865ea..532bcbfc4716100644include/linux/avf/virtchnl.h +0
-1@@ -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{include/linux/avf/virtchnl.h +0
-2u16 vsi_id;u16 lut_entries;u8 lut[1 ];/* RSS lookup table */ -u8 pad[1 ]; };VIRTCHNL_CHECK_STRUCT_LEN (6 , virtchnl_rss_lut); --
Quoted 2 lines
2.26.2