summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@intel.com>2020-01-22 07:21:25 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-02-15 16:27:17 -0800
commitb093841f9ac916ce233cb59c74bf4a70a2febb2c (patch)
tree0b8c165af12e2840e8287bdd66a88f9568c28b83 /drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
parent42f3efef3554ea141f14234bf80d287ccb9f5a5e (diff)
ice: Refactor port vlan configuration for the VF
Currently ice_vsi_manage_pvid() calls ice_vsi_[set|kill]_pvid_fill_ctxt() when enabling/disabling a port VLAN on a VSI respectively. These two functions have some duplication so just move their unique pieces inline in ice_vsi_manage_pvid() and then the duplicate code can be reused for both the enabling/disabling paths. Before this patch the info.pvid field was not being written correctly via ice_vsi_kill_pvid_fill_ctxt() so it was being hard coded to 0 in ice_set_vf_port_vlan(). Fix this by setting the info.pvid field to 0 before calling ice_vsi_update() in ice_vsi_manage_pvid(). We currently use vf->port_vlan_id to keep track of the port VLAN ID and QoS, which is a bit misleading. Fix this by renaming it to vf->port_vlan_info. Also change the name of the argument for ice_vsi_manage_pvid() from vid to pvid_info. In ice_vsi_manage_pvid() only save the fields that were modified in the VSI properties structure on success instead of the entire thing. Signed-off-by: Brett Creeley <brett.creeley@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 4647d636ed36..80bb1acc7c28 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -74,7 +74,7 @@ struct ice_vf {
struct virtchnl_ether_addr dflt_lan_addr;
DECLARE_BITMAP(txq_ena, ICE_MAX_BASE_QS_PER_VF);
DECLARE_BITMAP(rxq_ena, ICE_MAX_BASE_QS_PER_VF);
- u16 port_vlan_id;
+ u16 port_vlan_info; /* Port VLAN ID and QoS */
u8 pf_set_mac:1; /* VF MAC address set by VMM admin */
u8 trusted:1;
u8 spoofchk:1;