Lines Matching refs:vf_infos
55 struct vf_data_storage *vf_infos = hwdev->func_to_io.vf_infos; in hinic_notify_vf_link_status() local
60 if (vf_infos[HW_VF_ID_TO_OS(vf_id)].registered) { in hinic_notify_vf_link_status()
84 if (!nic_io->vf_infos[HW_VF_ID_TO_OS(i)].link_forced) in hinic_notify_all_vfs_link_changed()
95 pf_vlan = nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan; in hinic_vf_info_vlanprio()
96 pf_qos = nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos; in hinic_vf_info_vlanprio()
157 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].max_rate = max_rate; in hinic_set_vf_tx_rate_max_min()
158 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].min_rate = min_rate; in hinic_set_vf_tx_rate_max_min()
187 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].max_rate = tx_rate; in hinic_set_vf_rate_limit()
188 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].min_rate = 0; in hinic_set_vf_rate_limit()
218 vf_info = hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_init_vf_config()
281 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].registered = true; in hinic_register_vf_msg_handler()
298 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].registered = false; in hinic_unregister_vf_msg_handler()
331 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_get_vf_mac_msg_handler()
352 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_set_vf_mac_msg_handler()
386 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_del_vf_mac_msg_handler()
412 struct vf_data_storage *vf_infos; in hinic_get_vf_link_status_msg_handler() local
417 vf_infos = nic_io->vf_infos; in hinic_get_vf_link_status_msg_handler()
418 link_forced = vf_infos[HW_VF_ID_TO_OS(vf_id)].link_forced; in hinic_get_vf_link_status_msg_handler()
419 link_up = vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up; in hinic_get_vf_link_status_msg_handler()
578 vfinfo = hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_get_vf_config()
620 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf); in hinic_set_vf_mac()
672 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan = vlan; in hinic_add_vf_vlan()
673 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos = qos; in hinic_add_vf_vlan()
686 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan, in hinic_kill_vf_vlan()
687 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos, in hinic_kill_vf_vlan()
693 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan, in hinic_kill_vf_vlan()
696 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan = 0; in hinic_kill_vf_vlan()
697 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos = 0; in hinic_kill_vf_vlan()
712 vf_info = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_update_mac_vlan()
813 struct vf_data_storage *vf_infos; in hinic_set_vf_trust() local
820 vf_infos = nic_io->vf_infos; in hinic_set_vf_trust()
821 vf_infos[vf_id].trust = trust; in hinic_set_vf_trust()
840 cur_trust = nic_io->vf_infos[vf].trust; in hinic_ndo_set_vf_trust()
920 struct vf_data_storage *vf_infos = NULL; in hinic_set_vf_spoofchk() local
927 vf_infos = hwdev->func_to_io.vf_infos; in hinic_set_vf_spoofchk()
943 vf_infos[HW_VF_ID_TO_OS(vf_id)].spoofchk = spoofchk; in hinic_set_vf_spoofchk()
959 cur_spoofchk = nic_dev->hwdev->func_to_io.vf_infos[vf].spoofchk; in hinic_ndo_set_vf_spoofchk()
983 struct vf_data_storage *vf_infos = nic_io->vf_infos; in hinic_set_vf_link_state() local
988 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_forced = false; in hinic_set_vf_link_state()
989 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up = nic_io->link_status ? in hinic_set_vf_link_state()
994 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_forced = true; in hinic_set_vf_link_state()
995 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up = true; in hinic_set_vf_link_state()
999 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_forced = true; in hinic_set_vf_link_state()
1000 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up = false; in hinic_set_vf_link_state()
1099 struct vf_data_storage *vf_infos = nic_io->vf_infos; in hinic_init_vf_infos() local
1109 vf_infos[vf_id].link_forced = false; in hinic_init_vf_infos()
1112 vf_infos[vf_id].link_forced = true; in hinic_init_vf_infos()
1113 vf_infos[vf_id].link_up = true; in hinic_init_vf_infos()
1116 vf_infos[vf_id].link_forced = true; in hinic_init_vf_infos()
1117 vf_infos[vf_id].link_up = false; in hinic_init_vf_infos()
1130 struct vf_data_storage *vf_infos; in hinic_clear_vf_infos() local
1132 vf_infos = nic_dev->hwdev->func_to_io.vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_clear_vf_infos()
1133 if (vf_infos->pf_set_mac) in hinic_clear_vf_infos()
1134 hinic_port_del_mac(nic_dev, vf_infos->vf_mac_addr, 0); in hinic_clear_vf_infos()
1139 if (vf_infos->max_rate) in hinic_clear_vf_infos()
1142 if (vf_infos->spoofchk) in hinic_clear_vf_infos()
1145 if (vf_infos->trust) in hinic_clear_vf_infos()
1148 memset(vf_infos, 0, sizeof(*vf_infos)); in hinic_clear_vf_infos()
1206 size = sizeof(*nic_io->vf_infos) * nic_io->max_vfs; in hinic_vf_func_init()
1208 nic_io->vf_infos = kzalloc(size, GFP_KERNEL); in hinic_vf_func_init()
1209 if (!nic_io->vf_infos) { in hinic_vf_func_init()
1231 kfree(nic_io->vf_infos); in hinic_vf_func_init()
1251 if (hwdev->func_to_io.vf_infos) { in hinic_vf_func_free()
1253 kfree(hwdev->func_to_io.vf_infos); in hinic_vf_func_free()