[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57395CED.1090200@oracle.com>
Date: Mon, 16 May 2016 13:38:53 +0800
From: ethan zhao <ethan.zhao@...cle.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
shannon.nelson@...el.com, carolyn.wyborny@...el.com,
donald.c.skidmore@...el.com, bruce.w.allan@...el.com,
john.ronciak@...el.com, mitch.a.williams@...el.com,
intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, ethan.kernel@...il.com
Subject: Re: [PATCH] ixgbe: take online CPU number as MQ max limit when
alloc_etherdev_mq()
Thanks for your reviewing.
Ethan
On 2016/5/13 20:52, Sergei Shtylyov wrote:
> Hello.
>
> On 5/13/2016 8:56 AM, Ethan Zhao wrote:
>
>> Allocating 64 Tx/Rx as default doesn't benefit perfomrnace when less
>
> Performance.
>
>> CPUs were assigned. especially when DCB is enabled, so we should take
>> num_online_cpus() as top limit, and aslo to make sure every TC has
>
> Also.
>
>> at least one queue, take the MAX_TRAFFIC_CLASS as bottom limit of queues
>> number.
>>
>> Signed-off-by: Ethan Zhao <ethan.zhao@...cle.com>
>> ---
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> index 7df3fe2..1f9769c 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -9105,6 +9105,10 @@ static int ixgbe_probe(struct pci_dev *pdev,
>> const struct pci_device_id *ent)
>> indices = IXGBE_MAX_RSS_INDICES;
>> #endif
>> }
>> + /* Don't allocate too more queues than online cpus number */
>
> "Too" not needed here. CPUs.
>
>> + indices = min_t(int, indices, num_online_cpus());
>> + /* To make sure TC works, allocate at least 1 queue per TC */
>> + indices = max_t(int, indices, MAX_TRAFFIC_CLASS);
>>
>> netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);
>> if (!netdev) {
>
> MBR, Sergei
>
>
Powered by blists - more mailing lists