diff options
author | Akeem G Abodunrin <akeem.g.abodunrin@intel.com> | 2019-02-26 19:35:14 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-03-22 11:19:17 -0400 |
commit | 5eda8afd6bcc89d4e4aa5d56b5f54276f63158ae (patch) | |
tree | 44a9e13481cd5aa025b5f576a09f93fa943bb9fa /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | e1ca65a3cceacc94dd9cde388016422ca2e15a54 (diff) |
ice: Add support for PF/VF promiscuous mode
Implement support for VF promiscuous mode, MAC/VLAN/MAC_VLAN and PF
multicast MAC/VLAN/MAC_VLAN promiscuous mode.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@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 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 87e57328a81b..7a692f80bda4 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -2119,10 +2119,11 @@ ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, | |||
2119 | * ice_cfg_vlan_pruning - enable or disable VLAN pruning on the VSI | 2119 | * ice_cfg_vlan_pruning - enable or disable VLAN pruning on the VSI |
2120 | * @vsi: VSI to enable or disable VLAN pruning on | 2120 | * @vsi: VSI to enable or disable VLAN pruning on |
2121 | * @ena: set to true to enable VLAN pruning and false to disable it | 2121 | * @ena: set to true to enable VLAN pruning and false to disable it |
2122 | * @vlan_promisc: enable valid security flags if not in VLAN promiscuous mode | ||
2122 | * | 2123 | * |
2123 | * returns 0 if VSI is updated, negative otherwise | 2124 | * returns 0 if VSI is updated, negative otherwise |
2124 | */ | 2125 | */ |
2125 | int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena) | 2126 | int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena, bool vlan_promisc) |
2126 | { | 2127 | { |
2127 | struct ice_vsi_ctx *ctxt; | 2128 | struct ice_vsi_ctx *ctxt; |
2128 | struct device *dev; | 2129 | struct device *dev; |
@@ -2150,8 +2151,10 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena) | |||
2150 | ctxt->info.sw_flags2 &= ~ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; | 2151 | ctxt->info.sw_flags2 &= ~ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; |
2151 | } | 2152 | } |
2152 | 2153 | ||
2153 | ctxt->info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID | | 2154 | if (!vlan_promisc) |
2154 | ICE_AQ_VSI_PROP_SW_VALID); | 2155 | ctxt->info.valid_sections = |
2156 | cpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID | | ||
2157 | ICE_AQ_VSI_PROP_SW_VALID); | ||
2155 | 2158 | ||
2156 | status = ice_update_vsi(&vsi->back->hw, vsi->idx, ctxt, NULL); | 2159 | status = ice_update_vsi(&vsi->back->hw, vsi->idx, ctxt, NULL); |
2157 | if (status) { | 2160 | if (status) { |