From: Jakub Kicinski <kuba@kernel.org>
To: David Wilder <dwilder@us.ibm.com>
Cc: netdev@vger.kernel.org, wilder@us.ibm.com,
ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com,
somnath.kotur@broadcom.com
Subject: Re: [(RFC) PATCH ] be2net: Allow a VF to use physical link state.
Date: Tue, 9 Jun 2020 14:58:39 -0700 [thread overview]
Message-ID: <20200609145839.36f1cbec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200609000059.12924-1-dwilder@us.ibm.com>
On Mon, 8 Jun 2020 17:00:59 -0700 David Wilder wrote:
> Hyper-visors owning a PF are allowed by Emulex specification to provide
> a VF with separate physical and/or logical link states. However, on
> linux, a VF driver must chose one or the other.
>
> My scenario is a proprietary driver controlling the PF, be2net is the VF.
> When I do a physical cable pull test the PF sends a link event
> notification to the VF with the "physical" link status but this is
> ignored in be2net (see be_async_link_state_process() ).
>
> The PF is reporting the adapter type as:
> 0xe228 /* Device id for VF in Lancer */
>
> I added a module parameter "use_pf_link_state". When set the VF should
> ignore logical link state and use the physical link state.
>
> However I have an issue making this work. When the cable is pulled I
> see two link statuses reported:
> [1706100.767718] be2net 8002:01:00.0 eth1: Link is Down
> [1706101.189298] be2net 8002:01:00.0 eth1: Link is Up
>
> be_link_status_update() is called twice, the first with the physical link
> status called from be_async_link_state_process(), and the second with the
> logical link status from be_get_link_ksettings().
>
> I am unsure why be_async_link_state_process() is called from
> be_get_link_ksettings(), it results in multiple link state changes
> (even in the un-patched case). If I eliminate this call then it works.
> But I am un-sure of this change.
>
> Signed-off-by: David Wilder <dwilder@us.ibm.com>
Hm. Just looking at the code in __be_cmd_set_logical_link_config():
if (link_state == IFLA_VF_LINK_STATE_ENABLE ||
link_state == IFLA_VF_LINK_STATE_AUTO)
link_config |= PLINK_ENABLE;
if (link_state == IFLA_VF_LINK_STATE_AUTO)
link_config |= PLINK_TRACK;
Maybe we shouldn't set ENABLE for AUTO?
The module parameter is definitely not a good idea, what you're asking
for seems to be well within the expectation from the
.ndo_set_vf_link_state config, so it seems the driver / firmware is just
not implementing that right.
next prev parent reply other threads:[~2020-06-09 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 0:00 [(RFC) PATCH ] be2net: Allow a VF to use physical link state David Wilder
2020-06-09 21:58 ` Jakub Kicinski [this message]
2020-06-10 17:22 ` dwilder
2020-06-10 21:20 ` Jakub Kicinski
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=20200609145839.36f1cbec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=ajit.khaparde@broadcom.com \
--cc=dwilder@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
--cc=wilder@us.ibm.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).