diff options
author | Jedrzej Jagielski <jedrzej.jagielski@intel.com> | 2021-08-30 11:25:36 +0300 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2021-11-30 19:56:07 +0300 |
commit | 4d0dbd9678ad604963e9eab212fefb78a9fdb4aa (patch) | |
tree | 8718db743eda43207d2d4d7935c19121fb0b5807 | |
parent | b231b59a2f96bbc3f4759d2e8ecaa1c71a9e7616 (diff) | |
download | linux-4d0dbd9678ad604963e9eab212fefb78a9fdb4aa.tar.xz |
iavf: Refactor iavf_mac_filter struct memory usage
iavf_mac_filter struct contained couple boolean
flags using up more memory than is necessary.
Change the flags to be bitfields in an anonymous struct
so all the flags now fit in one byte.
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/iavf/iavf.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h index 3789269ce741..b5728bdbcf33 100644 --- a/drivers/net/ethernet/intel/iavf/iavf.h +++ b/drivers/net/ethernet/intel/iavf/iavf.h @@ -137,9 +137,13 @@ struct iavf_q_vector { struct iavf_mac_filter { struct list_head list; u8 macaddr[ETH_ALEN]; - bool is_new_mac; /* filter is new, wait for PF decision */ - bool remove; /* filter needs to be removed */ - bool add; /* filter needs to be added */ + struct { + u8 is_new_mac:1; /* filter is new, wait for PF decision */ + u8 remove:1; /* filter needs to be removed */ + u8 add:1; /* filter needs to be added */ + u8 is_primary:1; /* filter is a default VF MAC */ + u8 padding:4; + }; }; struct iavf_vlan_filter { |