Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5132282f authored by Sunil Goutham's avatar Sunil Goutham Committed by Greg Kroah-Hartman
Browse files

net: thunderx: Set max queue count taking XDP_TX into account




[ Upstream commit 87de0838 ]

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: default avatarSunil Goutham <sgoutham@cavium.com>
Signed-off-by: default avatarcjacob <cjacob@caviumnetworks.com>
Signed-off-by: default avatarAleksey Makarov <aleksey.makarov@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ab1fcc7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1832,6 +1832,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);