Lines Matching refs:hwdev
234 if (HINIC_IS_VF(nic_dev->hwdev)) { in hinic_xstats_calc_num()
278 hinic_dev_handle_aeq_event(nic_dev->hwdev, param); in hinic_dev_interrupt_handler()
300 nic_io = nic_dev->hwdev->nic_io; in hinic_dev_configure()
386 struct hinic_hwdev *hwdev; in hinic_rx_queue_setup() local
392 hwdev = nic_dev->hwdev; in hinic_rx_queue_setup()
441 rc = hinic_create_rq(hwdev, queue_idx, rq_depth, socket_id); in hinic_rx_queue_setup()
461 rxq->wq = &hwdev->nic_io->rq_wq[queue_idx]; in hinic_rx_queue_setup()
462 rxq->pi_virt_addr = hwdev->nic_io->qps[queue_idx].rq.pi_virt_addr; in hinic_rx_queue_setup()
491 hinic_destroy_rq(hwdev, queue_idx); in hinic_rx_queue_setup()
543 struct hinic_hwdev *hwdev; in hinic_tx_queue_setup() local
548 hwdev = nic_dev->hwdev; in hinic_tx_queue_setup()
596 rc = hinic_create_sq(hwdev, queue_idx, sq_depth, socket_id); in hinic_tx_queue_setup()
608 txq->wq = &hwdev->nic_io->sq_wq[queue_idx]; in hinic_tx_queue_setup()
609 txq->sq = &hwdev->nic_io->qps[queue_idx].sq; in hinic_tx_queue_setup()
610 txq->cons_idx_addr = hwdev->nic_io->qps[queue_idx].sq.cons_idx_addr; in hinic_tx_queue_setup()
631 hinic_destroy_sq(hwdev, queue_idx); in hinic_tx_queue_setup()
644 struct hinic_hwdev *hwdev; in hinic_reset_tx_queue() local
649 hwdev = nic_dev->hwdev; in hinic_reset_tx_queue()
650 nic_io = hwdev->nic_io; in hinic_reset_tx_queue()
696 err = hinic_get_link_mode(nic_dev->hwdev, in hinic_get_speed_capa()
785 err = hinic_get_mgmt_version(nic_dev->hwdev, fw_ver); in hinic_fw_version_get()
803 err = hinic_set_rx_mode(nic_dev->hwdev, rx_mode_ctrl); in hinic_config_rx_mode()
855 struct hinic_hwdev *nic_hwdev = nic_dev->hwdev; in hinic_priv_get_dev_link_status()
943 ret = hinic_set_port_enable(nic_dev->hwdev, true); in hinic_dev_set_link_up()
966 ret = hinic_set_port_enable(nic_dev->hwdev, false); in hinic_dev_set_link_down()
1000 rc = hinic_init_qp_ctxts(nic_dev->hwdev); in hinic_dev_start()
1016 rc = hinic_set_port_mtu(nic_dev->hwdev, nic_dev->mtu_size); in hinic_dev_start()
1032 hinic_set_pf_status(nic_dev->hwdev->hwif, HINIC_PF_STATUS_ACTIVE_FLAG); in hinic_dev_start()
1035 rc = hinic_set_vport_enable(nic_dev->hwdev, true); in hinic_dev_start()
1042 rc = hinic_set_port_enable(nic_dev->hwdev, true); in hinic_dev_start()
1058 (void)hinic_set_vport_enable(nic_dev->hwdev, false); in hinic_dev_start()
1061 hinic_set_pf_status(nic_dev->hwdev->hwif, HINIC_PF_STATUS_INIT); in hinic_dev_start()
1064 (void)hinic_flush_qp_res(nic_dev->hwdev); in hinic_dev_start()
1072 hinic_free_qp_ctxts(nic_dev->hwdev); in hinic_dev_start()
1105 hinic_destroy_rq(nic_dev->hwdev, rxq->q_id); in hinic_rx_queue_release()
1137 hinic_destroy_sq(nic_dev->hwdev, txq->q_id); in hinic_tx_queue_release()
1149 hinic_destroy_rq(nic_dev->hwdev, q_id); in hinic_free_all_rq()
1157 hinic_destroy_sq(nic_dev->hwdev, q_id); in hinic_free_all_sq()
1187 rc = hinic_set_port_enable(nic_dev->hwdev, false); in hinic_dev_stop()
1192 rc = hinic_set_vport_enable(nic_dev->hwdev, false); in hinic_dev_stop()
1202 rc = hinic_rx_tx_flush(nic_dev->hwdev); in hinic_dev_stop()
1211 hinic_free_qp_ctxts(nic_dev->hwdev); in hinic_dev_stop()
1231 hinic_set_msix_state(nic_dev->hwdev, 0, HINIC_MSIX_DISABLE); in hinic_disable_interrupt()
1308 err = hinic_get_vport_stats(nic_dev->hwdev, &vport_stats); in hinic_dev_stats_get()
1381 ret = hinic_clear_vport_stats(nic_dev->hwdev); in hinic_dev_stats_reset()
1413 if (hinic_func_type(nic_dev->hwdev) != TYPE_VF) { in hinic_dev_xstats_reset()
1414 ret = hinic_clear_phy_port_stats(nic_dev->hwdev); in hinic_dev_xstats_reset()
1455 rc = hinic_get_default_mac(nic_dev->hwdev, addr_bytes); in hinic_init_mac_addr()
1464 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_init_mac_addr()
1465 rc = hinic_set_mac(nic_dev->hwdev, in hinic_init_mac_addr()
1482 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_delete_mc_addr_list()
1488 hinic_del_mac(nic_dev->hwdev, nic_dev->mc_list[i].addr_bytes, in hinic_delete_mc_addr_list()
1512 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_deinit_mac_addr()
1518 rc = hinic_del_mac(nic_dev->hwdev, in hinic_deinit_mac_addr()
1551 ret = hinic_set_port_mtu(nic_dev->hwdev, mtu); in hinic_dev_set_mtu()
1617 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_vlan_filter_set()
1627 err = hinic_add_remove_vlan(nic_dev->hwdev, vlan_id, in hinic_vlan_filter_set()
1637 err = hinic_add_remove_vlan(nic_dev->hwdev, vlan_id, in hinic_vlan_filter_set()
1673 err = hinic_config_vlan_filter(nic_dev->hwdev, on); in hinic_vlan_offload_set()
1695 err = hinic_set_rx_vlan_offload(nic_dev->hwdev, on); in hinic_vlan_offload_set()
1719 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_remove_all_vlanid()
1725 (void)hinic_add_remove_vlan(nic_dev->hwdev, i, func_id, FALSE); in hinic_remove_all_vlanid()
1867 err = hinic_get_pause_info(nic_dev->hwdev, &nic_pause); in hinic_flow_ctrl_get()
1911 err = hinic_set_pause_config(nic_dev->hwdev, nic_pause); in hinic_flow_ctrl_set()
1963 err = hinic_rss_set_template_tbl(nic_dev->hwdev, tmpl_idx, in hinic_rss_hash_update()
1980 err = hinic_set_rss_type(nic_dev->hwdev, tmpl_idx, rss_type); in hinic_rss_hash_update()
1990 (void)hinic_rss_cfg(nic_dev->hwdev, 0, tmpl_idx, 0, prio_tc); in hinic_rss_hash_update()
2019 err = hinic_rss_get_template_tbl(nic_dev->hwdev, tmpl_idx, hashkey); in hinic_rss_conf_get()
2029 err = hinic_get_rss_type(nic_dev->hwdev, tmpl_idx, &rss_type); in hinic_rss_conf_get()
2081 err = hinic_rss_get_indir_tbl(nic_dev->hwdev, tmpl_idx, indirtbl); in hinic_rss_indirtbl_update()
2101 err = hinic_rss_set_indir_tbl(nic_dev->hwdev, tmpl_idx, indirtbl); in hinic_rss_indirtbl_update()
2111 (void)hinic_rss_cfg(nic_dev->hwdev, 0, tmpl_idx, 0, prio_tc); in hinic_rss_indirtbl_update()
2145 err = hinic_rss_get_indir_tbl(nic_dev->hwdev, tmpl_idx, indirtbl); in hinic_rss_indirtbl_query()
2227 err = hinic_get_vport_stats(nic_dev->hwdev, &vport_stats); in hinic_dev_xstats_get()
2239 if (HINIC_IS_VF(nic_dev->hwdev)) in hinic_dev_xstats_get()
2243 err = hinic_get_phy_port_stats(nic_dev->hwdev, &port_stats); in hinic_dev_xstats_get()
2326 if (HINIC_IS_VF(nic_dev->hwdev)) in hinic_dev_xstats_get_names()
2357 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_set_mac_addr()
2358 err = hinic_update_mac(nic_dev->hwdev, nic_dev->default_addr.addr_bytes, in hinic_set_mac_addr()
2393 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_mac_addr_remove()
2394 ret = hinic_del_mac(nic_dev->hwdev, in hinic_mac_addr_remove()
2445 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_mac_addr_add()
2446 ret = hinic_set_mac(nic_dev->hwdev, mac_addr->addr_bytes, 0, func_id); in hinic_mac_addr_add()
2475 func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_set_mc_addr_list()
2484 ret = hinic_set_mac(nic_dev->hwdev, mc_addr_set[i].addr_bytes, in hinic_set_mc_addr_list()
2524 int func_id = hinic_global_func_id(nic_dev->hwdev); in hinic_dev_filter_ctrl()
2552 err = hinic_set_pause_config(nic_dev->hwdev, pause_config); in hinic_set_default_pause_feature()
2577 return hinic_dcb_set_ets(nic_dev->hwdev, up_tc, pg_bw, in hinic_set_default_dcb_feature()
2581 static int hinic_pf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id) in hinic_pf_get_default_cos() argument
2587 valid_cos_bitmap = hwdev->cfg_mgmt->svc_cap.valid_cos_bitmap; in hinic_pf_get_default_cos()
2608 if (!HINIC_IS_VF(nic_dev->hwdev)) { in hinic_init_default_cos()
2609 err = hinic_pf_get_default_cos(nic_dev->hwdev, &cos_id); in hinic_init_default_cos()
2616 err = hinic_vf_get_default_cos(nic_dev->hwdev, &cos_id); in hinic_init_default_cos()
2639 if (hinic_func_type(nic_dev->hwdev) == TYPE_VF) in hinic_set_default_hw_feature()
2652 err = hinic_reset_port_link_cfg(nic_dev->hwdev); in hinic_set_default_hw_feature()
2656 err = hinic_set_link_status_follow(nic_dev->hwdev, in hinic_set_default_hw_feature()
2663 return hinic_set_anti_attack(nic_dev->hwdev, true); in hinic_set_default_hw_feature()
2671 if (hinic_func_type(nic_dev->hwdev) == TYPE_VF) in hinic_card_workmode_check()
2674 rc = hinic_get_board_info(nic_dev->hwdev, &info); in hinic_card_workmode_check()
2751 nic_dev->hwdev = rte_zmalloc("hinic_hwdev", sizeof(*nic_dev->hwdev), in hinic_nic_dev_create()
2753 if (!nic_dev->hwdev) { in hinic_nic_dev_create()
2758 nic_dev->hwdev->pcidev_hdl = RTE_ETH_DEV_TO_PCI(eth_dev); in hinic_nic_dev_create()
2761 rc = hinic_osdep_init(nic_dev->hwdev); in hinic_nic_dev_create()
2769 rc = hinic_hwif_res_init(nic_dev->hwdev); in hinic_nic_dev_create()
2777 rc = init_cfg_mgmt(nic_dev->hwdev); in hinic_nic_dev_create()
2785 rc = hinic_comm_aeqs_init(nic_dev->hwdev); in hinic_nic_dev_create()
2793 rc = hinic_comm_pf_to_mgmt_init(nic_dev->hwdev); in hinic_nic_dev_create()
2801 rc = hinic_comm_func_to_func_init(nic_dev->hwdev); in hinic_nic_dev_create()
2816 rc = hinic_l2nic_reset(nic_dev->hwdev); in hinic_nic_dev_create()
2824 (void)hinic_init_attr_table(nic_dev->hwdev); in hinic_nic_dev_create()
2827 rc = hinic_comm_cmdqs_init(nic_dev->hwdev); in hinic_nic_dev_create()
2835 rc = hinic_activate_hwdev_state(nic_dev->hwdev); in hinic_nic_dev_create()
2843 rc = hinic_init_capability(nic_dev->hwdev); in hinic_nic_dev_create()
2851 if (!hinic_support_nic(nic_dev->hwdev, &nic_dev->nic_cap)) { in hinic_nic_dev_create()
2859 rc = hinic_init_nicio(nic_dev->hwdev); in hinic_nic_dev_create()
2898 hinic_deinit_nicio(nic_dev->hwdev); in hinic_nic_dev_create()
2903 hinic_deactivate_hwdev_state(nic_dev->hwdev); in hinic_nic_dev_create()
2906 hinic_comm_cmdqs_free(nic_dev->hwdev); in hinic_nic_dev_create()
2911 hinic_comm_func_to_func_free(nic_dev->hwdev); in hinic_nic_dev_create()
2914 hinic_comm_pf_to_mgmt_free(nic_dev->hwdev); in hinic_nic_dev_create()
2917 hinic_comm_aeqs_free(nic_dev->hwdev); in hinic_nic_dev_create()
2920 free_cfg_mgmt(nic_dev->hwdev); in hinic_nic_dev_create()
2923 hinic_hwif_res_free(nic_dev->hwdev); in hinic_nic_dev_create()
2926 hinic_osdep_deinit(nic_dev->hwdev); in hinic_nic_dev_create()
2929 rte_free(nic_dev->hwdev); in hinic_nic_dev_create()
2930 nic_dev->hwdev = NULL; in hinic_nic_dev_create()
2940 (void)hinic_set_link_status_follow(nic_dev->hwdev, in hinic_nic_dev_destroy()
2944 hinic_deinit_nicio(nic_dev->hwdev); in hinic_nic_dev_destroy()
2945 hinic_deactivate_hwdev_state(nic_dev->hwdev); in hinic_nic_dev_destroy()
2946 hinic_comm_cmdqs_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2947 hinic_comm_func_to_func_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2948 hinic_comm_pf_to_mgmt_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2949 hinic_comm_aeqs_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2950 free_cfg_mgmt(nic_dev->hwdev); in hinic_nic_dev_destroy()
2951 hinic_hwif_res_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2952 hinic_osdep_deinit(nic_dev->hwdev); in hinic_nic_dev_destroy()
2953 rte_free(nic_dev->hwdev); in hinic_nic_dev_destroy()
2954 nic_dev->hwdev = NULL; in hinic_nic_dev_destroy()
3144 if (HINIC_IS_VF(nic_dev->hwdev)) in hinic_func_init()