Lines Matching +full:non +full:- +full:negative
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
3 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
11 #include <linux/dma-mapping.h>
367 /* ena_com_mmio_reg_read_request_init - Init the mmio reg read mechanism
374 * @return - 0 on success, negative value on failure.
378 /* ena_com_set_mmio_read_mode - Enable/disable the indirect mmio reg read mechanism
385 /* ena_com_mmio_reg_read_request_write_dev_addr - Write the mmio reg read return
391 /* ena_com_mmio_reg_read_request_destroy - Destroy the mmio reg read mechanism
396 /* ena_com_admin_init - Init the admin and the async queues
403 * @return - 0 on success, negative value on failure.
408 /* ena_com_admin_destroy - Destroy the admin and the async events queues.
417 /* ena_com_dev_reset - Perform device FLR to the device.
421 * @return - 0 on success, negative value on failure.
426 /* ena_com_create_io_queue - Create io queue.
428 * @ctx - create context structure
432 * @return - 0 on success, negative value on failure.
437 /* ena_com_destroy_io_queue - Destroy IO queue with the queue id - qid.
439 * @qid - the caller virtual queue id.
443 /* ena_com_get_io_handlers - Return the io queue handlers
445 * @qid - the caller virtual queue id.
446 * @io_sq - IO submission queue handler
447 * @io_cq - IO completion queue handler.
449 * @return - 0 on success, negative value on failure.
455 /* ena_com_admin_aenq_enable - ENAble asynchronous event notifications
462 /* ena_com_set_admin_running_state - Set the state of the admin queue
469 /* ena_com_get_admin_running_state - Get the admin queue state
474 * @return - current polling mode (enable/disable)
478 /* ena_com_set_admin_polling_mode - Set the admin completion queue polling mode
486 /* ena_com_set_admin_auto_polling_mode - Enable autoswitch to polling mode
497 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
503 * @note: Should be called after MSI-X interrupt.
507 /* ena_com_aenq_intr_handler - AENQ interrupt handler
515 /* ena_com_abort_admin_commands - Abort all the outstanding admin commands.
524 /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
531 /* ena_com_validate_version - Validate the device parameters
539 * @return - 0 on success negative value otherwise.
543 /* ena_com_get_link_params - Retrieve physical link parameters.
548 * like speed, auto-negotiation and full duplex support.
550 * @return - 0 on Success negative value otherwise.
555 /* ena_com_get_dma_width - Retrieve physical dma address width the device
561 * @return: > 0 on Success and negative value otherwise.
565 /* ena_com_set_aenq_config - Set aenq groups configurations
571 * @return: 0 on Success and negative value otherwise.
575 /* ena_com_get_dev_attr_feat - Get device features
579 * @return: 0 on Success and negative value otherwise.
584 /* ena_com_get_dev_basic_stats - Get device basic statistics
588 * @return: 0 on Success and negative value otherwise.
593 /* ena_com_get_eni_stats - Get extended network interface statistics
597 * @return: 0 on Success and negative value otherwise.
602 /* ena_com_set_dev_mtu - Configure the device mtu.
606 * @return: 0 on Success and negative value otherwise.
610 /* ena_com_get_offload_settings - Retrieve the device offloads capabilities
614 * @return: 0 on Success and negative value otherwise.
619 /* ena_com_rss_init - Init RSS
627 * @return: 0 on Success and negative value otherwise.
631 /* ena_com_rss_destroy - Destroy rss
638 /* ena_com_get_current_hash_function - Get RSS hash function
646 /* ena_com_fill_hash_function - Fill RSS hash function
658 * @return: 0 on Success and negative value otherwise.
664 /* ena_com_set_hash_function - Flush the hash function and it dependencies to
673 * @return: 0 on Success and negative value otherwise.
677 /* ena_com_get_hash_function - Retrieve the hash function from the device.
686 * @return: 0 on Success and negative value otherwise.
691 /* ena_com_get_hash_key - Retrieve the hash key
700 * @return: 0 on Success and negative value otherwise.
703 /* ena_com_fill_hash_ctrl - Fill RSS hash control
713 * @return: 0 on Success and negative value otherwise.
719 /* ena_com_set_hash_ctrl - Flush the hash control resources to the device.
726 * @return: 0 on Success and negative value otherwise.
730 /* ena_com_get_hash_ctrl - Retrieve the hash control from the device.
740 * @return: 0 on Success and negative value otherwise.
746 /* ena_com_set_default_hash_ctrl - Set the hash control to a default
754 * @return: 0 on Success and negative value otherwise.
758 /* ena_com_indirect_table_fill_entry - Fill a single entry in the RSS
761 * @entry_idx - indirection table entry.
762 * @entry_value - redirection value
768 * @return: 0 on Success and negative value otherwise.
773 /* ena_com_indirect_table_set - Flush the indirection table to the device.
779 * @return: 0 on Success and negative value otherwise.
783 /* ena_com_indirect_table_get - Retrieve the indirection table from the device.
792 * @return: 0 on Success and negative value otherwise.
796 /* ena_com_allocate_host_info - Allocate host info resources.
799 * @return: 0 on Success and negative value otherwise.
803 /* ena_com_allocate_debug_area - Allocate debug area.
805 * @debug_area_size - debug area size.
807 * @return: 0 on Success and negative value otherwise.
812 /* ena_com_delete_debug_area - Free the debug area resources.
819 /* ena_com_delete_host_info - Free the host info resources.
826 /* ena_com_set_host_attributes - Update the device with the host
830 * @return: 0 on Success and negative value otherwise.
834 /* ena_com_create_io_cq - Create io completion queue.
836 * @io_cq - io completion queue handler
840 * @return - 0 on success, negative value on failure.
845 /* ena_com_destroy_io_cq - Destroy io completion queue.
847 * @io_cq - io completion queue handler
851 * @return - 0 on success, negative value on failure.
856 /* ena_com_execute_admin_command - Execute admin command
867 * @return - 0 on success, negative value on failure.
875 /* ena_com_init_interrupt_moderation - Init interrupt moderation
878 * @return - 0 on success, negative value on failure.
882 /* ena_com_interrupt_moderation_supported - Return if interrupt moderation
885 * @return - supported or not.
889 /* ena_com_update_nonadaptive_moderation_interval_tx - Update the
890 * non-adaptive interval in Tx direction.
894 * @return - 0 on success, negative value on failure.
899 /* ena_com_update_nonadaptive_moderation_interval_rx - Update the
900 * non-adaptive interval in Rx direction.
904 * @return - 0 on success, negative value on failure.
909 /* ena_com_get_nonadaptive_moderation_interval_tx - Retrieve the
910 * non-adaptive interval in Tx direction.
913 * @return - interval in usec
917 /* ena_com_get_nonadaptive_moderation_interval_rx - Retrieve the
918 * non-adaptive interval in Rx direction.
921 * @return - interval in usec
925 /* ena_com_config_dev_mode - Configure the placement policy of the device.
935 /* ena_com_io_sq_to_ena_dev - Extract ena_com_dev using contained field io_sq.
938 * @return - ena_com_dev struct extracted from io_sq
942 return container_of(io_sq, struct ena_com_dev, io_sq_queues[io_sq->qid]); in ena_com_io_sq_to_ena_dev()
945 /* ena_com_io_cq_to_ena_dev - Extract ena_com_dev using contained field io_cq.
948 * @return - ena_com_dev struct extracted from io_sq
952 return container_of(io_cq, struct ena_com_dev, io_cq_queues[io_cq->qid]); in ena_com_io_cq_to_ena_dev()
957 return ena_dev->adaptive_coalescing; in ena_com_get_adaptive_moderation_enabled()
962 ena_dev->adaptive_coalescing = true; in ena_com_enable_adaptive_moderation()
967 ena_dev->adaptive_coalescing = false; in ena_com_disable_adaptive_moderation()
970 /* ena_com_update_intr_reg - Prepare interrupt register
983 intr_reg->intr_control = 0; in ena_com_update_intr_reg()
984 intr_reg->intr_control |= rx_delay_interval & in ena_com_update_intr_reg()
987 intr_reg->intr_control |= in ena_com_update_intr_reg()
992 intr_reg->intr_control |= ENA_ETH_IO_INTR_REG_INTR_UNMASK_MASK; in ena_com_update_intr_reg()
1000 size = bounce_buf_ctrl->buffer_size; in ena_com_get_next_bounce_buffer()
1001 buffers_num = bounce_buf_ctrl->buffers_num; in ena_com_get_next_bounce_buffer()
1003 buf = bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1004 (bounce_buf_ctrl->next_to_use++ & (buffers_num - 1)) * size; in ena_com_get_next_bounce_buffer()
1006 prefetchw(bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1007 (bounce_buf_ctrl->next_to_use & (buffers_num - 1)) * size); in ena_com_get_next_bounce_buffer()