Lines Matching refs:handle

35 hpi_pfc_tcam_check_completion(hpi_handle_t handle, tcam_op_t op_type)  in hpi_pfc_tcam_check_completion()  argument
44 READ_TCAM_REG_CTL(handle, &tctl.value); in hpi_pfc_tcam_check_completion()
49 READ_TCAM_REG_CTL(handle, &tctl.value); in hpi_pfc_tcam_check_completion()
53 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_check_completion()
62 READ_TCAM_REG_CTL(handle, &tctl.value); in hpi_pfc_tcam_check_completion()
68 READ_TCAM_REG_CTL(handle, &tctl.value); in hpi_pfc_tcam_check_completion()
72 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_check_completion()
78 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_check_completion()
87 hpi_pfc_tcam_entry_read(hpi_handle_t handle, uint32_t location, in hpi_pfc_tcam_entry_read() argument
96 WRITE_TCAM_REG_MASK0(handle, tcam_ptr->mask0); in hpi_pfc_tcam_entry_read()
97 WRITE_TCAM_REG_MASK1(handle, tcam_ptr->mask1); in hpi_pfc_tcam_entry_read()
99 WRITE_TCAM_REG_KEY0(handle, tcam_ptr->key0); in hpi_pfc_tcam_entry_read()
100 WRITE_TCAM_REG_KEY1(handle, tcam_ptr->key1); in hpi_pfc_tcam_entry_read()
106 WRITE_TCAM_REG_CTL(handle, tctl.value); in hpi_pfc_tcam_entry_read()
108 tctl_rv.value = hpi_pfc_tcam_check_completion(handle, TCAM_RWC_MATCH); in hpi_pfc_tcam_entry_read()
117 hpi_pfc_tcam_asc_ram_entry_read(hpi_handle_t handle, in hpi_pfc_tcam_asc_ram_entry_read() argument
127 WRITE_TCAM_REG_CTL(handle, tctl.value); in hpi_pfc_tcam_asc_ram_entry_read()
129 tcam_stat = hpi_pfc_tcam_check_completion(handle, TCAM_RWC_STAT); in hpi_pfc_tcam_asc_ram_entry_read()
132 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_asc_ram_entry_read()
137 READ_TCAM_REG_KEY0(handle, ram_data); in hpi_pfc_tcam_asc_ram_entry_read()
143 hpi_pfc_tcam_asc_ram_entry_write(hpi_handle_t handle, uint32_t location, in hpi_pfc_tcam_asc_ram_entry_write() argument
149 WRITE_TCAM_REG_KEY0(handle, ram_data); in hpi_pfc_tcam_asc_ram_entry_write()
155 HPI_DEBUG_MSG((handle.function, HPI_PFC_CTL, in hpi_pfc_tcam_asc_ram_entry_write()
158 WRITE_TCAM_REG_CTL(handle, tctl.value); in hpi_pfc_tcam_asc_ram_entry_write()
159 tcam_stat = hpi_pfc_tcam_check_completion(handle, TCAM_RWC_STAT); in hpi_pfc_tcam_asc_ram_entry_write()
162 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_asc_ram_entry_write()
171 hpi_pfc_set_config(hpi_handle_t handle, pfc_config_t config) in hpi_pfc_set_config() argument
176 REG_PIO_WRITE64(handle, offset, config.value); in hpi_pfc_set_config()
182 hpi_pfc_get_config(hpi_handle_t handle, pfc_config_t *configp) in hpi_pfc_get_config() argument
187 REG_PIO_READ64(handle, offset, &configp->value); in hpi_pfc_get_config()
193 hpi_pfc_set_tcam_enable(hpi_handle_t handle, boolean_t tcam) in hpi_pfc_set_tcam_enable() argument
200 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_set_tcam_enable()
207 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_set_tcam_enable()
211 hpi_pfc_set_l2_hash(hpi_handle_t handle, boolean_t l2_hash) in hpi_pfc_set_l2_hash() argument
218 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_set_l2_hash()
225 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_set_l2_hash()
229 hpi_pfc_set_tcp_cksum(hpi_handle_t handle, boolean_t cksum) in hpi_pfc_set_tcp_cksum() argument
236 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_set_tcp_cksum()
243 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_set_tcp_cksum()
247 hpi_pfc_set_default_dma(hpi_handle_t handle, uint32_t dma_channel_no) in hpi_pfc_set_default_dma() argument
251 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_set_default_dma()
258 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_set_default_dma()
262 hpi_pfc_mac_addr_enable(hpi_handle_t handle, uint32_t slot) in hpi_pfc_mac_addr_enable() argument
271 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_mac_addr_enable()
281 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_mac_addr_enable()
285 hpi_pfc_mac_addr_disable(hpi_handle_t handle, uint32_t slot) in hpi_pfc_mac_addr_disable() argument
294 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_mac_addr_disable()
304 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_mac_addr_disable()
308 hpi_pfc_set_force_csum(hpi_handle_t handle, boolean_t force) in hpi_pfc_set_force_csum() argument
312 (void) hpi_pfc_get_config(handle, &config); in hpi_pfc_set_force_csum()
319 return (hpi_pfc_set_config(handle, config)); in hpi_pfc_set_force_csum()
323 hpi_pfc_cfg_vlan_table_clear(hpi_handle_t handle) in hpi_pfc_cfg_vlan_table_clear() argument
334 REG_PIO_WRITE64(handle, offset, table_entry.value); in hpi_pfc_cfg_vlan_table_clear()
341 hpi_pfc_cfg_vlan_table_entry_clear(hpi_handle_t handle, vlan_id_t vlan_id) in hpi_pfc_cfg_vlan_table_entry_clear() argument
352 REG_PIO_READ64(handle, offset, (uint64_t *)&vlan_tbl_entry.value); in hpi_pfc_cfg_vlan_table_entry_clear()
358 REG_PIO_WRITE64(handle, offset, vlan_tbl_entry.value); in hpi_pfc_cfg_vlan_table_entry_clear()
364 hpi_pfc_cfg_vlan_table_entry_set(hpi_handle_t handle, vlan_id_t vlan_id) in hpi_pfc_cfg_vlan_table_entry_set() argument
375 REG_PIO_READ64(handle, offset, (uint64_t *)&vlan_tbl_entry.value); in hpi_pfc_cfg_vlan_table_entry_set()
381 REG_PIO_WRITE64(handle, offset, vlan_tbl_entry.value); in hpi_pfc_cfg_vlan_table_entry_set()
387 hpi_pfc_cfg_vlan_control_set(hpi_handle_t handle, boolean_t parity, in hpi_pfc_cfg_vlan_control_set() argument
406 REG_PIO_WRITE64(handle, PFC_VLAN_CTRL, vlan_control.value); in hpi_pfc_cfg_vlan_control_set()
412 hpi_pfc_get_vlan_parity_log(hpi_handle_t handle, pfc_vlan_par_err_log_t *logp) in hpi_pfc_get_vlan_parity_log() argument
417 REG_PIO_READ64(handle, offset, &logp->value); in hpi_pfc_get_vlan_parity_log()
423 hpi_pfc_set_mac_address(hpi_handle_t handle, uint32_t slot, uint64_t address) in hpi_pfc_set_mac_address() argument
441 REG_PIO_WRITE64(handle, offset, addr.value); in hpi_pfc_set_mac_address()
442 REG_PIO_WRITE64(handle, moffset, mask.value); in hpi_pfc_set_mac_address()
444 return (hpi_pfc_mac_addr_enable(handle, slot)); in hpi_pfc_set_mac_address()
448 hpi_pfc_clear_mac_address(hpi_handle_t handle, uint32_t slot) in hpi_pfc_clear_mac_address() argument
457 (void) hpi_pfc_mac_addr_disable(handle, slot); in hpi_pfc_clear_mac_address()
462 REG_PIO_WRITE64(handle, offset, zaddr); in hpi_pfc_clear_mac_address()
463 REG_PIO_WRITE64(handle, moffset, zmask); in hpi_pfc_clear_mac_address()
469 hpi_pfc_clear_multicast_hash_table(hpi_handle_t handle, uint32_t slot) in hpi_pfc_clear_multicast_hash_table() argument
477 REG_PIO_WRITE64(handle, offset, 0ULL); in hpi_pfc_clear_multicast_hash_table()
483 hpi_pfc_set_multicast_hash_table(hpi_handle_t handle, uint32_t slot, in hpi_pfc_set_multicast_hash_table() argument
492 REG_PIO_WRITE64(handle, offset, address); in hpi_pfc_set_multicast_hash_table()
498 hpi_pfc_set_l2_class_slot(hpi_handle_t handle, uint16_t etype, boolean_t valid, in hpi_pfc_set_l2_class_slot() argument
518 REG_PIO_WRITE64(handle, offset, l2_config.value); in hpi_pfc_set_l2_class_slot()
524 hpi_pfc_set_l3_class_config(hpi_handle_t handle, tcam_class_t slot, in hpi_pfc_set_l3_class_config() argument
546 REG_PIO_WRITE64(handle, offset, l3_config.value); in hpi_pfc_set_l3_class_config()
552 hpi_pfc_get_l3_class_config(hpi_handle_t handle, tcam_class_t slot, in hpi_pfc_get_l3_class_config() argument
562 REG_PIO_READ64(handle, offset, &l3_config.value); in hpi_pfc_get_l3_class_config()
578 hpi_pfc_set_tcam_control(hpi_handle_t handle, pfc_tcam_ctrl_t *tcontrolp) in hpi_pfc_set_tcam_control() argument
583 REG_PIO_WRITE64(handle, offset, tcontrolp->value); in hpi_pfc_set_tcam_control()
589 hpi_pfc_tcam_entry_invalidate(hpi_handle_t handle, uint32_t location) in hpi_pfc_tcam_entry_invalidate() argument
594 (void) hpi_pfc_tcam_entry_write(handle, location, &tcam_ptr); in hpi_pfc_tcam_entry_invalidate()
600 hpi_pfc_tcam_invalidate_all(hpi_handle_t handle) in hpi_pfc_tcam_invalidate_all() argument
607 (void) hpi_pfc_set_tcam_control(handle, &tcontrol); in hpi_pfc_tcam_invalidate_all()
608 (void) hpi_pfc_tcam_entry_invalidate(handle, i); in hpi_pfc_tcam_invalidate_all()
615 hpi_pfc_tcam_entry_write(hpi_handle_t handle, uint32_t location, in hpi_pfc_tcam_entry_write() argument
621 WRITE_TCAM_REG_MASK0(handle, tcam_ptr->mask0); in hpi_pfc_tcam_entry_write()
622 WRITE_TCAM_REG_MASK1(handle, tcam_ptr->mask1); in hpi_pfc_tcam_entry_write()
624 WRITE_TCAM_REG_KEY0(handle, tcam_ptr->key0); in hpi_pfc_tcam_entry_write()
625 WRITE_TCAM_REG_KEY1(handle, tcam_ptr->key1); in hpi_pfc_tcam_entry_write()
627 HPI_DEBUG_MSG((handle.function, HPI_PFC_CTL, in hpi_pfc_tcam_entry_write()
636 HPI_DEBUG_MSG((handle.function, HPI_PFC_CTL, in hpi_pfc_tcam_entry_write()
639 WRITE_TCAM_REG_CTL(handle, tctl.value); in hpi_pfc_tcam_entry_write()
641 tcam_stat = hpi_pfc_tcam_check_completion(handle, TCAM_RWC_STAT); in hpi_pfc_tcam_entry_write()
644 HPI_ERROR_MSG((handle.function, HPI_ERR_CTL, in hpi_pfc_tcam_entry_write()
653 hpi_pfc_get_tcam_parity_log(hpi_handle_t handle, pfc_tcam_par_err_log_t *logp) in hpi_pfc_get_tcam_parity_log() argument
658 REG_PIO_READ64(handle, offset, &logp->value); in hpi_pfc_get_tcam_parity_log()
664 hpi_pfc_get_tcam_auto_init(hpi_handle_t handle, pfc_auto_init_t *autoinitp) in hpi_pfc_get_tcam_auto_init() argument
669 REG_PIO_READ64(handle, offset, &autoinitp->value); in hpi_pfc_get_tcam_auto_init()
675 hpi_pfc_set_tcp_control_discard(hpi_handle_t handle, boolean_t discard) in hpi_pfc_set_tcp_control_discard() argument
683 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_discard()
690 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_discard()
696 hpi_pfc_set_tcp_control_fin(hpi_handle_t handle, boolean_t fin) in hpi_pfc_set_tcp_control_fin() argument
704 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_fin()
711 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_fin()
716 hpi_pfc_set_tcp_control_syn(hpi_handle_t handle, boolean_t syn) in hpi_pfc_set_tcp_control_syn() argument
724 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_syn()
731 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_syn()
736 hpi_pfc_set_tcp_control_rst(hpi_handle_t handle, boolean_t rst) in hpi_pfc_set_tcp_control_rst() argument
744 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_rst()
751 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_rst()
756 hpi_pfc_set_tcp_control_psh(hpi_handle_t handle, boolean_t push) in hpi_pfc_set_tcp_control_psh() argument
764 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_psh()
771 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_psh()
776 hpi_pfc_set_tcp_control_ack(hpi_handle_t handle, boolean_t ack) in hpi_pfc_set_tcp_control_ack() argument
784 REG_PIO_READ64(handle, offset, &tcp.value); in hpi_pfc_set_tcp_control_ack()
791 REG_PIO_WRITE64(handle, offset, tcp.value); in hpi_pfc_set_tcp_control_ack()
796 hpi_pfc_set_hash_seed_value(hpi_handle_t handle, uint32_t seed) in hpi_pfc_set_hash_seed_value() argument
805 REG_PIO_WRITE64(handle, offset, src_hash_seed.value); in hpi_pfc_set_hash_seed_value()
811 hpi_pfc_get_interrupt_status(hpi_handle_t handle, pfc_int_status_t *statusp) in hpi_pfc_get_interrupt_status() argument
816 REG_PIO_READ64(handle, offset, &statusp->value); in hpi_pfc_get_interrupt_status()
822 hpi_pfc_clear_interrupt_status(hpi_handle_t handle) in hpi_pfc_clear_interrupt_status() argument
827 REG_PIO_WRITE64(handle, offset, HXGE_PFC_INT_STATUS_CLEAR); in hpi_pfc_clear_interrupt_status()
833 hpi_pfc_set_interrupt_mask(hpi_handle_t handle, boolean_t drop, in hpi_pfc_set_interrupt_mask() argument
857 REG_PIO_WRITE64(handle, offset, mask.value); in hpi_pfc_set_interrupt_mask()
863 hpi_pfc_get_drop_log(hpi_handle_t handle, pfc_drop_log_t *logp) in hpi_pfc_get_drop_log() argument
868 REG_PIO_READ64(handle, offset, &logp->value); in hpi_pfc_get_drop_log()
874 hpi_pfc_set_drop_log_mask(hpi_handle_t handle, boolean_t vlan_drop, in hpi_pfc_set_drop_log_mask() argument
895 REG_PIO_WRITE64(handle, offset, log.value); in hpi_pfc_set_drop_log_mask()
901 hpi_pfc_get_bad_csum_counter(hpi_handle_t handle, uint64_t *countp) in hpi_pfc_get_bad_csum_counter() argument
906 REG_PIO_READ64(handle, offset, countp); in hpi_pfc_get_bad_csum_counter()
912 hpi_pfc_get_drop_counter(hpi_handle_t handle, uint64_t *countp) in hpi_pfc_get_drop_counter() argument
917 REG_PIO_READ64(handle, offset, countp); in hpi_pfc_get_drop_counter()
923 hpi_pfc_get_number_mac_addrs(hpi_handle_t handle, uint32_t *n_of_addrs) in hpi_pfc_get_number_mac_addrs() argument
925 HXGE_REG_RD32(handle, HCR_REG + HCR_N_MAC_ADDRS, n_of_addrs); in hpi_pfc_get_number_mac_addrs()
930 hpi_pfc_mac_addr_get_i(hpi_handle_t handle, uint8_t *data, int slot) in hpi_pfc_mac_addr_get_i() argument
942 HXGE_REG_RD32(handle, HCR_REG + HCR_ADDR_LO + slot * step, &addr_lo); in hpi_pfc_mac_addr_get_i()
943 HXGE_REG_RD32(handle, HCR_REG + HCR_ADDR_HI + slot * step, &addr_hi); in hpi_pfc_mac_addr_get_i()
956 hpi_pfc_num_macs_get(hpi_handle_t handle, uint8_t *data) in hpi_pfc_num_macs_get() argument
963 (void) hpi_pfc_mac_addr_get_i(handle, addr, i); in hpi_pfc_num_macs_get()