From: Harish Patil Date: Thu, 14 Dec 2017 06:36:02 +0000 (-0800) Subject: net/qede: fix to reject config with no Rx queue X-Git-Tag: spdx-start~567 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e60644c4420c47fa196c0c947a6c6e5891d167d0;p=dpdk.git net/qede: fix to reject config with no Rx queue 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@dpdk.org Signed-off-by: Harish Patil --- diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index cc473d61a5..0128cec8a5 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;