From: Rasesh Mody Date: Sat, 29 Sep 2018 08:14:34 +0000 (+0000) Subject: net/qede/base: enable control frame filtering X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ab67e837be9e49cb2afcafb741632ddd73c5cd49;p=dpdk.git net/qede/base: enable control frame filtering Enable control frame filtering for non-trusted VFs. Signed-off-by: Rasesh Mody --- diff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore_l2.c index d87ffdaf34..c17082eb9d 100644 --- a/drivers/net/qede/base/ecore_l2.c +++ b/drivers/net/qede/base/ecore_l2.c @@ -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); diff --git a/drivers/net/qede/base/ecore_l2_api.h b/drivers/net/qede/base/ecore_l2_api.h index 21595f35f0..004fb61baf 100644 --- a/drivers/net/qede/base/ecore_l2_api.h +++ b/drivers/net/qede/base/ecore_l2_api.h @@ -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; }; /** diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c index 9da4e412d3..3ac10859ba 100644 --- a/drivers/net/qede/base/ecore_sriov.c +++ b/drivers/net/qede/base/ecore_sriov.c @@ -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, ¶ms); if (rc != ECORE_SUCCESS) {