[dpdk-dev] [PATCH v2 2/3] net/qede: fix to reject config with no Rx queue
Rasesh Mody
rasesh.mody at cavium.com
Thu Dec 14 07:36:02 CET 2017
From: Harish Patil <harish.patil at cavium.com>
The qede firmware expects minimum one RX queue to be created, otherwise
it results in firmware exception. So a check is added to prevent that.
Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable at dpdk.org
Signed-off-by: Harish Patil <harish.patil at cavium.com>
---
drivers/net/qede/qede_ethdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index cc473d6..0128cec 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1233,6 +1233,14 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
}
}
+ /* We need to have min 1 RX queue.There is no min check in
+ * rte_eth_dev_configure(), so we are checking it here.
+ */
+ if (eth_dev->data->nb_rx_queues == 0) {
+ DP_ERR(edev, "Minimum one RX queue is required\n");
+ return -EINVAL;
+ }
+
/* Sanity checks and throw warnings */
if (rxmode->enable_scatter)
eth_dev->data->scattered_rx = 1;
--
1.7.10.3
More information about the dev
mailing list