net: hns3: fix bug when PF set the duplicate MAC address for VFs
driver inclusion category: bugfix bugzilla: NA CVE: NA ------------------------------------- We consider that the uniqueness of the MAC address configuration should be guaranteed by the user. So the restriction on the configuration of duplicate MAC addresses is removed in patch "remove the limitation of MAC address duplicate configuration". What happens if a duplicate MAC address is still configured? If the MAC address A is configured to vport A and then vport B. The MAC address of vport A in the hardware becomes invalid. If the address of vport A is changed to MAC address B, the driver needs to delete the MAC address A of vport A. Due to the MAC address A of vport A has become invalid in the hardware entry, so "-ENOENT" is returned. In this case, the "used_umv_size" value recorded in driver is not updated. As a result, the MAC entry status of the software is inconsistent with that of the hardware. Therefore, the driver updates the umv size even if the MAC entry cannot be found. Ensure that the software and hardware status is consistent. Signed-off-by: NGuojia Liao <liaoguojia@huawei.com> Reviewed-by: NPeng Li <lipeng321@huawei.com> Reviewed-by: NWeiwei Deng <dengweiwei@huawei.com> Reviewed-by: NZhaohui Zhong <zhongzhaohui@huawei.com> Reviewed-by: NJunxin Chen <chenjunxin1@huawei.com> Signed-off-by: NShengzui You <youshengzui@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录