Lines Matching refs:vf_info
212 struct vf_data_storage *vf_info; in hinic_init_vf_config() local
216 vf_info = hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_init_vf_config()
217 if (vf_info->pf_set_mac) { in hinic_init_vf_config()
222 err = hinic_set_mac(hwdev, vf_info->vf_mac_addr, vlan_id, in hinic_init_vf_config()
232 err = hinic_set_vf_vlan(hwdev, true, vf_info->pf_vlan, in hinic_init_vf_config()
233 vf_info->pf_qos, vf_id); in hinic_init_vf_config()
241 if (vf_info->max_rate) { in hinic_init_vf_config()
242 err = hinic_set_vf_tx_rate(hwdev, vf_id, vf_info->max_rate, in hinic_init_vf_config()
243 vf_info->min_rate); in hinic_init_vf_config()
246 HW_VF_ID_TO_OS(vf_id), vf_info->max_rate, in hinic_init_vf_config()
247 vf_info->min_rate); in hinic_init_vf_config()
326 struct vf_data_storage *vf_info; in hinic_get_vf_mac_msg_handler() local
329 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_get_vf_mac_msg_handler()
331 memcpy(mac_info->mac, vf_info->vf_mac_addr, ETH_ALEN); in hinic_get_vf_mac_msg_handler()
346 struct vf_data_storage *vf_info; in hinic_set_vf_mac_msg_handler() local
350 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_set_vf_mac_msg_handler()
351 if (vf_info->pf_set_mac && !(vf_info->trust) && in hinic_set_vf_mac_msg_handler()
380 struct vf_data_storage *vf_info; in hinic_del_vf_mac_msg_handler() local
384 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_del_vf_mac_msg_handler()
385 if (vf_info->pf_set_mac && is_valid_ether_addr(mac_in->mac) && in hinic_del_vf_mac_msg_handler()
386 !memcmp(vf_info->vf_mac_addr, mac_in->mac, ETH_ALEN)) { in hinic_del_vf_mac_msg_handler()
596 struct vf_data_storage *vf_info; in hinic_set_vf_mac() local
600 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf); in hinic_set_vf_mac()
603 if (vf_info->pf_set_mac && in hinic_set_vf_mac()
604 !memcmp(vf_info->vf_mac_addr, mac_addr, ETH_ALEN)) in hinic_set_vf_mac()
607 vf_info->pf_set_mac = true; in hinic_set_vf_mac()
610 err = hinic_update_mac(hwdev, vf_info->vf_mac_addr, in hinic_set_vf_mac()
613 vf_info->pf_set_mac = false; in hinic_set_vf_mac()
617 memcpy(vf_info->vf_mac_addr, mac_addr, ETH_ALEN); in hinic_set_vf_mac()
685 struct vf_data_storage *vf_info; in hinic_update_mac_vlan() local
692 vf_info = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_update_mac_vlan()
693 if (!vf_info->pf_set_mac) in hinic_update_mac_vlan()
700 err = hinic_port_del_mac(nic_dev, vf_info->vf_mac_addr, vlan_id); in hinic_update_mac_vlan()
703 HW_VF_ID_TO_OS(vf_id), vf_info->vf_mac_addr, old_vlan); in hinic_update_mac_vlan()
711 err = hinic_port_add_mac(nic_dev, vf_info->vf_mac_addr, vlan_id); in hinic_update_mac_vlan()
714 HW_VF_ID_TO_OS(vf_id), vf_info->vf_mac_addr, new_vlan); in hinic_update_mac_vlan()
724 hinic_port_add_mac(nic_dev, vf_info->vf_mac_addr, vlan_id); in hinic_update_mac_vlan()