All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Cong Wang <xiyou.wangcong@gmail.com>, Martin T <m4rtntns@gmail.com>
Subject: Re: Why is NIC driver queue depth driver dependent when it allocates system memory?
Date: Sat, 1 Feb 2020 20:14:41 +0100	[thread overview]
Message-ID: <20200201191441.GC23638@unicorn.suse.cz> (raw)
In-Reply-To: <CAM_iQpUcGr-MHhWBxhL01O-nxWg1NPM8siEPkYgckyDT+Ku3gA@mail.gmail.com>

On Sat, Feb 01, 2020 at 11:08:37AM -0800, Cong Wang wrote:
> On Thu, Jan 30, 2020 at 5:03 AM Martin T <m4rtntns@gmail.com> wrote:
> >
> > 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.

Michal

  reply	other threads:[~2020-02-01 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 13:02 Why is NIC driver queue depth driver dependent when it allocates system memory? Martin T
2020-01-30 16:56 ` Jakub Kicinski
2020-01-31 14:45   ` Martin T
2020-02-01 19:08 ` Cong Wang
2020-02-01 19:14   ` Michal Kubecek [this message]
2020-02-01 19:51     ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200201191441.GC23638@unicorn.suse.cz \
    --to=mkubecek@suse.cz \
    --cc=m4rtntns@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.