net/qede/base: enable control frame filtering

Enable control frame filtering for non-trusted VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
This commit is contained in:
Rasesh Mody 2018-09-29 08:14:34 +00:00 committed by Ferruh Yigit
parent 54f74d6a6a
commit ab67e837be
3 changed files with 12 additions and 2 deletions

View File

@ -786,6 +786,11 @@ ecore_sp_vport_update(struct ecore_hwfn *p_hwfn,
return rc;
}
if (p_params->update_ctl_frame_check) {
p_cmn->ctl_frame_mac_check_en = p_params->mac_chk_en;
p_cmn->ctl_frame_ethtype_check_en = p_params->ethtype_chk_en;
}
/* Update mcast bins for VFs, PF doesn't use this functionality */
ecore_sp_update_mcast_bin(p_ramrod, p_params);

View File

@ -347,7 +347,10 @@ struct ecore_sp_vport_update_params {
/* MTU change - notice this requires the vport to be disabled.
* If non-zero, value would be used.
*/
u16 mtu;
u16 mtu;
u8 update_ctl_frame_check;
u8 mac_chk_en;
u8 ethtype_chk_en;
};
/**

View File

@ -2158,7 +2158,9 @@ static void ecore_iov_vf_mbx_start_vport(struct ecore_hwfn *p_hwfn,
params.vport_id = vf->vport_id;
params.max_buffers_per_cqe = start->max_buffers_per_cqe;
params.mtu = vf->mtu;
params.check_mac = true;
/* Non trusted VFs should enable control frame filtering */
params.check_mac = !vf->p_vf_info.is_trusted_configured;
rc = ecore_sp_eth_vport_start(p_hwfn, &params);
if (rc != ECORE_SUCCESS) {