• Home
  • Raw
  • Download

Lines Matching refs:vport

496 	struct hclge_vport *vport = hclge_get_vport(handle);  in hclge_tqps_update_stats()  local
497 struct hclge_dev *hdev = vport->back; in hclge_tqps_update_stats()
661 handle = &hdev->vport[0].nic; in hclge_update_stats_for_all()
688 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_update_stats() local
689 struct hclge_dev *hdev = vport->back; in hclge_update_stats()
724 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_sset_count() local
725 struct hclge_dev *hdev = vport->back; in hclge_get_sset_count()
802 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_stats() local
803 struct hclge_dev *hdev = vport->back; in hclge_get_stats()
1159 static int hclge_assign_tqp(struct hclge_vport *vport, in hclge_assign_tqp() argument
1162 struct hclge_dev *hdev = vport->back; in hclge_assign_tqp()
1166 func_id = vport->vport_id; in hclge_assign_tqp()
1167 is_pf = (vport->vport_id == 0) ? true : false; in hclge_assign_tqp()
1172 hdev->htqp[i].q.handle = &vport->nic; in hclge_assign_tqp()
1185 vport->alloc_tqps = num_tqps; in hclge_assign_tqp()
1190 static int hclge_knic_setup(struct hclge_vport *vport, u16 num_tqps) in hclge_knic_setup() argument
1192 struct hnae3_handle *nic = &vport->nic; in hclge_knic_setup()
1194 struct hclge_dev *hdev = vport->back; in hclge_knic_setup()
1224 ret = hclge_assign_tqp(vport, kinfo->tqp, kinfo->num_tqps); in hclge_knic_setup()
1233 static void hclge_unic_setup(struct hclge_vport *vport, u16 num_tqps) in hclge_unic_setup() argument
1238 static int hclge_vport_setup(struct hclge_vport *vport, u16 num_tqps) in hclge_vport_setup() argument
1240 struct hnae3_handle *nic = &vport->nic; in hclge_vport_setup()
1241 struct hclge_dev *hdev = vport->back; in hclge_vport_setup()
1249 ret = hclge_knic_setup(vport, num_tqps); in hclge_vport_setup()
1256 hclge_unic_setup(vport, num_tqps); in hclge_vport_setup()
1265 struct hclge_vport *vport; in hclge_alloc_vport() local
1284 vport = devm_kcalloc(&pdev->dev, num_vport, sizeof(struct hclge_vport), in hclge_alloc_vport()
1286 if (!vport) in hclge_alloc_vport()
1289 hdev->vport = vport; in hclge_alloc_vport()
1309 vport->back = hdev; in hclge_alloc_vport()
1310 vport->vport_id = i; in hclge_alloc_vport()
1313 ret = hclge_vport_setup(vport, tqp_main_vport); in hclge_alloc_vport()
1315 ret = hclge_vport_setup(vport, tqp_per_vport); in hclge_alloc_vport()
1323 vport++; in hclge_alloc_vport()
1835 static int hclge_init_roce_base_info(struct hclge_vport *vport) in hclge_init_roce_base_info() argument
1837 struct hnae3_handle *roce = &vport->roce; in hclge_init_roce_base_info()
1838 struct hnae3_handle *nic = &vport->nic; in hclge_init_roce_base_info()
1840 roce->rinfo.num_vectors = vport->back->num_roce_msix; in hclge_init_roce_base_info()
1842 if (vport->back->num_msi_left < vport->roce.rinfo.num_vectors || in hclge_init_roce_base_info()
1843 vport->back->num_msi_left == 0) in hclge_init_roce_base_info()
1846 roce->rinfo.base_vector = vport->back->roce_base_vector; in hclge_init_roce_base_info()
1849 roce->rinfo.roce_io_base = vport->back->hw.io_base; in hclge_init_roce_base_info()
2003 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_cfg_mac_speed_dup_h() local
2004 struct hclge_dev *hdev = vport->back; in hclge_cfg_mac_speed_dup_h()
2087 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_autoneg() local
2088 struct hclge_dev *hdev = vport->back; in hclge_set_autoneg()
2095 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_autoneg() local
2096 struct hclge_dev *hdev = vport->back; in hclge_get_autoneg()
2207 handle = &hdev->vport[i].nic; in hclge_update_link_status()
2259 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_update_speed_duplex_h() local
2260 struct hclge_dev *hdev = vport->back; in hclge_update_speed_duplex_h()
2267 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_status() local
2268 struct hclge_dev *hdev = vport->back; in hclge_get_status()
2332 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_vector() local
2334 struct hclge_dev *hdev = vport->back; in hclge_get_vector()
2347 vport->vport_id * in hclge_get_vector()
2349 hdev->vector_status[i] = vport->vport_id; in hclge_get_vector()
2546 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_rss() local
2547 struct hclge_dev *hdev = vport->back; in hclge_get_rss()
2556 memcpy(key, vport->rss_hash_key, HCLGE_RSS_KEY_SIZE); in hclge_get_rss()
2561 indir[i] = vport->rss_indirection_tbl[i]; in hclge_get_rss()
2569 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_rss() local
2570 struct hclge_dev *hdev = vport->back; in hclge_set_rss()
2577 memcpy(vport->rss_hash_key, key, HCLGE_RSS_KEY_SIZE); in hclge_set_rss()
2591 vport->rss_indirection_tbl[i] = indir[i]; in hclge_set_rss()
2600 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_tc_size() local
2601 struct hclge_dev *hdev = vport->back; in hclge_get_tc_size()
2609 struct hclge_vport *vport = hdev->vport; in hclge_rss_init_hw() local
2629 vport[j].rss_indirection_tbl[i] = in hclge_rss_init_hw()
2630 i % vport[j].alloc_rss_size; in hclge_rss_init_hw()
2636 rss_size = vport[j].alloc_rss_size; in hclge_rss_init_hw()
2637 rss_indir[i] = vport[j].rss_indirection_tbl[i]; in hclge_rss_init_hw()
2687 int hclge_map_vport_ring_to_vector(struct hclge_vport *vport, int vector_id, in hclge_map_vport_ring_to_vector() argument
2690 struct hclge_dev *hdev = vport->back; in hclge_map_vport_ring_to_vector()
2713 req->vfid = vport->vport_id; in hclge_map_vport_ring_to_vector()
2752 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_map_handle_ring_to_vector() local
2753 struct hclge_dev *hdev = vport->back; in hclge_map_handle_ring_to_vector()
2763 return hclge_map_vport_ring_to_vector(vport, vector_id, ring_chain); in hclge_map_handle_ring_to_vector()
2770 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_unmap_ring_from_vector() local
2771 struct hclge_dev *hdev = vport->back; in hclge_unmap_ring_from_vector()
2802 req->vfid = vport->vport_id; in hclge_unmap_ring_from_vector()
2876 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_promisc_mode() local
2877 struct hclge_dev *hdev = vport->back; in hclge_set_promisc_mode()
2880 hclge_promisc_param_init(&param, en, en, true, vport->vport_id); in hclge_set_promisc_mode()
2939 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_reset_tqp_stats() local
2944 for (i = 0; i < vport->alloc_tqps; i++) { in hclge_reset_tqp_stats()
2953 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_ae_start() local
2954 struct hclge_dev *hdev = vport->back; in hclge_ae_start()
2957 for (i = 0; i < vport->alloc_tqps; i++) { in hclge_ae_start()
2986 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_ae_stop() local
2987 struct hclge_dev *hdev = vport->back; in hclge_ae_stop()
2990 for (i = 0; i < vport->alloc_tqps; i++) { in hclge_ae_stop()
3010 static int hclge_get_mac_vlan_cmd_status(struct hclge_vport *vport, in hclge_get_mac_vlan_cmd_status() argument
3014 struct hclge_dev *hdev = vport->back; in hclge_get_mac_vlan_cmd_status()
3127 u16 hclge_get_mac_addr_to_mta_index(struct hclge_vport *vport, in hclge_get_mac_addr_to_mta_index() argument
3131 struct hclge_dev *hdev = vport->back; in hclge_get_mac_addr_to_mta_index()
3191 static int hclge_set_mta_table_item(struct hclge_vport *vport, in hclge_set_mta_table_item() argument
3195 struct hclge_dev *hdev = vport->back; in hclge_set_mta_table_item()
3219 static int hclge_remove_mac_vlan_tbl(struct hclge_vport *vport, in hclge_remove_mac_vlan_tbl() argument
3222 struct hclge_dev *hdev = vport->back; in hclge_remove_mac_vlan_tbl()
3240 return hclge_get_mac_vlan_cmd_status(vport, desc.retval, resp_code, in hclge_remove_mac_vlan_tbl()
3244 static int hclge_lookup_mac_vlan_tbl(struct hclge_vport *vport, in hclge_lookup_mac_vlan_tbl() argument
3249 struct hclge_dev *hdev = vport->back; in hclge_lookup_mac_vlan_tbl()
3281 return hclge_get_mac_vlan_cmd_status(vport, desc[0].retval, resp_code, in hclge_lookup_mac_vlan_tbl()
3285 static int hclge_add_mac_vlan_tbl(struct hclge_vport *vport, in hclge_add_mac_vlan_tbl() argument
3289 struct hclge_dev *hdev = vport->back; in hclge_add_mac_vlan_tbl()
3303 cfg_status = hclge_get_mac_vlan_cmd_status(vport, desc.retval, in hclge_add_mac_vlan_tbl()
3317 cfg_status = hclge_get_mac_vlan_cmd_status(vport, in hclge_add_mac_vlan_tbl()
3336 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_add_uc_addr() local
3338 return hclge_add_uc_addr_common(vport, addr); in hclge_add_uc_addr()
3341 int hclge_add_uc_addr_common(struct hclge_vport *vport, in hclge_add_uc_addr_common() argument
3344 struct hclge_dev *hdev = vport->back; in hclge_add_uc_addr_common()
3371 HCLGE_MAC_EPORT_VFID_S, vport->vport_id); in hclge_add_uc_addr_common()
3378 status = hclge_add_mac_vlan_tbl(vport, &req, NULL); in hclge_add_uc_addr_common()
3386 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_rm_uc_addr() local
3388 return hclge_rm_uc_addr_common(vport, addr); in hclge_rm_uc_addr()
3391 int hclge_rm_uc_addr_common(struct hclge_vport *vport, in hclge_rm_uc_addr_common() argument
3394 struct hclge_dev *hdev = vport->back; in hclge_rm_uc_addr_common()
3412 status = hclge_remove_mac_vlan_tbl(vport, &req); in hclge_rm_uc_addr_common()
3420 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_add_mc_addr() local
3422 return hclge_add_mc_addr_common(vport, addr); in hclge_add_mc_addr()
3425 int hclge_add_mc_addr_common(struct hclge_vport *vport, in hclge_add_mc_addr_common() argument
3428 struct hclge_dev *hdev = vport->back; in hclge_add_mc_addr_common()
3447 status = hclge_lookup_mac_vlan_tbl(vport, &req, desc, true); in hclge_add_mc_addr_common()
3450 hclge_update_desc_vfid(desc, vport->vport_id, false); in hclge_add_mc_addr_common()
3451 status = hclge_add_mac_vlan_tbl(vport, &req, desc); in hclge_add_mc_addr_common()
3457 hclge_update_desc_vfid(desc, vport->vport_id, false); in hclge_add_mc_addr_common()
3458 status = hclge_add_mac_vlan_tbl(vport, &req, desc); in hclge_add_mc_addr_common()
3462 tbl_idx = hclge_get_mac_addr_to_mta_index(vport, addr); in hclge_add_mc_addr_common()
3463 status = hclge_set_mta_table_item(vport, tbl_idx, true); in hclge_add_mc_addr_common()
3471 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_rm_mc_addr() local
3473 return hclge_rm_mc_addr_common(vport, addr); in hclge_rm_mc_addr()
3476 int hclge_rm_mc_addr_common(struct hclge_vport *vport, in hclge_rm_mc_addr_common() argument
3479 struct hclge_dev *hdev = vport->back; in hclge_rm_mc_addr_common()
3499 status = hclge_lookup_mac_vlan_tbl(vport, &req, desc, true); in hclge_rm_mc_addr_common()
3502 hclge_update_desc_vfid(desc, vport->vport_id, true); in hclge_rm_mc_addr_common()
3506 status = hclge_remove_mac_vlan_tbl(vport, &req); in hclge_rm_mc_addr_common()
3509 status = hclge_add_mac_vlan_tbl(vport, &req, desc); in hclge_rm_mc_addr_common()
3520 tbl_idx = hclge_get_mac_addr_to_mta_index(vport, addr); in hclge_rm_mc_addr_common()
3521 status = hclge_set_mta_table_item(vport, tbl_idx, false); in hclge_rm_mc_addr_common()
3528 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_mac_addr() local
3529 struct hclge_dev *hdev = vport->back; in hclge_get_mac_addr()
3537 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_mac_addr() local
3538 struct hclge_dev *hdev = vport->back; in hclge_set_mac_addr()
3646 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_port_vlan_filter() local
3647 struct hclge_dev *hdev = vport->back; in hclge_set_port_vlan_filter()
3688 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_vf_vlan_filter() local
3689 struct hclge_dev *hdev = vport->back; in hclge_set_vf_vlan_filter()
3716 handle = &hdev->vport[0].nic; in hclge_init_vlan_config()
3722 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_set_mtu() local
3724 struct hclge_dev *hdev = vport->back; in hclge_set_mtu()
3792 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_reset_tqp() local
3793 struct hclge_dev *hdev = vport->back; in hclge_reset_tqp()
3835 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_fw_version() local
3836 struct hclge_dev *hdev = vport->back; in hclge_get_fw_version()
3844 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_pauseparam() local
3845 struct hclge_dev *hdev = vport->back; in hclge_get_pauseparam()
3873 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_ksettings_an_result() local
3874 struct hclge_dev *hdev = vport->back; in hclge_get_ksettings_an_result()
3886 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_media_type() local
3887 struct hclge_dev *hdev = vport->back; in hclge_get_media_type()
3896 struct hclge_vport *vport = hclge_get_vport(handle); in hclge_get_mdix_mode() local
3897 struct hclge_dev *hdev = vport->back; in hclge_get_mdix_mode()
3946 struct hclge_vport *vport; in hclge_init_client_instance() local
3950 vport = &hdev->vport[i]; in hclge_init_client_instance()
3956 vport->nic.client = client; in hclge_init_client_instance()
3957 ret = client->ops->init_instance(&vport->nic); in hclge_init_client_instance()
3965 ret = hclge_init_roce_base_info(vport); in hclge_init_client_instance()
3969 ret = rc->ops->init_instance(&vport->roce); in hclge_init_client_instance()
3977 vport->nic.client = client; in hclge_init_client_instance()
3979 ret = client->ops->init_instance(&vport->nic); in hclge_init_client_instance()
3987 vport->roce.client = client; in hclge_init_client_instance()
3991 ret = hclge_init_roce_base_info(vport); in hclge_init_client_instance()
3995 ret = client->ops->init_instance(&vport->roce); in hclge_init_client_instance()
4011 struct hclge_vport *vport; in hclge_uninit_client_instance() local
4015 vport = &hdev->vport[i]; in hclge_uninit_client_instance()
4017 hdev->roce_client->ops->uninit_instance(&vport->roce, in hclge_uninit_client_instance()
4020 vport->roce.client = NULL; in hclge_uninit_client_instance()
4025 client->ops->uninit_instance(&vport->nic, 0); in hclge_uninit_client_instance()
4027 vport->nic.client = NULL; in hclge_uninit_client_instance()