Subject: Re: [PATCH v4] net: Introduce realloc_netdev_mq()

From: Eric Dumazet <[email-masked]>
Date: Thu, 03 Dec 2009 22:51:25 +0100

David Miller a écrit :
> From: Eric Dumazet <[email-masked]>
> Date: Thu, 03 Dec 2009 22:29:42 +0100
> 
>> Nice patch, thanks :)
>>
>> Acked-by: Eric Dumazet <[email-masked]>
> 
> I like it too, but please resubmit once we have at least
> one example user submitted.
> 

I successfully tested following patch.

Thanks !

[PATCH] ixgbe: Use realloc_netdev_mq() helper

Instead of 128 tx queues, we can cap the tx queue number to what driver really uses.

Signed-off-by: Eric Dumazet <[email-masked]>
---

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 9ba506f..e524d0d 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3306,7 +3306,7 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
 
 done:
 	/* Notify the stack of the (possibly) reduced Tx Queue count. */
-	adapter->netdev->real_num_tx_queues = adapter->num_tx_queues;
+	realloc_netdev_mq(adapter->netdev, adapter->num_tx_queues);
 }
 
 static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,