Lines Matching +full:negative +full:- +full:phase

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2015-2023 Amazon.com, Inc. or its affiliates.
156 u8 phase; member
200 u8 phase; member
212 u8 phase; member
224 u8 phase; member
280 u8 phase; member
304 /* PHC shared memory - virtual address */
329 /* PHC shared memory - physical address */
469 /* ena_com_mmio_reg_read_request_init - Init the mmio reg read mechanism
476 * @return - 0 on success, negative value on failure.
480 /* ena_com_phc_init - Allocate and initialize PHC feature
483 * @return - 0 on success, negative value on failure
487 /* ena_com_phc_supported - Return if PHC feature is supported by the device
490 * @return - supported or not
494 /* ena_com_phc_config - Configure PHC feature
498 * @return - 0 on success, negative value on failure
502 /* ena_com_phc_destroy - Destroy PHC feature
507 /* ena_com_phc_get_timestamp - Retrieve PHC timestamp
510 * @return - 0 on success, negative value on failure
514 /* ena_com_phc_get_error_bound - Retrieve cached PHC error bound
517 * @return - 0 on success, negative value on failure
521 /* ena_com_set_mmio_read_mode - Enable/disable the indirect mmio reg read mechanism
528 /* ena_com_mmio_reg_read_request_write_dev_addr - Write the mmio reg read return
534 /* ena_com_mmio_reg_read_request_destroy - Destroy the mmio reg read mechanism
539 /* ena_com_admin_init - Init the admin and the async queues
546 * @return - 0 on success, negative value on failure.
551 /* ena_com_admin_destroy - Destroy the admin and the async events queues.
560 /* ena_com_dev_reset - Perform device FLR to the device.
564 * @return - 0 on success, negative value on failure.
569 /* ena_com_create_io_queue - Create io queue.
571 * @ctx - create context structure
575 * @return - 0 on success, negative value on failure.
580 /* ena_com_destroy_io_queue - Destroy IO queue with the queue id - qid.
582 * @qid - the caller virtual queue id.
586 /* ena_com_get_io_handlers - Return the io queue handlers
588 * @qid - the caller virtual queue id.
589 * @io_sq - IO submission queue handler
590 * @io_cq - IO completion queue handler.
592 * @return - 0 on success, negative value on failure.
598 /* ena_com_admin_aenq_enable - ENAble asynchronous event notifications
605 /* ena_com_set_admin_running_state - Set the state of the admin queue
612 /* ena_com_get_admin_running_state - Get the admin queue state
617 * @return - current polling mode (enable/disable)
621 /* ena_com_set_admin_polling_mode - Set the admin completion queue polling mode
629 /* ena_com_get_admin_polling_mode - Get the admin completion queue polling mode
641 /* ena_com_set_admin_auto_polling_mode - Enable autoswitch to polling mode
652 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
658 * @note: Should be called after MSI-X interrupt.
662 /* ena_com_aenq_intr_handler - AENQ interrupt handler
670 /* ena_com_aenq_has_keep_alive - Retrieve if there is a keep alive notification in the aenq
676 * @return - true if there is a keep alive notification in the aenq or false otherwise
680 /* ena_com_abort_admin_commands - Abort all the outstanding admin commands.
689 /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
696 /* ena_com_validate_version - Validate the device parameters
704 * @return - 0 on success negative value otherwise.
708 /* ena_com_get_link_params - Retrieve physical link parameters.
713 * like speed, auto-negotiation and full duplex support.
715 * @return - 0 on Success negative value otherwise.
720 /* ena_com_get_dma_width - Retrieve physical dma address width the device
726 * @return: > 0 on Success and negative value otherwise.
730 /* ena_com_set_aenq_config - Set aenq groups configurations
736 * @return: 0 on Success and negative value otherwise.
740 /* ena_com_get_dev_attr_feat - Get device features
744 * @return: 0 on Success and negative value otherwise.
749 /* ena_com_get_dev_basic_stats - Get device basic statistics
753 * @return: 0 on Success and negative value otherwise.
758 /* ena_com_get_eni_stats - Get extended network interface statistics
762 * @return: 0 on Success and negative value otherwise.
767 /* ena_com_get_ena_srd_info - Get ENA SRD network interface statistics
771 * @return: 0 on Success and negative value otherwise.
776 /* ena_com_get_customer_metrics - Get customer metrics for network interface
781 * @return: 0 on Success and negative value otherwise.
785 /* ena_com_set_dev_mtu - Configure the device mtu.
789 * @return: 0 on Success and negative value otherwise.
793 /* ena_com_get_offload_settings - Retrieve the device offloads capabilities
797 * @return: 0 on Success and negative value otherwise.
802 /* ena_com_rss_init - Init RSS
810 * @return: 0 on Success and negative value otherwise.
814 /* ena_com_rss_destroy - Destroy rss
821 /* ena_com_get_current_hash_function - Get RSS hash function
829 /* ena_com_fill_hash_function - Fill RSS hash function
841 * @return: 0 on Success and negative value otherwise.
847 /* ena_com_set_hash_function - Flush the hash function and it dependencies to
856 * @return: 0 on Success and negative value otherwise.
860 /* ena_com_get_hash_function - Retrieve the hash function from the device.
869 * @return: 0 on Success and negative value otherwise.
874 /* ena_com_get_hash_key - Retrieve the hash key
883 * @return: 0 on Success and negative value otherwise.
886 /* ena_com_fill_hash_ctrl - Fill RSS hash control
896 * @return: 0 on Success and negative value otherwise.
902 /* ena_com_set_hash_ctrl - Flush the hash control resources to the device.
909 * @return: 0 on Success and negative value otherwise.
913 /* ena_com_get_hash_ctrl - Retrieve the hash control from the device.
923 * @return: 0 on Success and negative value otherwise.
929 /* ena_com_set_default_hash_ctrl - Set the hash control to a default
937 * @return: 0 on Success and negative value otherwise.
941 /* ena_com_indirect_table_fill_entry - Fill a single entry in the RSS
944 * @entry_idx - indirection table entry.
945 * @entry_value - redirection value
951 * @return: 0 on Success and negative value otherwise.
956 /* ena_com_indirect_table_set - Flush the indirection table to the device.
962 * @return: 0 on Success and negative value otherwise.
966 /* ena_com_indirect_table_get - Retrieve the indirection table from the device.
975 * @return: 0 on Success and negative value otherwise.
979 /* ena_com_allocate_host_info - Allocate host info resources.
982 * @return: 0 on Success and negative value otherwise.
986 /* ena_com_allocate_debug_area - Allocate debug area.
988 * @debug_area_size - debug area size.
990 * @return: 0 on Success and negative value otherwise.
995 /* ena_com_allocate_customer_metrics_buffer - Allocate customer metrics resources.
998 * @return: 0 on Success and negative value otherwise.
1002 /* ena_com_delete_debug_area - Free the debug area resources.
1009 /* ena_com_delete_host_info - Free the host info resources.
1016 /* ena_com_delete_customer_metrics_buffer - Free the customer metrics resources.
1023 /* ena_com_set_host_attributes - Update the device with the host
1027 * @return: 0 on Success and negative value otherwise.
1031 /* ena_com_create_io_cq - Create io completion queue.
1033 * @io_cq - io completion queue handler
1037 * @return - 0 on success, negative value on failure.
1042 /* ena_com_destroy_io_cq - Destroy io completion queue.
1044 * @io_cq - io completion queue handler
1048 * @return - 0 on success, negative value on failure.
1053 /* ena_com_execute_admin_command - Execute admin command
1064 * @return - 0 on success, negative value on failure.
1072 /* ena_com_init_interrupt_moderation - Init interrupt moderation
1075 * @return - 0 on success, negative value on failure.
1079 /* ena_com_interrupt_moderation_supported - Return if interrupt moderation
1082 * @return - supported or not.
1086 /* ena_com_update_nonadaptive_moderation_interval_tx - Update the
1087 * non-adaptive interval in Tx direction.
1091 * @return - 0 on success, negative value on failure.
1096 /* ena_com_update_nonadaptive_moderation_interval_rx - Update the
1097 * non-adaptive interval in Rx direction.
1101 * @return - 0 on success, negative value on failure.
1106 /* ena_com_get_nonadaptive_moderation_interval_tx - Retrieve the
1107 * non-adaptive interval in Tx direction.
1110 * @return - interval in usec
1114 /* ena_com_get_nonadaptive_moderation_interval_rx - Retrieve the
1115 * non-adaptive interval in Rx direction.
1118 * @return - interval in usec
1122 /* ena_com_config_dev_mode - Configure the placement policy of the device.
1132 /* ena_com_get_missing_admin_interrupt - Return if there is a missing admin interrupt
1135 * @return - true if there is a missing admin interrupt or false otherwise
1139 return ena_dev->admin_queue.is_missing_admin_interrupt; in ena_com_get_missing_admin_interrupt()
1142 /* ena_com_io_sq_to_ena_dev - Extract ena_com_dev using contained field io_sq.
1145 * @return - ena_com_dev struct extracted from io_sq
1149 return container_of(io_sq, struct ena_com_dev, io_sq_queues[io_sq->qid]); in ena_com_io_sq_to_ena_dev()
1152 /* ena_com_io_cq_to_ena_dev - Extract ena_com_dev using contained field io_cq.
1155 * @return - ena_com_dev struct extracted from io_sq
1159 return container_of(io_cq, struct ena_com_dev, io_cq_queues[io_cq->qid]); in ena_com_io_cq_to_ena_dev()
1164 return ena_dev->adaptive_coalescing; in ena_com_get_adaptive_moderation_enabled()
1169 ena_dev->adaptive_coalescing = true; in ena_com_enable_adaptive_moderation()
1174 ena_dev->adaptive_coalescing = false; in ena_com_disable_adaptive_moderation()
1177 /* ena_com_get_cap - query whether device supports a capability.
1181 * @return - true if capability is supported or false otherwise
1186 return !!(ena_dev->capabilities & BIT(cap_id)); in ena_com_get_cap()
1189 /* ena_com_get_customer_metric_support - query whether device supports a given customer metric.
1193 * @return - true if customer metric is supported or false otherwise
1198 return !!(ena_dev->customer_metrics.supported_metrics & BIT64(metric_id)); in ena_com_get_customer_metric_support()
1201 /* ena_com_get_customer_metric_count - return the number of supported customer metrics.
1204 * @return - the number of supported customer metrics
1208 return ENA_BITS_PER_U64(ena_dev->customer_metrics.supported_metrics); in ena_com_get_customer_metric_count()
1211 /* ena_com_update_intr_reg - Prepare interrupt register
1216 * @no_moderation_update: 0 - Indicates that any of the TX/RX intervals was
1217 * updated, 1 - otherwise
1227 intr_reg->intr_control = 0; in ena_com_update_intr_reg()
1228 intr_reg->intr_control |= rx_delay_interval & in ena_com_update_intr_reg()
1231 intr_reg->intr_control |= in ena_com_update_intr_reg()
1236 intr_reg->intr_control |= ENA_ETH_IO_INTR_REG_INTR_UNMASK_MASK; in ena_com_update_intr_reg()
1238 intr_reg->intr_control |= in ena_com_update_intr_reg()
1248 size = bounce_buf_ctrl->buffer_size; in ena_com_get_next_bounce_buffer()
1249 buffers_num = bounce_buf_ctrl->buffers_num; in ena_com_get_next_bounce_buffer()
1251 buf = bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1252 (bounce_buf_ctrl->next_to_use++ & (buffers_num - 1)) * size; in ena_com_get_next_bounce_buffer()
1254 prefetchw(bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1255 (bounce_buf_ctrl->next_to_use & (buffers_num - 1)) * size); in ena_com_get_next_bounce_buffer()