From: Chaitanya Lala <chaitanya.lala@gmail.com>
To: "Stachura, Mariusz" <mariusz.stachura@intel.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Williams, Mitch A" <mitch.a.williams@intel.com>,
"Bowers, AndrewX" <andrewx.bowers@intel.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Subject: Re: i40e - Is i40e_force_link_state doing the right thing ?
Date: Wed, 16 May 2018 08:35:49 -0700 [thread overview]
Message-ID: <CABOGejJLDVATL+XJOfa2dH8u6VefuHWkG_DMMP92Gr8s9fezvg@mail.gmail.com> (raw)
In-Reply-To: <1F86EBA5C8668B468CEE1C33B96E862B36905E19@IRSMSX104.ger.corp.intel.com>
Hi Mariusz, ...
On Wed, May 16, 2018 at 12:49 AM, Stachura, Mariusz
<mariusz.stachura@intel.com> wrote:
>> Hi Mariusz, ...
>>
>> On Tue, May 15, 2018 at 2:24 PM, Stachura, Mariusz <mariusz.stachura@intel.com> wrote:
>>> On Tue, May 15, 2018 at 1:15 PM, Chaitanya Lala <chaitanya.lala@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I am trying to bring up a Intel XL710 4x10G Intel card using the
>>>> latest mainline top-of-tree.
>>>> The problem is that "ifconfig up" and "ifconfig down" do not take
>>>> effect at the link state level.
>>>> I tracked the problem down to i40e_force_link_state() when it is
>>>> called from i40e_down().
>>>> It calls i40e_force_link_state with "is_up" == false. In-turn it
>>>> calls, i40e_aq_set_link_restart_an(hw, true, NULL).
>>>>
>>>> Should the second argument of i40e_aq_set_link_restart_an be "is_up"
>>>> vs the current "true"
>>>> i.e. i40e_aq_set_link_restart_an(hw, is_up, NULL). ? When I make this
>>>> change, the link state syncs-up with the interface administrative
>>>> state.
>>>>
>>>> Is this a bug ?
>>>>
>>>> Thanks,
>>>> Chaitanya
>>>
>>> Hello Chaitanya,
>>>
>>> i40e_down() calls i40e_force_link_state with "is_up" == false only if interface's private flag "link-down-on-close" is set. By default the link is left up for manageability and VF traffic, user can use this flag to power down the interface on the link level. Does that work for you?
>>> The command is:
>>> "ethtool --set-priv-flags IFNAME link-down-on-close on" and then
>>
>> This flag is _on_ in my setup and hencet i40e_force_link_state is being called with is_up == false in my setup. The problem is that irrespective of value of "is_up" flag, i40e_force_link_state invokes i40e_aq_set_link_restart_an with second argument (enable_link) as "true". So i40e_aq_set_link_restart_an is always trying to enable link even if is_up was false. Is that correct behavior ?
>>
>> I have pasted code with my annotations below marked with "//XXX".
>> (...)
>> Thanks,
>> Chaitanya
>
> Hey,
> i40e_aq_set_link_restart_an has second argument set to "true" intentionally, as I understand the "link-down-on-close" does not work for you, right? I will double check if this feature works for me and get back to you, thank you again.
That's correct. Even with the flag set, if-down does not result in a
link down for me. Thanks for checking!
-
Chaitanya
> --------------------------------------------------------------------
>
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
>
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
> przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
> others is strictly prohibited.
prev parent reply other threads:[~2018-05-16 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 20:15 i40e - Is i40e_force_link_state doing the right thing ? Chaitanya Lala
2018-05-15 20:31 ` Alexander Duyck
2018-05-15 21:24 ` Stachura, Mariusz
2018-05-15 21:47 ` Chaitanya Lala
2018-05-16 7:49 ` Stachura, Mariusz
2018-05-16 15:35 ` Chaitanya Lala [this message]
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=CABOGejJLDVATL+XJOfa2dH8u6VefuHWkG_DMMP92Gr8s9fezvg@mail.gmail.com \
--to=chaitanya.lala@gmail.com \
--cc=andrewx.bowers@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=mariusz.stachura@intel.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.org \
/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).