Thread (32 messages) 32 messages, 3 authors, 2008-05-20

Re: [ofa-general] RE: [PATCH 11/13] QLogic VNIC: Driver utility file - implements various utility macros

From: Stephen Hemminger <hidden>
Date: 2008-05-01 18:26:33

On Thu, 1 May 2008 22:31:10 +0530
"Ramachandra K" [off-list ref] wrote:
Sorry for the resend. Original mail bounced from netdev.

On Thu, May 1, 2008 at 9:48 PM [off-list ref] wrote:
quoted
Stephen,


 Stephen Hemminger [mailto:shemminger@vyatta.com] wrote:

 > Ramachandra K [off-list ref] wrote:

 >> +#define is_power_of2(value) (((value) & ((value - 1))) == 0)
 >> +#define ALIGN_DOWN(x, a)    ((x)&(~((a)-1)))

 > In kernel.h already

 Will fix this. Thanks.


 >> +extern u32 vnic_debug;

 > Use msg level macros instead?
There is a ethtool mechanism to set message level for debug method, read other
network drivers and look at netif_msg_timer(x), netif_msg_probe(x), etc in
include/linux/netdevice.h

The goal here is to not have any special configuration for each different type
of hardware.  It is bad user design to have each hardware vendor choosing different
mechanism and values to enable debugging. You can argue that the existing infrastructure
is inadequate, in which case extend the infrastructure for all devices.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help