提交 b33de560 编写于 作者: M Michal Swiatkowski 提交者: Tony Nguyen

ice: remove VLAN representor specific ops

In switchdev mode VF VLAN caps will not be set there is no need
to have specific VLAN ops for representor that only returns not
supported error.

As VLAN configuration commands will be blocked, the VF driver
can't disable VLAN stripping at initialization. It leads to the
situation when VLAN stripping on VF VSI is on, but in kernel it
is off. To prevent this, disable VLAN stripping in VSI
initialization. It doesn't break other usecases, because it is set
according to kernel settings.
Signed-off-by: NMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: NSandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 cede04b3
...@@ -887,6 +887,9 @@ static void ice_set_dflt_vsi_ctx(struct ice_hw *hw, struct ice_vsi_ctx *ctxt) ...@@ -887,6 +887,9 @@ static void ice_set_dflt_vsi_ctx(struct ice_hw *hw, struct ice_vsi_ctx *ctxt)
(ICE_AQ_VSI_OUTER_TAG_VLAN_8100 << (ICE_AQ_VSI_OUTER_TAG_VLAN_8100 <<
ICE_AQ_VSI_OUTER_TAG_TYPE_S) & ICE_AQ_VSI_OUTER_TAG_TYPE_S) &
ICE_AQ_VSI_OUTER_TAG_TYPE_M; ICE_AQ_VSI_OUTER_TAG_TYPE_M;
ctxt->info.outer_vlan_flags |=
FIELD_PREP(ICE_AQ_VSI_OUTER_VLAN_EMODE_M,
ICE_AQ_VSI_OUTER_VLAN_EMODE_NOTHING);
} }
/* Have 1:1 UP mapping for both ingress/egress tables */ /* Have 1:1 UP mapping for both ingress/egress tables */
table |= ICE_UP_TABLE_TRANSLATE(0, 0); table |= ICE_UP_TABLE_TRANSLATE(0, 0);
......
...@@ -3552,42 +3552,6 @@ ice_vc_repr_del_mac(struct ice_vf __always_unused *vf, u8 __always_unused *msg) ...@@ -3552,42 +3552,6 @@ ice_vc_repr_del_mac(struct ice_vf __always_unused *vf, u8 __always_unused *msg)
VIRTCHNL_STATUS_SUCCESS, NULL, 0); VIRTCHNL_STATUS_SUCCESS, NULL, 0);
} }
static int ice_vc_repr_add_vlan(struct ice_vf *vf, u8 __always_unused *msg)
{
dev_dbg(ice_pf_to_dev(vf->pf),
"Can't add VLAN in switchdev mode for VF %d\n", vf->vf_id);
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ADD_VLAN,
VIRTCHNL_STATUS_SUCCESS, NULL, 0);
}
static int ice_vc_repr_del_vlan(struct ice_vf *vf, u8 __always_unused *msg)
{
dev_dbg(ice_pf_to_dev(vf->pf),
"Can't delete VLAN in switchdev mode for VF %d\n", vf->vf_id);
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DEL_VLAN,
VIRTCHNL_STATUS_SUCCESS, NULL, 0);
}
static int ice_vc_repr_ena_vlan_stripping(struct ice_vf *vf)
{
dev_dbg(ice_pf_to_dev(vf->pf),
"Can't enable VLAN stripping in switchdev mode for VF %d\n",
vf->vf_id);
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING,
VIRTCHNL_STATUS_ERR_NOT_SUPPORTED,
NULL, 0);
}
static int ice_vc_repr_dis_vlan_stripping(struct ice_vf *vf)
{
dev_dbg(ice_pf_to_dev(vf->pf),
"Can't disable VLAN stripping in switchdev mode for VF %d\n",
vf->vf_id);
return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING,
VIRTCHNL_STATUS_ERR_NOT_SUPPORTED,
NULL, 0);
}
static int static int
ice_vc_repr_cfg_promiscuous_mode(struct ice_vf *vf, u8 __always_unused *msg) ice_vc_repr_cfg_promiscuous_mode(struct ice_vf *vf, u8 __always_unused *msg)
{ {
...@@ -3614,10 +3578,10 @@ static const struct ice_virtchnl_ops ice_virtchnl_repr_ops = { ...@@ -3614,10 +3578,10 @@ static const struct ice_virtchnl_ops ice_virtchnl_repr_ops = {
.config_rss_lut = ice_vc_config_rss_lut, .config_rss_lut = ice_vc_config_rss_lut,
.get_stats_msg = ice_vc_get_stats_msg, .get_stats_msg = ice_vc_get_stats_msg,
.cfg_promiscuous_mode_msg = ice_vc_repr_cfg_promiscuous_mode, .cfg_promiscuous_mode_msg = ice_vc_repr_cfg_promiscuous_mode,
.add_vlan_msg = ice_vc_repr_add_vlan, .add_vlan_msg = ice_vc_add_vlan_msg,
.remove_vlan_msg = ice_vc_repr_del_vlan, .remove_vlan_msg = ice_vc_remove_vlan_msg,
.ena_vlan_stripping = ice_vc_repr_ena_vlan_stripping, .ena_vlan_stripping = ice_vc_ena_vlan_stripping,
.dis_vlan_stripping = ice_vc_repr_dis_vlan_stripping, .dis_vlan_stripping = ice_vc_dis_vlan_stripping,
.handle_rss_cfg_msg = ice_vc_handle_rss_cfg, .handle_rss_cfg_msg = ice_vc_handle_rss_cfg,
.add_fdir_fltr_msg = ice_vc_add_fdir_fltr, .add_fdir_fltr_msg = ice_vc_add_fdir_fltr,
.del_fdir_fltr_msg = ice_vc_del_fdir_fltr, .del_fdir_fltr_msg = ice_vc_del_fdir_fltr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册