* [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account
@ 2017-11-24 12:04 Aleksey Makarov
2017-11-30 14:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Aleksey Makarov @ 2017-11-24 12:04 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, Goutham, Sunil, Robert Richter, Aleksey Makarov,
cjacob, Sunil Goutham, linux-arm-kernel
From: Sunil Goutham <sgoutham@cavium.com>
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@cavium.com>
Signed-off-by: cjacob <cjacob@caviumnetworks.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index b82e28262c57..52b3a6044f85 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -1891,6 +1891,11 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
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);
--
2.15.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account
2017-11-24 12:04 [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account Aleksey Makarov
@ 2017-11-30 14:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-30 14:24 UTC (permalink / raw)
To: aleksey.makarov
Cc: netdev, linux-kernel, Sunil.Goutham, rric, cjacob, sgoutham,
linux-arm-kernel
From: Aleksey Makarov <aleksey.makarov@cavium.com>
Date: Fri, 24 Nov 2017 15:04:03 +0300
> From: Sunil Goutham <sgoutham@cavium.com>
>
> 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@cavium.com>
> Signed-off-by: cjacob <cjacob@caviumnetworks.com>
> Signed-off-by: Aleksey Makarov <aleksey.makarov@cavium.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-30 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-24 12:04 [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account Aleksey Makarov
2017-11-30 14:24 ` David Miller
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).