提交 87de0838 编写于 作者: S Sunil Goutham 提交者: David S. Miller

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

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: NSunil Goutham <sgoutham@cavium.com>
Signed-off-by: Ncjacob <cjacob@caviumnetworks.com>
Signed-off-by: NAleksey Makarov <aleksey.makarov@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aa136d0c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册