提交 1bcaa27b 编写于 作者: G Guangbin Huang 提交者: Zheng Zengkai

net: hns3: PF enable promisc for VF when mac table is overflow

mainline inclusion
from mainline-v5.15-rc4
commit 276e6042
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4I7P7
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=276e60421668

----------------------------------------------------------------------

If unicast mac address table is full, and user add a new mac address, the
unicast promisc needs to be enabled for the new unicast mac address can be
used. So does the multicast promisc.

Now this feature has been implemented for PF, and VF should be implemented
too. When the mac table of VF is overflow, PF will enable promisc for this
VF.

Fixes: 1e6e7610 ("net: hns3: configure promisc mode for VF asynchronously")
Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ba250d23
...@@ -12824,8 +12824,12 @@ static void hclge_sync_promisc_mode(struct hclge_dev *hdev) ...@@ -12824,8 +12824,12 @@ static void hclge_sync_promisc_mode(struct hclge_dev *hdev)
continue; continue;
if (vport->vf_info.trusted) { if (vport->vf_info.trusted) {
uc_en = vport->vf_info.request_uc_en > 0; uc_en = vport->vf_info.request_uc_en > 0 ||
mc_en = vport->vf_info.request_mc_en > 0; vport->overflow_promisc_flags &
HNAE3_OVERFLOW_UPE;
mc_en = vport->vf_info.request_mc_en > 0 ||
vport->overflow_promisc_flags &
HNAE3_OVERFLOW_MPE;
} }
bc_en = vport->vf_info.request_bc_en > 0; bc_en = vport->vf_info.request_bc_en > 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册