Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e96fbf2 authored by Shreyas Bhatewara's avatar Shreyas Bhatewara Committed by David S. Miller
Browse files

vmxnet3: Dont allocate extra MSI-x vectors



In case of single tx and rx queues, three MSI-x vectors are allocated instead
of two. This patch fixes that.

Signed-off-by: default avatarShreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 83d0feff
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2712,7 +2712,7 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
			break;
			break;
		} else {
		} else {
			/* If fails to enable required number of MSI-x vectors
			/* If fails to enable required number of MSI-x vectors
			 * try enabling 3 of them. One each for rx, tx and event
			 * try enabling minimum number of vectors required.
			 */
			 */
			vectors = vector_threshold;
			vectors = vector_threshold;
			printk(KERN_ERR "Failed to enable %d MSI-X for %s, try"
			printk(KERN_ERR "Failed to enable %d MSI-X for %s, try"
@@ -2774,7 +2774,7 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
		 */
		 */
		if (err == VMXNET3_LINUX_MIN_MSIX_VECT) {
		if (err == VMXNET3_LINUX_MIN_MSIX_VECT) {
			if (adapter->share_intr != VMXNET3_INTR_BUDDYSHARE
			if (adapter->share_intr != VMXNET3_INTR_BUDDYSHARE
			    || adapter->num_rx_queues != 2) {
			    || adapter->num_rx_queues != 1) {
				adapter->share_intr = VMXNET3_INTR_TXSHARE;
				adapter->share_intr = VMXNET3_INTR_TXSHARE;
				printk(KERN_ERR "Number of rx queues : 1\n");
				printk(KERN_ERR "Number of rx queues : 1\n");
				adapter->num_rx_queues = 1;
				adapter->num_rx_queues = 1;
+3 −3
Original line number Original line Diff line number Diff line
@@ -68,10 +68,10 @@
/*
/*
 * Version numbers
 * Version numbers
 */
 */
#define VMXNET3_DRIVER_VERSION_STRING   "1.0.16.0-k"
#define VMXNET3_DRIVER_VERSION_STRING   "1.0.25.0-k"


/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
#define VMXNET3_DRIVER_VERSION_NUM      0x01001000
#define VMXNET3_DRIVER_VERSION_NUM      0x01001900


#if defined(CONFIG_PCI_MSI)
#if defined(CONFIG_PCI_MSI)
	/* RSS only makes sense if MSI-X is supported. */
	/* RSS only makes sense if MSI-X is supported. */
@@ -289,7 +289,7 @@ struct vmxnet3_rx_queue {


#define VMXNET3_LINUX_MAX_MSIX_VECT     (VMXNET3_DEVICE_MAX_TX_QUEUES + \
#define VMXNET3_LINUX_MAX_MSIX_VECT     (VMXNET3_DEVICE_MAX_TX_QUEUES + \
					 VMXNET3_DEVICE_MAX_RX_QUEUES + 1)
					 VMXNET3_DEVICE_MAX_RX_QUEUES + 1)
#define VMXNET3_LINUX_MIN_MSIX_VECT     3    /* 1 for each : tx, rx and event */
#define VMXNET3_LINUX_MIN_MSIX_VECT     2 /* 1 for tx-rx pair and 1 for event */




struct vmxnet3_intr {
struct vmxnet3_intr {