From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org
Cc: Harish Patil <harish.patil@cavium.com>,
Dept-EngDPDKDev@cavium.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 3/5] net/qede: fix to reject config with no Rx queue
Date: Fri, 24 Nov 2017 12:35:43 -0800 [thread overview]
Message-ID: <1511555745-13793-4-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1511555745-13793-1-git-send-email-rasesh.mody@cavium.com>
From: Harish Patil <harish.patil@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@dpdk.org
Signed-off-by: Harish Patil <harish.patil@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
next prev parent reply other threads:[~2017-11-24 20:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1511555745-13793-1-git-send-email-rasesh.mody@cavium.com>
2017-11-24 20:35 ` [dpdk-stable] [PATCH 1/5] net/qede: fix to enable LRO over tunnels Rasesh Mody
2017-11-24 20:35 ` Rasesh Mody [this message]
2017-12-14 6:36 ` [dpdk-stable] [PATCH v2 1/3] " Rasesh Mody
2017-12-14 6:36 ` [dpdk-stable] [PATCH v2 2/3] net/qede: fix to reject config with no Rx queue Rasesh Mody
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511555745-13793-4-git-send-email-rasesh.mody@cavium.com \
--to=rasesh.mody@cavium.com \
--cc=Dept-EngDPDKDev@cavium.com \
--cc=dev@dpdk.org \
--cc=harish.patil@cavium.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).