DPDK patches and discussions
 help / color / mirror / Atom feed
From: jigsaw <jigsaw@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ixgbe 82599: Query assignment of queues to Virtual Function.
Date: Mon, 21 Oct 2013 14:28:40 +0300	[thread overview]
Message-ID: <CAHVfvh79jQp5jUTPYHtuKf7WprMu86daa-cd8c0ffpuwMbtCrA@mail.gmail.com> (raw)
In-Reply-To: <201310211036.01561.thomas.monjalon@6wind.com>

Hi Thomas,

Thanks for comment.
The ixgbevf_negotiate_api is copied from Intel's VF driver. The while
loop is not quite usual, indeed. A direct call to
ixgbevf_negotiate_api_version(hw, ixgbe_mbox_api_11) is sufficient, I
think. Coz PF is supposed to be satisfied with ver 1.1.
I will make another attempt with elimination of  ixgbevf_negotiate_api.

Any other comment?

thx &
rgds,
-ql

On Mon, Oct 21, 2013 at 11:36 AM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:
> Hi,
>
> 21/10/2013 09:09, Qinglai Xiao :
>> Physical Function assignes Tx/Rx queues to each VF according to
>> different schemes[1]. By querying through mailbox, VF is able to
>> get number of Tx/Rx queues assigned to it.
>>
>> Note that current Intel ixgbe driver ixgbe-3.18.7 does not fully
>> support mailbox message IXGBE_VF_GET_QUEUES. The service routine
>> for IXGBE_VF_GET_QUEUES must be fixed, otherwise PF always return
>> 1 as Tx/Rx queue number.
>>
>> [1] See section 7.2.1.2.1, 7.1.2.2 and 7.10.2.7.2 of Intel 82599 10
>>     Gbe Controller Datasheet.
>>
>> Signed-off-by: Qinglai Xiao <jigsaw@gmail.com>
>> ---
>
> Thanks for the patch, your comments are clear.
>
>> +static void ixgbevf_negotiate_api(struct ixgbe_hw *hw)
>> +{
>> +     int api[] = { ixgbe_mbox_api_11,
>> +                   ixgbe_mbox_api_10,
>> +                   ixgbe_mbox_api_unknown };
>> +     int err = 0, idx = 0;
>> +
>> +     while (api[idx] != ixgbe_mbox_api_unknown) {
>> +             err = ixgbevf_negotiate_api_version(hw, api[idx]);
>> +             if (!err)
>> +                     break;
>> +             idx++;
>> +     }
>> +}
>
> I have comments about the mbox API:
> 1) Why not call directly ixgbevf_negotiate_api_version for ixgbe_mbox_api_11 only ?
> It seems that only version 1.1 supports ixgbevf_get_queues.
> 2) If a loop is still needed, why not use a simple "for loop" ?
> 3) If ixgbevf_negotiate_api is still needed, I'd prefer to have "_mbx" in its name.
>
> Thank you
> --
> Thomas

  reply	other threads:[~2013-10-21 11:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  7:09 Qinglai Xiao
2013-10-21  8:36 ` Thomas Monjalon
2013-10-21 11:28   ` jigsaw [this message]
2013-10-21 13:04     ` Thomas Monjalon
2013-10-21 13:32       ` jigsaw
2013-10-21 14:11 Qinglai Xiao

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=CAHVfvh79jQp5jUTPYHtuKf7WprMu86daa-cd8c0ffpuwMbtCrA@mail.gmail.com \
    --to=jigsaw@gmail.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).