From: John Fastabend <john.fastabend@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
bhutchings@solarflare.com, mirqus@gmail.com,
greearb@candelatech.com, fbl@redhat.com
Subject: Re: [patch net-next 0/4] net: allow to change carrier from userspace
Date: Thu, 13 Dec 2012 09:15:41 -0800 [thread overview]
Message-ID: <50CA0D3D.5000503@gmail.com> (raw)
In-Reply-To: <20121213161750.GA1914@minipsycho.orion>
[...]
>> That is what the operstate mechanism was for. Why did we build that mechanism
>> if it doesn't work from userspace.
>>
>> Maybe the fix is to make setting linkstate also set carrier bits.
>
> Hmm. You mean to call netif_carrier_on/off as a reaction to operstate
> change? How exactly would you like to do that?
>
> Thanks
>
> Jiri
This would break existing applications and would not really be in the
spirit of the operstate mechanism as I read the documentation:
./Documentation/networking/operstates.txt
63 IF_OPER_DORMANT (5):
64 Interface is L1 up, but waiting for an external event, f.e. for a
65 protocol to establish. (802.1X)
The L1 up is netif_carrier_on here.
We use this in user space when we do not want applications to start
using the link until we have negotiated and configured some link layer
attributes. To do this we set IFLA_LINKMODE and then use the
IF_OPER_DORMANT event to trigger the application eventually setting
IF_OPER_UP when the link layer negotiation is complete. If you take the
carrier down this breaks. In my case the protocol is LLDP but I think
there are other examples. This is basically the example Stephen already
gave.
I guess I still am missing why teamd doesn't just set IFLA_LINKMODE
then manage the operstate this way? Sure teamd would have to become a
bit smarter but it would save adding additional interfaces to the
kernel. In the LinkAgg case you could just pin the operstate down this
would also allow protocols to run under the linkagg over the LLC in
IEEE speak which I think is being discussed in the latest round of
LLDP/LinkAgg spec updates (I'll check on that later today).
Thanks,
John
--
John Fastabend Intel Corporation
next prev parent reply other threads:[~2012-12-13 17:16 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 10:58 [patch net-next 0/4] net: allow to change carrier from userspace Jiri Pirko
2012-12-12 10:58 ` [patch net-next 1/4] net: add change_carrier netdev op Jiri Pirko
2012-12-12 10:58 ` [patch net-next 2/4] net: allow to change carrier via sysfs Jiri Pirko
2012-12-12 10:58 ` [patch net-next 3/4] rtnl: expose carrier value with possibility to set it Jiri Pirko
2012-12-12 10:58 ` [patch net-next 4/4] dummy: implement carrier change Jiri Pirko
2012-12-12 16:15 ` [patch net-next 0/4] net: allow to change carrier from userspace Stephen Hemminger
2012-12-12 17:05 ` Jiri Pirko
2012-12-12 17:27 ` Stephen Hemminger
2012-12-12 18:10 ` Jiri Pirko
2012-12-12 18:12 ` Stephen Hemminger
2012-12-12 18:25 ` Jiri Pirko
2012-12-12 18:36 ` Stephen Hemminger
2012-12-12 18:49 ` Jiri Pirko
2012-12-12 18:54 ` Stephen Hemminger
2012-12-12 19:06 ` Jiri Pirko
2012-12-12 19:34 ` Stephen Hemminger
2012-12-13 16:17 ` Jiri Pirko
2012-12-13 17:15 ` John Fastabend [this message]
2012-12-13 17:54 ` Flavio Leitner
2012-12-13 18:09 ` Stephen Hemminger
2012-12-13 18:17 ` Flavio Leitner
2012-12-13 18:20 ` Stephen Hemminger
2012-12-13 18:33 ` Dan Williams
2012-12-13 19:09 ` John Fastabend
2012-12-13 21:32 ` Jiri Pirko
2012-12-14 14:41 ` Jiri Pirko
2012-12-14 16:12 ` Stephen Hemminger
2012-12-14 16:35 ` Jiri Pirko
2012-12-14 16:59 ` Stephen Hemminger
2012-12-14 17:13 ` Jiri Pirko
2012-12-14 17:23 ` Stephen Hemminger
2012-12-14 17:35 ` Jiri Pirko
2012-12-16 10:54 ` Jiri Pirko
2012-12-18 6:49 ` Stephen Hemminger
2012-12-18 9:31 ` Jiri Pirko
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=50CA0D3D.5000503@gmail.com \
--to=john.fastabend@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fbl@redhat.com \
--cc=greearb@candelatech.com \
--cc=jiri@resnulli.us \
--cc=mirqus@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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).