Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
On 08/08/2017 11:27 AM, Stephen Hemminger wrote:
> On Mon, 07 Aug 2017 15:02:58 -0400
> Nathan Fontenot  wrote:
> 
>> To ease debugging of the ibmvnic driver add a series of netdev_dbg()
>> statements to track driver status, especially during initialization,
>> removal, and resetting of the driver.
>>
>> Signed-off-by: Nathan Fontenot 
> 
> Maybe use netif_dbg() and the message type stuff.

Oh! I like this even more. This just begs to update all of the message
reporting in the driver though.

Let's scrap this patch. I'll work on a new patchset based on using
the netif_*() infrastructure.

-Nathan

 



Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Stephen Hemminger
On Mon, 07 Aug 2017 15:02:58 -0400
Nathan Fontenot  wrote:

> To ease debugging of the ibmvnic driver add a series of netdev_dbg()
> statements to track driver status, especially during initialization,
> removal, and resetting of the driver.
> 
> Signed-off-by: Nathan Fontenot 

Maybe use netif_dbg() and the message type stuff.



Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-08 Thread Nathan Fontenot
On 08/07/2017 10:29 AM, Joe Perches wrote:
> On Mon, 2017-08-07 at 15:02 -0400, Nathan Fontenot wrote:
>> To ease debugging of the ibmvnic driver add a series of netdev_dbg()
>> statements to track driver status, especially during initialization,
>> removal, and resetting of the driver.
> 
> For some of the function entry logging, it seems
> better to use ftrace instead.
> 
>> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
>> b/drivers/net/ethernet/ibm/ibmvnic.c
> []
>> @@ -389,6 +389,8 @@ static int init_stats_token(struct ibmvnic_adapter 
>> *adapter)
>>  struct device *dev = >vdev->dev;
>>  dma_addr_t stok;
>>  
>> +netdev_dbg(adapter->netdev, "Initializing stats token\n");
> 
> here and subsequent.

Thanks for the tip. I'm not very familiar with ftrace so I'll have to
investigate and send a revised patch.

-Nathan 



Re: [PATCH net-next] ibmvnic: Add netdev_dbg output for debugging

2017-08-07 Thread Joe Perches
On Mon, 2017-08-07 at 15:02 -0400, Nathan Fontenot wrote:
> To ease debugging of the ibmvnic driver add a series of netdev_dbg()
> statements to track driver status, especially during initialization,
> removal, and resetting of the driver.

For some of the function entry logging, it seems
better to use ftrace instead.

> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c 
> b/drivers/net/ethernet/ibm/ibmvnic.c
[]
> @@ -389,6 +389,8 @@ static int init_stats_token(struct ibmvnic_adapter 
> *adapter)
>   struct device *dev = >vdev->dev;
>   dma_addr_t stok;
>  
> + netdev_dbg(adapter->netdev, "Initializing stats token\n");

here and subsequent.