Stephen, I think your mail didn't make it to netdev. Majordomo seems
to be working badly with special charsets (my mails used to be totally
ignored because of charset and/or encoding issues).

On 5/27/07, Stephen Hemminger <[EMAIL PROTECTED]> wrote:

> Wow, I searched for this a lot! It could be all I need, although it
> doesn't seem very robust to look at the bitmap driectly, is it?
>
> Maybe it would be cleaner to add an "promiscuity" file to that structure?

/sys/class/net/ethX/flags was an interface mistake. Don't depend on it.

I added it back when sysfs was first starting. Most of the files in 
/sys/class/net/ethX
are really meant only for debugging. There was no debugfs at the time.

The problem is it exports bit values as ABI that shouldn't be nailed down.

Great that you point it out. Then, we're back to the initial
situation, there is no reliable way of polling promisc state, and I am
looking for a way to do that. Ways I think it could be done:

- Exporting /sys/class/net/ethX/promiscuity as a counter (I have a
working patch for this)
- Exporting /sys/class/net/ethX/promisc as a binary value, from dev->flags.
- ORing the two IFF_PROMISC flags in dev_get_flags() (the patch I sent)
- Dropping gflags altogether, as there doesn't seem to be any real use
case for it, and keep using dev_get_flags().

Any suggestion?

--
Martín Ferrari
-
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