lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Nov 2017 15:04:03 +0300
From:   Aleksey Makarov <aleksey.makarov@...ium.com>
To:     netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        "Goutham, Sunil" <Sunil.Goutham@...ium.com>,
        Robert Richter <rric@...nel.org>,
        Aleksey Makarov <aleksey.makarov@...ium.com>,
        cjacob <cjacob@...iumnetworks.com>,
        Sunil Goutham <sgoutham@...ium.com>,
        linux-arm-kernel@...ts.infradead.org
Subject: [PATCH net-next] net: thunderx: Set max queue count taking XDP_TX into account

From: Sunil Goutham <sgoutham@...ium.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@...ium.com>
Signed-off-by: cjacob <cjacob@...iumnetworks.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@...ium.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

Powered by blists - more mailing lists