DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/cxgbevf: don't allocate control queues for VFs
@ 2018-07-26  7:28 Rahul Lakkireddy
  2018-08-02  9:25 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Lakkireddy @ 2018-07-26  7:28 UTC (permalink / raw)
  To: dev; +Cc: shaguna, nirranjan, indranil

From: Shagun Agrawal <shaguna@chelsio.com>

Control queues can not be allocated for VFs. So, add check to
only allocate control queues for PFs. This fixes adapter crash
when an attempt is made to allocate control queues for VFs.

Fixes: 3a3aaabc ("net/cxgbe: add control queue to communicate filter requests")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index f1ca89cec..4dcad7a23 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -433,9 +433,11 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
 		if (err)
 			return err;
 		adapter->flags |= FW_QUEUE_BOUND;
-		err = setup_sge_ctrl_txq(adapter);
-		if (err)
-			return err;
+		if (is_pf4(adapter)) {
+			err = setup_sge_ctrl_txq(adapter);
+			if (err)
+				return err;
+		}
 	}
 
 	err = cfg_queue_count(eth_dev);
-- 
2.14.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-02  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26  7:28 [dpdk-dev] [PATCH] net/cxgbevf: don't allocate control queues for VFs Rahul Lakkireddy
2018-08-02  9:25 ` Thomas Monjalon

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).