In some of them, but not in most of them. Looking at explicit calls to
printk in drivers/net, I see that about 1 in 3 is tagged with what
appears to be the interface name. 3/4 of the source files that call
printk explicitly tag fewer than half their printks. It's pretty rare
for a printk to be tagged with the driver name. We'd probably get a
more promising picture if we took into account the various macros that
wrap printk, and some untagged printks are continuations of tagged
printks, but with over 8000 untagged printks in drivers/net, it's by no
means an ideal situation. Maybe the "poorly behaved" drivers are no
longer of interest?
>
> > 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.
1. Not nearly all of them do. (See above.)
2. Depending on the driver and how familar you are with your system's
configuration, it may take some work to map the interface name to the
driver.
Net-driver support for sysfs should eventually reach the point where you
can find useful info in sysfs given the interface name, right? Until
then, I still think messages should report the driver as well as the
interface name. If you do this via netdev_xxx, then once we're at sysfs
nirvana, you just redefine the netdev_xxx macros to drop the bus ID and
driver name.
>
> > 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
Jim
-
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/