DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: "Wiles, Keith" <keith.wiles@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	yongwang@vmware.com
Subject: Re: [dpdk-dev] [PATCH] mlx4: use dummy rxqs when a non-pow2 number is requested
Date: Fri, 15 Apr 2016 11:11:19 +0200	[thread overview]
Message-ID: <5710B037.10607@6wind.com> (raw)
In-Reply-To: <E0FC8ACD-EC91-4CC6-BD0B-3E930B6BF101@intel.com>

Hi,

On 03/22/2016 03:27 PM, Wiles, Keith wrote:
> Hi Olivier,
>
>> Hi Keith,
>>
>> On 03/21/2016 06:38 PM, Wiles, Keith wrote:
>>>> On Mar 21, 2016, at 11:10 AM, Olivier Matz <olivier.matz@6wind.com> wrote:
>>>>
>>>> When using RSS, the number of rxqs has to be a power of two.
>>>> This is a problem because there is no API is dpdk that makes
>>>> the application aware of that.
>>>>
>>>> A good compromise is to allow the application to request a
>>>> number of rxqs that is not a power of 2, but having inactive
>>>> queues that will never receive packets. In this configuration,
>>>> a warning will be issued to users to let them know that
>>>> this is not an optimal configuration.
>>>
>>> Not sure I like this solution. I think an error should be returned with a log message instead. What if the next driver needs power of three or must be odd or even number.
>>>
>>> The bigger problem is the application is no longer portable for any given nic configuration.
>>>
>>> We need a method for the application to query the system for these types of information. But as we do not have that API we need to just error the request off.
>>
>>
>> The initial problem is that the driver says "I support a maximum
>> of X queues" and if the application configures a lower number, it
>> gets an error.
>>
>> There is no API in DPDK to tell that only specific number of queues
>> are supported. Adding an API is a solution, but in this case it's
>> probably overkill. With this patch, the driver can present the proper
>> number of queues to the application, knowing that the spreading of
>> the packets won't be ideal (some queues won't receive packets), but
>> it will work.
>>
>> A step further in this direction would be to configure more queues
>> than asked in hardware to do a better spreading, almost similar to
>> what is done with RETA tables in mlx5. But this is more complicated
>> to do, especially if we want it for 16.04.
>
> Well I guess I must agree with the solution, but I am not real happy. Can we mark this a temp fix until we figure out a cleaner solution as I would not want this type of solution forever or be the standard way to handle these problems.

Back on this issue, I agree that a cleaner solution may be needed,
probably in the ethdev API. I did a quick look in the drivers directory
and, from what I remember, vmxnet3 also need to have a number of rxq
and txq to be a power of 2.

>From what I see in the code, if an application tries to configure a
number of queue which is not a power of 2 on vmxnet3, the driver will
fail to start without any log.

Yong, do you feel a patch similar to what was done on mlx4 is
feasable/suitable in vmxnet3 driver? Shouldn't at least have some
error logs saying that the number of rxq/txq is invalid?

It cleanup or rework is planned in the ethdev API for 16.11, maybe
this is a problem that should be addressed.


Regards,
Olivier

  reply	other threads:[~2016-04-15  9:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 16:08 Olivier Matz
2016-03-21 16:45 ` Adrien Mazarguil
2016-03-21 17:38 ` Wiles, Keith
2016-03-22  9:48   ` Olivier Matz
2016-03-22 14:27     ` Wiles, Keith
2016-04-15  9:11       ` Olivier Matz [this message]
2016-03-24 12:20 ` Bruce Richardson
2016-03-24 12:25   ` Olivier Matz
2016-03-25 10:24 ` [dpdk-dev] [PATCH v2] " Olivier Matz
2016-03-25 15:18   ` Bruce Richardson

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=5710B037.10607@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=keith.wiles@intel.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=yongwang@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).