public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jouke Witteveen <j.witteveen@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/2] Documentation: bring operstate documentation up-to-date
Date: Sat, 1 Dec 2018 17:00:59 +0100	[thread overview]
Message-ID: <20181201160059.GA5175@Mindship-05.localdomain> (raw)

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
---
 Documentation/networking/operstates.txt | 13 ++++++++-----
 net/sched/sch_generic.c                 |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Documentation/networking/operstates.txt b/Documentation/networking/operstates.txt
index 355c6d8ef..8f1c4ff79 100644
--- a/Documentation/networking/operstates.txt
+++ b/Documentation/networking/operstates.txt
@@ -22,8 +22,11 @@ and changeable from userspace under certain rules.
 2. Querying from userspace
 
 Both admin and operational state can be queried via the netlink
-operation RTM_GETLINK. It is also possible to subscribe to RTMGRP_LINK
-to be notified of updates. This is important for setting from userspace.
+operation RTM_GETLINK. This is important for setting from userspace.
+It is also possible to be notified of updates to the operational state
+as long as the interface is admin up. For this, either subscribe to
+the netlink multicast group RTNLGRP_LINK, or listen for "change"
+uevents on the device.
 
 These values contain interface state:
 
@@ -102,7 +105,7 @@ complete. Corresponding functions are netif_dormant_on() to set the
 flag, netif_dormant_off() to clear it and netif_dormant() to query.
 
 On device allocation, networking core sets the flags equivalent to
-netif_carrier_ok() and !netif_dormant().
+!netif_carrier_ok() and netif_dormant().
 
 
 Whenever the driver CHANGES one of these flags, a workqueue event is
@@ -133,11 +136,11 @@ netif_carrier_ok() && !netif_dormant() is set by the
 driver. Afterwards, 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(). Changes made by userspace
-are multicasted on the netlink group RTMGRP_LINK.
+are multicasted on the netlink group RTNLGRP_LINK.
 
 So basically a 802.1X supplicant interacts with the kernel like this:
 
--subscribe to RTMGRP_LINK
+-subscribe to RTNLGRP_LINK
 -set IFLA_LINKMODE to 1 via RTM_SETLINK
 -query RTM_GETLINK once to get initial state
 -if initial flags are not (IFF_LOWER_UP && !IFF_DORMANT), wait until
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index de1663f7d..3a59e440f 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -500,7 +500,7 @@ static void dev_watchdog_down(struct net_device *dev)
  *	netif_carrier_on - set carrier
  *	@dev: network device
  *
- * Device has detected that carrier.
+ * Device has detected acquisition of carrier.
  */
 void netif_carrier_on(struct net_device *dev)
 {
-- 
2.19.2

                 reply	other threads:[~2018-12-02  3:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20181201160059.GA5175@Mindship-05.localdomain \
    --to=j.witteveen@gmail.com \
    --cc=davem@davemloft.net \
    --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