Re: [RFC] [PATCH] Net device error logging

Jeff Garzik (jgarzik@pobox.com)
Mon, 05 May 2003 14:10:17 -0400


Jim Keniston wrote:
> I'm happy to discuss this. As I see it, there are at least 4
> possibilities:
> 1. Standardize on the netif_msg_xxx (bit map) approach.
> 2. Standardize on simple reporting levels (if (debug >= 2)...).
> 3. Make the driver provide a filtering function, which can do #1, #2 or
> some
> other driver-specific test.
> 4. Status quo: make the message-level test before calling netdev_xxx.

Number one is the desired direction for net drivers.

> I think message filtering is a good idea. I also think the following
> features
> would be useful:
> a. Identify which device and driver the message refers to.

this is already done in net drivers

> b. Call net_ratelimit() in appropriate contexts.

this is questionable. The netif_xxx messages are _already_ designed to
be used in order of increasing verbosity. If the user selects the more
verbose class of messages, then rate-limiting may not be appropriate.

> c. Capture caller info (__FILE__ and/or __FUNCTION__).

No need, in net drivers. All of them already print out network
interface, which is all you need to know.

> e. Standardize certain messages so that all drivers log predictable,
> standard
> messages (perhaps along with driver-specific info) under certain
> circumstances.

Yes, standardization of net driver messages is desired.

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/