From a0163693bcc4f78f50c3471dbcacc2ca1394f71f Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Thu, 26 Jul 2018 12:58:06 +0530 Subject: [PATCH] net/cxgbevf: do not allocate control queues 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 Signed-off-by: Rahul Lakkireddy --- 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 f1ca89cec0..4dcad7a23f 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.20.1