aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2019-04-16 10:24:35 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-05-23 10:51:54 -0700
commit0ab54c5f2fe8929d04d965bc3e05325e37de45ba (patch)
treef3fb7568d5ab22cd7396a8bfbd03387d1e611af3 /drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
parentice: Reorganize tx_buf and ring structs (diff)
downloadlinux-dev-0ab54c5f2fe8929d04d965bc3e05325e37de45ba.tar.xz
linux-dev-0ab54c5f2fe8929d04d965bc3e05325e37de45ba.zip
ice: Use bitfields when possible
We can use bit fields to store boolean values and when the bit fields are next to each other, the compiler will combine them (as long as the size holds enough). Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 3725aea16840..60f024ae281d 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -55,8 +55,8 @@ struct ice_vf {
struct virtchnl_version_info vf_ver;
struct virtchnl_ether_addr dflt_lan_addr;
u16 port_vlan_id;
- u8 pf_set_mac; /* VF MAC address set by VMM admin */
- u8 trusted;
+ u8 pf_set_mac:1; /* VF MAC address set by VMM admin */
+ u8 trusted:1;
u16 lan_vsi_idx; /* index into PF struct */
u16 lan_vsi_num; /* ID as used by firmware */
u64 num_mdd_events; /* number of MDD events detected */
@@ -65,9 +65,9 @@ struct ice_vf {
unsigned long vf_caps; /* VF's adv. capabilities */
DECLARE_BITMAP(vf_states, ICE_VF_STATES_NBITS); /* VF runtime states */
unsigned int tx_rate; /* Tx bandwidth limit in Mbps */
- u8 link_forced;
- u8 link_up; /* only valid if VF link is forced */
- u8 spoofchk;
+ u8 link_forced:1;
+ u8 link_up:1; /* only valid if VF link is forced */
+ u8 spoofchk:1;
u16 num_mac;
u16 num_vlan;
u16 num_vf_qs; /* num of queue configured per VF */