Patchwork [2/2] mlx4: Call alloc_etherdev to allocate RX and TX queues

login
register
mail settings
Submitter Tom Herbert
Date Jan. 10, 2011, 5:36 a.m.
Message ID <alpine.DEB.2.00.1101092123370.3126@pokey.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/78076/
State Accepted
Delegated to: David Miller
Headers show

Comments

Tom Herbert - Jan. 10, 2011, 5:36 a.m.
Changed driver to call alloc_etherdev_mqs so that the number of TX
and RX queues can be set to correct values in the netdev device.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/mlx4/en_netdev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 6d6806b..897f576 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -972,7 +972,8 @@  int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
 	int i;
 	int err;
 
-	dev = alloc_etherdev_mq(sizeof(struct mlx4_en_priv), prof->tx_ring_num);
+	dev = alloc_etherdev_mqs(sizeof(struct mlx4_en_priv),
+	    prof->tx_ring_num, prof->rx_ring_num);
 	if (dev == NULL) {
 		mlx4_err(mdev, "Net device allocation failed\n");
 		return -ENOMEM;