Lines Matching full:vectors

729  * ixgbe_acquire_msix_vectors - acquire MSI-X vectors
733 * return a negative error code if unable to acquire MSI-X vectors for any
739 int i, vectors, vector_threshold; in ixgbe_acquire_msix_vectors() local
744 vectors = max(adapter->num_rx_queues, adapter->num_tx_queues); in ixgbe_acquire_msix_vectors()
745 vectors = max(vectors, adapter->num_xdp_queues); in ixgbe_acquire_msix_vectors()
747 /* It is easy to be greedy for MSI-X vectors. However, it really in ixgbe_acquire_msix_vectors()
748 * doesn't do much good if we have a lot more vectors than CPUs. We'll in ixgbe_acquire_msix_vectors()
750 * of vectors as there are CPUs. in ixgbe_acquire_msix_vectors()
752 vectors = min_t(int, vectors, num_online_cpus()); in ixgbe_acquire_msix_vectors()
754 /* Some vectors are necessary for non-queue interrupts */ in ixgbe_acquire_msix_vectors()
755 vectors += NON_Q_VECTORS; in ixgbe_acquire_msix_vectors()
763 vectors = min_t(int, vectors, hw->mac.max_msix_vectors); in ixgbe_acquire_msix_vectors()
765 /* We want a minimum of two MSI-X vectors for (1) a TxQ[0] + RxQ[0] in ixgbe_acquire_msix_vectors()
770 adapter->msix_entries = kcalloc(vectors, in ixgbe_acquire_msix_vectors()
776 for (i = 0; i < vectors; i++) in ixgbe_acquire_msix_vectors()
779 vectors = pci_enable_msix_range(adapter->pdev, adapter->msix_entries, in ixgbe_acquire_msix_vectors()
780 vector_threshold, vectors); in ixgbe_acquire_msix_vectors()
782 if (vectors < 0) { in ixgbe_acquire_msix_vectors()
783 /* A negative count of allocated vectors indicates an error in in ixgbe_acquire_msix_vectors()
784 * acquiring within the specified range of MSI-X vectors in ixgbe_acquire_msix_vectors()
787 vectors); in ixgbe_acquire_msix_vectors()
793 return vectors; in ixgbe_acquire_msix_vectors()
796 /* we successfully allocated some number of vectors within our in ixgbe_acquire_msix_vectors()
801 /* Adjust for only the vectors we'll use, which is minimum in ixgbe_acquire_msix_vectors()
802 * of max_q_vectors, or the number of vectors we were allocated. in ixgbe_acquire_msix_vectors()
804 vectors -= NON_Q_VECTORS; in ixgbe_acquire_msix_vectors()
805 adapter->num_q_vectors = min_t(int, vectors, adapter->max_q_vectors); in ixgbe_acquire_msix_vectors()
1050 * ixgbe_alloc_q_vectors - Allocate memory for interrupt vectors
1135 * ixgbe_free_q_vectors - Free memory allocated for interrupt vectors
1249 e_dev_err("Unable to allocate memory for queue vectors\n"); in ixgbe_init_interrupt_scheme()