Skip to contentSkip to conversation

'default' vs. 'all'

DISCUSSION David Miller 3 participants 4 messages Dec 8, 2007

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

Herbert, Yoshifuji and I were just discussing the sysfs device attribute issue.

It's seems sane to me that if we had some kind of 'dirty' bit per attribute we could propagate default settings everywhere except where the dirty bit had been set.

The question is how to implement this nicely.

What do you think?

#1 lore raw

In article <[email protected]> (at Sat, 08 Dec 2007 00:04:29 -0800 (PST)), David Miller <[email protected]> says:

Quoted 7 lines

Herbert, Yoshifuji and I were just discussing the sysfs device attribute issue.

It's seems sane to me that if we had some kind of 'dirty' bit per attribute we could propagate default settings everywhere except where the dirty bit had been set.

One good event to propagate is the NETDEV_UP; if the dirty bit is not set when the device is brought up, copy the default values to the device.

Regards,

--yoshfuji @ Seattle

#3 lore raw
In reply to David Miller
Quoted 8 lines · David Miller

Herbert, Yoshifuji and I were just discussing the sysfs device attribute issue.

It's seems sane to me that if we had some kind of 'dirty' bit per attribute we could propagate default settings everywhere except where the dirty bit had been set.

Yep.

Quoted 3 lines

The question is how to implement this nicely.

What do you think?

Well this is how it works on IPv4 already :)

The only thing is that we forcibly set the dirty bit on everything when an address is added for backwards compatibility.

If you delete that call then it's as you described.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
In reply to YOSHIFUJI Hideaki / 吉藤英明
Quoted 4 lines · YOSHIFUJI Hideaki / 吉藤英明

One good event to propagate is the NETDEV_UP; if the dirty bit is not set when the device is brought up, copy the default values to the device.

Yeah I already did that for IPv4 except that for backwards compatibility it's set on address addition not device up.

I was in the process of doing it for IPv6 too but got distracted by other things. I might still have that tree on my hard drive if anyone is interested.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt