Thread (6 messages) 6 messages, 4 authors, 2020-02-01

Re: Why is NIC driver queue depth driver dependent when it allocates system memory?

From: Cong Wang <hidden>
Date: 2020-02-01 19:52:05

On Sat, Feb 1, 2020 at 11:14 AM Michal Kubecek [off-list ref] wrote:
On Sat, Feb 01, 2020 at 11:08:37AM -0800, Cong Wang wrote:
quoted
On Thu, Jan 30, 2020 at 5:03 AM Martin T [off-list ref] wrote:
quoted
Hi,

when I read the source code of for example tg3 driver or e1000e
driver, then looks like the driver queue is allocated from system
memory. For example, in e1000_ethtool.c kcalloc() is called to
allocate GFP_KERNEL memory.

If system memory is allocated, then why are there driver-dependent
limits? For example, in my workstation the maximum RX/TX queue for the
NIC using tg3 driver is 511 while maximum RX/TX queue for the NIC
using e1000e driver is 4096:
I doubt memory is a consideration for driver to decide the number
of queues. How many CPU's do you have? At least mellanox driver
uses the number of CPU's to determine the default value. Anyway,
you can change it to whatever you prefer.
Martin was asking about ring sizes, not about number of queues.
Ah, sorry for reading it too quickly.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help