Am Montag, 10. Juli 2006 18:56 schrieb Stephen Hemminger:

> 1. I think vlan code should never be using the state bits directly at all.
> It makes the code error prone if the bits ever change, and it means
> that the proper callbacks are not being done. The existing
> vlan_transfer_operstate does what you want. VLAN_LINK_STATE_MASK etc,
> should go.

I just realized why 2.6.16 explicitely transfers LINK_STATE_PRESENT. This flag 
is positive true, and the code just assumes that it is always set in 
real_dev:

 new_dev->state = real_dev->state & VLAN_LINK_STATE_INITIAL_MASK;

So I think the fix for 2.6.17-stable should be:

-       new_dev->state = real_dev->state & ~(1<<__LINK_STATE_START);
+       new_dev->state = real_dev->state & (1<<__LINK_STATE_NOCARRIER) | 
(1<<__LINK_STATE_DORMANT)) | (1<<__LINK_STATE_PRESENT); , dropping 
VLAN_LINK_STATE_INITIAL_MASK.

I can produce and test such a patch tomorrow evening, if someone needs it 
faster, feel free to go ahead ;-)

For the rest of your comment and 

> 3. All checks for IFF_UP should be using netif_running instead.
> IFF_UP is a leftover BSDism.

ACK. However,

> 2. The vlan device should not be marked as up when it
> is registered.

this is a userspace visible API change I don't like, but you are right it 
should use dev_open(). 

I would take responsibility to implement this on one of the next two weekends. 
Should be 2.6.19 stuff IMHO.

Stefan
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to