eab2177671
Currently, we only support VF device is bound to vfio_pci or igb_uio and then driven by DPDK driver when PF is driven by kernel mode hns3 ethdev driver, VF is not supported when PF is driven by hns3 DPDK driver. This patch adds support setting VF MAC address by hns3 PF kernel ethdev driver on the host by "ip link set ..." command. 1) If the hns3 PF kernel ethdev driver sets the MAC address for VF device before the initialization of the related VF device, hns3 VF PMD driver should get the MAC address from PF driver through mailbox and configure hardware using this MAC address in the initialization. The hns3 VF PMD driver get the MAC address form PF driver, if obtaining a non-zero MAC address from mailbox, VF driver will configure hardware using it, otherwise using a random MAC address in the initialization of VF device. 2) If the hns3 PF kernel ethdev driver sets the MAC address for VF device after the initialization of the related VF device, the PF driver will notify VF driver to reset VF device to make the new MAC address effective immediately. The hns3 VF PMD driver should check whether the MAC address has been changed by the PF kernel netdevice driver, if changed VF driver should configure hardware using the new MAC address in the recovering hardware configuration stage of the reset process. 3) When user has configured a mac address for VF device by "ip link set ..." command based on the PF device, the hns3 PF kernel ethdev driver does not allow VF driver to request reconfiguring a different default mac address and return -EPREM to VF driver through mailbox. Signed-off-by: Chengchang Tang <tangchengchang@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com> |
||
---|---|---|
.. | ||
hns3_cmd.c | ||
hns3_cmd.h | ||
hns3_dcb.c | ||
hns3_dcb.h | ||
hns3_ethdev_vf.c | ||
hns3_ethdev.c | ||
hns3_ethdev.h | ||
hns3_fdir.c | ||
hns3_fdir.h | ||
hns3_flow.c | ||
hns3_intr.c | ||
hns3_intr.h | ||
hns3_logs.h | ||
hns3_mbx.c | ||
hns3_mbx.h | ||
hns3_mp.c | ||
hns3_mp.h | ||
hns3_regs.c | ||
hns3_regs.h | ||
hns3_rss.c | ||
hns3_rss.h | ||
hns3_rxtx.c | ||
hns3_rxtx.h | ||
hns3_stats.c | ||
hns3_stats.h | ||
Makefile | ||
meson.build | ||
rte_pmd_hns3_version.map |