DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: ferruh.yigit@intel.com
Cc: Harish Patil <harish.patil@cavium.com>,
	dev@dpdk.org, Dept-EngDPDKDev@cavium.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/3] net/qede: fix to reject config with no Rx queue
Date: Wed, 13 Dec 2017 22:36:02 -0800	[thread overview]
Message-ID: <1513233363-4241-3-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

  parent reply	other threads:[~2017-12-14  6:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 20:35 [dpdk-dev] [PATCH 0/5] net/qede: add enhancements and fixes Rasesh Mody
2017-11-24 20:35 ` [dpdk-dev] [PATCH 1/5] net/qede: fix to enable LRO over tunnels Rasesh Mody
2017-11-24 20:35 ` [dpdk-dev] [PATCH 2/5] examples/kni: add optional parameter to enable LRO Rasesh Mody
2017-12-04 23:25   ` Ferruh Yigit
2017-12-05  6:05     ` Shahaf Shuler
2017-12-05 19:43       ` Patil, Harish
2017-12-05 19:42     ` Patil, Harish
2017-11-24 20:35 ` [dpdk-dev] [PATCH 3/5] net/qede: fix to reject config with no Rx queue Rasesh Mody
2017-11-24 20:35 ` [dpdk-dev] [PATCH 4/5] app/testpmd: add configuration for udp port tunnel type Rasesh Mody
2017-12-07  0:38   ` Ferruh Yigit
2017-12-07 18:18     ` Shaikh, Shahed
2017-11-24 20:35 ` [dpdk-dev] [PATCH 5/5] net/qede: add support for GENEVE tunneling offload Rasesh Mody
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 0/3] net/qede: add enhancements and fixes Rasesh Mody
2017-12-15 21:05   ` Ferruh Yigit
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 1/3] net/qede: fix to enable LRO over tunnels Rasesh Mody
2017-12-14  6:36 ` Rasesh Mody [this message]
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 3/3] net/qede: add support for GENEVE tunneling offload Rasesh Mody
2017-12-15 21:01   ` Ferruh Yigit
2017-12-15 21:12     ` Mody, Rasesh
2017-12-16  0:19       ` Ferruh Yigit
2017-12-16  0:42         ` Mody, Rasesh

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=1513233363-4241-3-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).