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>
368 /* ena_com_mmio_reg_read_request_init - Init the mmio reg read mechanism
375 * @return - 0 on success, negative value on failure.
379 /* ena_com_set_mmio_read_mode - Enable/disable the indirect mmio reg read mechanism
386 /* ena_com_mmio_reg_read_request_write_dev_addr - Write the mmio reg read return
392 /* ena_com_mmio_reg_read_request_destroy - Destroy the mmio reg read mechanism
397 /* ena_com_admin_init - Init the admin and the async queues
404 * @return - 0 on success, negative value on failure.
409 /* ena_com_admin_destroy - Destroy the admin and the async events queues.
418 /* ena_com_dev_reset - Perform device FLR to the device.
422 * @return - 0 on success, negative value on failure.
427 /* ena_com_create_io_queue - Create io queue.
429 * @ctx - create context structure
433 * @return - 0 on success, negative value on failure.
438 /* ena_com_destroy_io_queue - Destroy IO queue with the queue id - qid.
440 * @qid - the caller virtual queue id.
444 /* ena_com_get_io_handlers - Return the io queue handlers
446 * @qid - the caller virtual queue id.
447 * @io_sq - IO submission queue handler
448 * @io_cq - IO completion queue handler.
450 * @return - 0 on success, negative value on failure.
456 /* ena_com_admin_aenq_enable - ENAble asynchronous event notifications
463 /* ena_com_set_admin_running_state - Set the state of the admin queue
470 /* ena_com_get_admin_running_state - Get the admin queue state
475 * @return - current polling mode (enable/disable)
479 /* ena_com_set_admin_polling_mode - Set the admin completion queue polling mode
487 /* ena_com_set_admin_auto_polling_mode - Enable autoswitch to polling mode
498 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
504 * @note: Should be called after MSI-X interrupt.
508 /* ena_com_aenq_intr_handler - AENQ interrupt handler
516 /* ena_com_abort_admin_commands - Abort all the outstanding admin commands.
525 /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
532 /* ena_com_validate_version - Validate the device parameters
540 * @return - 0 on success negative value otherwise.
544 /* ena_com_get_link_params - Retrieve physical link parameters.
549 * like speed, auto-negotiation and full duplex support.
551 * @return - 0 on Success negative value otherwise.
556 /* ena_com_get_dma_width - Retrieve physical dma address width the device
562 * @return: > 0 on Success and negative value otherwise.
566 /* ena_com_set_aenq_config - Set aenq groups configurations
572 * @return: 0 on Success and negative value otherwise.
576 /* ena_com_get_dev_attr_feat - Get device features
580 * @return: 0 on Success and negative value otherwise.
585 /* ena_com_get_dev_basic_stats - Get device basic statistics
589 * @return: 0 on Success and negative value otherwise.
594 /* ena_com_get_eni_stats - Get extended network interface statistics
598 * @return: 0 on Success and negative value otherwise.
603 /* ena_com_set_dev_mtu - Configure the device mtu.
607 * @return: 0 on Success and negative value otherwise.
611 /* ena_com_get_offload_settings - Retrieve the device offloads capabilities
615 * @return: 0 on Success and negative value otherwise.
620 /* ena_com_rss_init - Init RSS
628 * @return: 0 on Success and negative value otherwise.
632 /* ena_com_rss_destroy - Destroy rss
639 /* ena_com_get_current_hash_function - Get RSS hash function
647 /* ena_com_fill_hash_function - Fill RSS hash function
659 * @return: 0 on Success and negative value otherwise.
665 /* ena_com_set_hash_function - Flush the hash function and it dependencies to
674 * @return: 0 on Success and negative value otherwise.
678 /* ena_com_get_hash_function - Retrieve the hash function from the device.
687 * @return: 0 on Success and negative value otherwise.
692 /* ena_com_get_hash_key - Retrieve the hash key
701 * @return: 0 on Success and negative value otherwise.
704 /* ena_com_fill_hash_ctrl - Fill RSS hash control
714 * @return: 0 on Success and negative value otherwise.
720 /* ena_com_set_hash_ctrl - Flush the hash control resources to the device.
727 * @return: 0 on Success and negative value otherwise.
731 /* ena_com_get_hash_ctrl - Retrieve the hash control from the device.
741 * @return: 0 on Success and negative value otherwise.
747 /* ena_com_set_default_hash_ctrl - Set the hash control to a default
755 * @return: 0 on Success and negative value otherwise.
759 /* ena_com_indirect_table_fill_entry - Fill a single entry in the RSS
762 * @entry_idx - indirection table entry.
763 * @entry_value - redirection value
769 * @return: 0 on Success and negative value otherwise.
774 /* ena_com_indirect_table_set - Flush the indirection table to the device.
780 * @return: 0 on Success and negative value otherwise.
784 /* ena_com_indirect_table_get - Retrieve the indirection table from the device.
793 * @return: 0 on Success and negative value otherwise.
797 /* ena_com_allocate_host_info - Allocate host info resources.
800 * @return: 0 on Success and negative value otherwise.
804 /* ena_com_allocate_debug_area - Allocate debug area.
806 * @debug_area_size - debug area size.
808 * @return: 0 on Success and negative value otherwise.
813 /* ena_com_delete_debug_area - Free the debug area resources.
820 /* ena_com_delete_host_info - Free the host info resources.
827 /* ena_com_set_host_attributes - Update the device with the host
831 * @return: 0 on Success and negative value otherwise.
835 /* ena_com_create_io_cq - Create io completion queue.
837 * @io_cq - io completion queue handler
841 * @return - 0 on success, negative value on failure.
846 /* ena_com_destroy_io_cq - Destroy io completion queue.
848 * @io_cq - io completion queue handler
852 * @return - 0 on success, negative value on failure.
857 /* ena_com_execute_admin_command - Execute admin command
868 * @return - 0 on success, negative value on failure.
876 /* ena_com_init_interrupt_moderation - Init interrupt moderation
879 * @return - 0 on success, negative value on failure.
883 /* ena_com_interrupt_moderation_supported - Return if interrupt moderation
886 * @return - supported or not.
890 /* ena_com_update_nonadaptive_moderation_interval_tx - Update the
891 * non-adaptive interval in Tx direction.
895 * @return - 0 on success, negative value on failure.
900 /* ena_com_update_nonadaptive_moderation_interval_rx - Update the
901 * non-adaptive interval in Rx direction.
905 * @return - 0 on success, negative value on failure.
910 /* ena_com_get_nonadaptive_moderation_interval_tx - Retrieve the
911 * non-adaptive interval in Tx direction.
914 * @return - interval in usec
918 /* ena_com_get_nonadaptive_moderation_interval_rx - Retrieve the
919 * non-adaptive interval in Rx direction.
922 * @return - interval in usec
926 /* ena_com_config_dev_mode - Configure the placement policy of the device.
936 /* ena_com_io_sq_to_ena_dev - Extract ena_com_dev using contained field io_sq.
939 * @return - ena_com_dev struct extracted from io_sq
943 return container_of(io_sq, struct ena_com_dev, io_sq_queues[io_sq->qid]); in ena_com_io_sq_to_ena_dev()
946 /* ena_com_io_cq_to_ena_dev - Extract ena_com_dev using contained field io_cq.
949 * @return - ena_com_dev struct extracted from io_sq
953 return container_of(io_cq, struct ena_com_dev, io_cq_queues[io_cq->qid]); in ena_com_io_cq_to_ena_dev()
958 return ena_dev->adaptive_coalescing; in ena_com_get_adaptive_moderation_enabled()
963 ena_dev->adaptive_coalescing = true; in ena_com_enable_adaptive_moderation()
968 ena_dev->adaptive_coalescing = false; in ena_com_disable_adaptive_moderation()
971 /* ena_com_get_cap - query whether device supports a capability.
975 * @return - true if capability is supported or false otherwise
980 return !!(ena_dev->capabilities & BIT(cap_id)); in ena_com_get_cap()
983 /* ena_com_update_intr_reg - Prepare interrupt register
996 intr_reg->intr_control = 0; in ena_com_update_intr_reg()
997 intr_reg->intr_control |= rx_delay_interval & in ena_com_update_intr_reg()
1000 intr_reg->intr_control |= in ena_com_update_intr_reg()
1005 intr_reg->intr_control |= ENA_ETH_IO_INTR_REG_INTR_UNMASK_MASK; in ena_com_update_intr_reg()
1013 size = bounce_buf_ctrl->buffer_size; in ena_com_get_next_bounce_buffer()
1014 buffers_num = bounce_buf_ctrl->buffers_num; in ena_com_get_next_bounce_buffer()
1016 buf = bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1017 (bounce_buf_ctrl->next_to_use++ & (buffers_num - 1)) * size; in ena_com_get_next_bounce_buffer()
1019 prefetchw(bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1020 (bounce_buf_ctrl->next_to_use & (buffers_num - 1)) * size); in ena_com_get_next_bounce_buffer()