Thread (35 messages) flat view 35 messages, 6 authors, 2012-12-18

Re: [patch net-next 0/4] net: allow to change carrier from userspace

From: Jiri Pirko <jiri@resnulli.us>
Date: 2012-12-12 18:26:00

Wed, Dec 12, 2012 at 07:12:08PM CET, shemminger@vyatta.com wrote:
On Wed, 12 Dec 2012 19:10:17 +0100
Jiri Pirko [off-list ref] wrote:
quoted
quoted
# ip li show dev dummy0
12: dummy0: <NO-CARRIER,BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state DORMANT mode DORMANT   
if you mean this "NO-CARRIER"
it has no direct relation with netif_carrier_ok().
It is the same value (IFF_RUNNING) that is visible from user space.
static inline bool netif_carrier_ok(const struct net_device *dev)
{
	        return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
}

So netif_carrier[ok/on/off] are working with on __LINK_STATE_NOCARRIER
bit. Not with IFF_RUNNING flag.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help