From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 769ADC33CB3 for ; Sat, 1 Feb 2020 19:14:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47F2520674 for ; Sat, 1 Feb 2020 19:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgBATOn (ORCPT ); Sat, 1 Feb 2020 14:14:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:58592 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbgBATOn (ORCPT ); Sat, 1 Feb 2020 14:14:43 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BCB89AC44; Sat, 1 Feb 2020 19:14:41 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 63CD3E0095; Sat, 1 Feb 2020 20:14:41 +0100 (CET) Date: Sat, 1 Feb 2020 20:14:41 +0100 From: Michal Kubecek To: netdev@vger.kernel.org Cc: Cong Wang , Martin T Subject: Re: Why is NIC driver queue depth driver dependent when it allocates system memory? Message-ID: <20200201191441.GC23638@unicorn.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Feb 01, 2020 at 11:08:37AM -0800, Cong Wang wrote: > On Thu, Jan 30, 2020 at 5:03 AM Martin T 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