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>
374 /* ena_com_mmio_reg_read_request_init - Init the mmio reg read mechanism
381 * @return - 0 on success, negative value on failure.
385 /* ena_com_set_mmio_read_mode - Enable/disable the indirect mmio reg read mechanism
392 /* ena_com_mmio_reg_read_request_write_dev_addr - Write the mmio reg read return
398 /* ena_com_mmio_reg_read_request_destroy - Destroy the mmio reg read mechanism
403 /* ena_com_admin_init - Init the admin and the async queues
410 * @return - 0 on success, negative value on failure.
415 /* ena_com_admin_destroy - Destroy the admin and the async events queues.
424 /* ena_com_dev_reset - Perform device FLR to the device.
428 * @return - 0 on success, negative value on failure.
433 /* ena_com_create_io_queue - Create io queue.
435 * @ctx - create context structure
439 * @return - 0 on success, negative value on failure.
444 /* ena_com_destroy_io_queue - Destroy IO queue with the queue id - qid.
446 * @qid - the caller virtual queue id.
450 /* ena_com_get_io_handlers - Return the io queue handlers
452 * @qid - the caller virtual queue id.
453 * @io_sq - IO submission queue handler
454 * @io_cq - IO completion queue handler.
456 * @return - 0 on success, negative value on failure.
462 /* ena_com_admin_aenq_enable - ENAble asynchronous event notifications
469 /* ena_com_set_admin_running_state - Set the state of the admin queue
476 /* ena_com_get_admin_running_state - Get the admin queue state
481 * @return - current polling mode (enable/disable)
485 /* ena_com_set_admin_polling_mode - Set the admin completion queue polling mode
493 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
499 * @note: Should be called after MSI-X interrupt.
503 /* ena_com_aenq_intr_handler - AENQ interrupt handler
511 /* ena_com_abort_admin_commands - Abort all the outstanding admin commands.
520 /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
527 /* ena_com_validate_version - Validate the device parameters
535 * @return - 0 on success negative value otherwise.
539 /* ena_com_get_link_params - Retrieve physical link parameters.
544 * like speed, auto-negotiation and full duplex support.
546 * @return - 0 on Success negative value otherwise.
551 /* ena_com_get_dma_width - Retrieve physical dma address width the device
557 * @return: > 0 on Success and negative value otherwise.
561 /* ena_com_set_aenq_config - Set aenq groups configurations
567 * @return: 0 on Success and negative value otherwise.
571 /* ena_com_get_dev_attr_feat - Get device features
575 * @return: 0 on Success and negative value otherwise.
580 /* ena_com_get_eni_stats - Get extended network interface statistics
584 * @return: 0 on Success and negative value otherwise.
589 /* ena_com_get_ena_srd_info - Get ENA SRD network interface statistics
593 * @return: 0 on Success and negative value otherwise.
598 /* ena_com_get_customer_metrics - Get customer metrics for network interface
603 * @return: 0 on Success and negative value otherwise.
607 /* ena_com_set_dev_mtu - Configure the device mtu.
611 * @return: 0 on Success and negative value otherwise.
615 /* ena_com_rss_init - Init RSS
623 * @return: 0 on Success and negative value otherwise.
627 /* ena_com_rss_destroy - Destroy rss
634 /* ena_com_get_current_hash_function - Get RSS hash function
642 /* ena_com_fill_hash_function - Fill RSS hash function
654 * @return: 0 on Success and negative value otherwise.
660 /* ena_com_set_hash_function - Flush the hash function and it dependencies to
669 * @return: 0 on Success and negative value otherwise.
673 /* ena_com_get_hash_function - Retrieve the hash function from the device.
682 * @return: 0 on Success and negative value otherwise.
687 /* ena_com_get_hash_key - Retrieve the hash key
696 * @return: 0 on Success and negative value otherwise.
699 /* ena_com_fill_hash_ctrl - Fill RSS hash control
709 * @return: 0 on Success and negative value otherwise.
715 /* ena_com_set_hash_ctrl - Flush the hash control resources to the device.
722 * @return: 0 on Success and negative value otherwise.
726 /* ena_com_get_hash_ctrl - Retrieve the hash control from the device.
736 * @return: 0 on Success and negative value otherwise.
742 /* ena_com_set_default_hash_ctrl - Set the hash control to a default
750 * @return: 0 on Success and negative value otherwise.
754 /* ena_com_indirect_table_fill_entry - Fill a single entry in the RSS
757 * @entry_idx - indirection table entry.
758 * @entry_value - redirection value
764 * @return: 0 on Success and negative value otherwise.
769 /* ena_com_indirect_table_set - Flush the indirection table to the device.
775 * @return: 0 on Success and negative value otherwise.
779 /* ena_com_indirect_table_get - Retrieve the indirection table from the device.
788 * @return: 0 on Success and negative value otherwise.
792 /* ena_com_allocate_host_info - Allocate host info resources.
795 * @return: 0 on Success and negative value otherwise.
799 /* ena_com_allocate_debug_area - Allocate debug area.
801 * @debug_area_size - debug area size.
803 * @return: 0 on Success and negative value otherwise.
808 /* ena_com_allocate_customer_metrics_buffer - Allocate customer metrics resources.
811 * @return: 0 on Success and negative value otherwise.
815 /* ena_com_delete_debug_area - Free the debug area resources.
822 /* ena_com_delete_host_info - Free the host info resources.
829 /* ena_com_delete_customer_metrics_buffer - Free the customer metrics resources.
836 /* ena_com_set_host_attributes - Update the device with the host
840 * @return: 0 on Success and negative value otherwise.
844 /* ena_com_create_io_cq - Create io completion queue.
846 * @io_cq - io completion queue handler
850 * @return - 0 on success, negative value on failure.
855 /* ena_com_destroy_io_cq - Destroy io completion queue.
857 * @io_cq - io completion queue handler
861 * @return - 0 on success, negative value on failure.
866 /* ena_com_execute_admin_command - Execute admin command
877 * @return - 0 on success, negative value on failure.
885 /* ena_com_init_interrupt_moderation - Init interrupt moderation
888 * @return - 0 on success, negative value on failure.
892 /* ena_com_interrupt_moderation_supported - Return if interrupt moderation
895 * @return - supported or not.
899 /* ena_com_update_nonadaptive_moderation_interval_tx - Update the
900 * non-adaptive interval in Tx direction.
904 * @return - 0 on success, negative value on failure.
909 /* ena_com_update_nonadaptive_moderation_interval_rx - Update the
910 * non-adaptive interval in Rx direction.
914 * @return - 0 on success, negative value on failure.
919 /* ena_com_get_nonadaptive_moderation_interval_tx - Retrieve the
920 * non-adaptive interval in Tx direction.
923 * @return - interval in usec
927 /* ena_com_get_nonadaptive_moderation_interval_rx - Retrieve the
928 * non-adaptive interval in Rx direction.
931 * @return - interval in usec
935 /* ena_com_config_dev_mode - Configure the placement policy of the device.
945 /* ena_com_io_sq_to_ena_dev - Extract ena_com_dev using contained field io_sq.
948 * @return - ena_com_dev struct extracted from io_sq
952 return container_of(io_sq, struct ena_com_dev, io_sq_queues[io_sq->qid]); in ena_com_io_sq_to_ena_dev()
955 /* ena_com_io_cq_to_ena_dev - Extract ena_com_dev using contained field io_cq.
958 * @return - ena_com_dev struct extracted from io_sq
962 return container_of(io_cq, struct ena_com_dev, io_cq_queues[io_cq->qid]); in ena_com_io_cq_to_ena_dev()
967 return ena_dev->adaptive_coalescing; in ena_com_get_adaptive_moderation_enabled()
972 ena_dev->adaptive_coalescing = true; in ena_com_enable_adaptive_moderation()
977 ena_dev->adaptive_coalescing = false; in ena_com_disable_adaptive_moderation()
980 /* ena_com_get_cap - query whether device supports a capability.
984 * @return - true if capability is supported or false otherwise
989 return !!(ena_dev->capabilities & BIT(cap_id)); in ena_com_get_cap()
992 /* ena_com_get_customer_metric_support - query whether device supports a given customer metric.
996 * @return - true if customer metric is supported or false otherwise
1001 return !!(ena_dev->customer_metrics.supported_metrics & BIT(metric_id)); in ena_com_get_customer_metric_support()
1004 /* ena_com_get_customer_metric_count - return the number of supported customer metrics.
1007 * @return - the number of supported customer metrics
1011 return hweight64(ena_dev->customer_metrics.supported_metrics); in ena_com_get_customer_metric_count()
1014 /* ena_com_update_intr_reg - Prepare interrupt register
1027 intr_reg->intr_control = 0; in ena_com_update_intr_reg()
1028 intr_reg->intr_control |= rx_delay_interval & in ena_com_update_intr_reg()
1031 intr_reg->intr_control |= in ena_com_update_intr_reg()
1036 intr_reg->intr_control |= ENA_ETH_IO_INTR_REG_INTR_UNMASK_MASK; in ena_com_update_intr_reg()
1044 size = bounce_buf_ctrl->buffer_size; in ena_com_get_next_bounce_buffer()
1045 buffers_num = bounce_buf_ctrl->buffers_num; in ena_com_get_next_bounce_buffer()
1047 buf = bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1048 (bounce_buf_ctrl->next_to_use++ & (buffers_num - 1)) * size; in ena_com_get_next_bounce_buffer()
1050 prefetchw(bounce_buf_ctrl->base_buffer + in ena_com_get_next_bounce_buffer()
1051 (bounce_buf_ctrl->next_to_use & (buffers_num - 1)) * size); in ena_com_get_next_bounce_buffer()