From: Jiri Pirko <jiri@resnulli.us>
To: George Wilkie <gwilkie@vyatta.att-mail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] team: account for oper state
Date: Wed, 18 Apr 2018 16:58:22 +0200 [thread overview]
Message-ID: <20180418145822.GE1989@nanopsycho> (raw)
In-Reply-To: <20180418133549.qd5uqp3km45vw3ar@debian9.gwilkie>
Wed, Apr 18, 2018 at 03:35:49PM CEST, gwilkie@vyatta.att-mail.com wrote:
>On Wed, Apr 18, 2018 at 02:56:44PM +0200, Jiri Pirko wrote:
>> Wed, Apr 18, 2018 at 12:29:50PM CEST, gwilkie@vyatta.att-mail.com wrote:
>> >Account for operational state when determining port linkup state,
>> >as per Documentation/networking/operstates.txt.
>>
>> Could you please point me to the exact place in the document where this
>> is suggested?
>>
>
>Various places cover it I think.
>
>In 1. Introduction:
>"interface is not usable just because the admin enabled it"
>"userspace must be granted the possibility to
>influence operational state"
>
>In 4. Setting from userspace:
>"the userspace application can set IFLA_OPERSTATE
>to IF_OPER_DORMANT or IF_OPER_UP as long as the driver does not set
>netif_carrier_off() or netif_dormant_on()"
>
>We have a use case where we want to set the oper state of the team ports based
>on whether they are actually usable or not (as opposed to just admin up).
Are you running a supplicant there or what is the use-case?
How is this handle in other drivers like bond, openvswitch, bridge, etc?
>
>Cheers.
>
>>
>> >
>> >Signed-off-by: George Wilkie <gwilkie@vyatta.att-mail.com>
>> >---
>> > drivers/net/team/team.c | 3 ++-
>> > 1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>> >index a6c6ce19eeee..231264a05e55 100644
>> >--- a/drivers/net/team/team.c
>> >+++ b/drivers/net/team/team.c
>> >@@ -2918,7 +2918,8 @@ static int team_device_event(struct notifier_block *unused,
>> > case NETDEV_CHANGE:
>> > if (netif_running(port->dev))
>> > team_port_change_check(port,
>> >- !!netif_carrier_ok(port->dev));
>> >+ !!(netif_carrier_ok(port->dev) &&
>> >+ netif_oper_up(port->dev)));
>> > break;
>> > case NETDEV_UNREGISTER:
>> > team_del_slave(port->team->dev, dev);
>> >--
>> >2.11.0
>> >
next prev parent reply other threads:[~2018-04-18 14:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 10:29 [PATCH net-next] team: account for oper state George Wilkie
2018-04-18 12:56 ` Jiri Pirko
2018-04-18 13:35 ` George Wilkie
2018-04-18 14:58 ` Jiri Pirko [this message]
2018-04-18 15:33 ` George Wilkie
2018-04-18 15:39 ` George Wilkie
2018-04-18 19:17 ` Jiri Pirko
2018-04-19 9:33 ` George Wilkie
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=20180418145822.GE1989@nanopsycho \
--to=jiri@resnulli.us \
--cc=gwilkie@vyatta.att-mail.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).