[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180316152339.795876734@linuxfoundation.org>
Date: Fri, 16 Mar 2018 16:23:21 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Sunil Goutham <sgoutham@...ium.com>,
cjacob <cjacob@...iumnetworks.com>,
Aleksey Makarov <aleksey.makarov@...ium.com>,
"David S. Miller" <davem@...emloft.net>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.15 060/128] net: thunderx: Set max queue count taking XDP_TX into account
4.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sunil Goutham <sgoutham@...ium.com>
[ Upstream commit 87de083857aa269fb171ef0b39696b2888361c58 ]
on T81 there are only 4 cores, hence setting max queue count to 4
would leave nothing for XDP_TX. This patch fixes this by doubling
max queue count in above scenarios.
Signed-off-by: Sunil Goutham <sgoutham@...ium.com>
Signed-off-by: cjacob <cjacob@...iumnetworks.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@...ium.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -1833,6 +1833,11 @@ static int nicvf_probe(struct pci_dev *p
nic->pdev = pdev;
nic->pnicvf = nic;
nic->max_queues = qcount;
+ /* If no of CPUs are too low, there won't be any queues left
+ * for XDP_TX, hence double it.
+ */
+ if (!nic->t88)
+ nic->max_queues *= 2;
/* MAP VF's configuration registers */
nic->reg_base = pcim_iomap(pdev, PCI_CFG_REG_BAR_NUM, 0);
Powered by blists - more mailing lists