lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 May 2015 15:03:14 -0500
From:	Tom Lendacky <thomas.lendacky@....com>
To:	Joe Perches <joe@...ches.com>
CC:	<netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next v1 2/7] amd-xgbe: Add netif_msg_* support for
 driver messages

On 05/12/2015 02:44 PM, Joe Perches wrote:
> On Tue, 2015-05-12 at 14:22 -0500, Tom Lendacky wrote:
>> Add support for the network interface message level settings for
>> determining whether to issue some of the driver messages.
>
> []
>
>> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c
> []
>> @@ -150,9 +150,14 @@ static int xgbe_dcb_ieee_setets(struct net_device *netdev,
>>   	tc_ets = 0;
>>   	tc_ets_weight = 0;
>>   	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
>> -		DBGPR("  TC%u: tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n", i,
>> -		      ets->tc_tx_bw[i], ets->tc_rx_bw[i], ets->tc_tsa[i]);
>> -		DBGPR("  PRIO%u: TC=%hhu\n", i, ets->prio_tc[i]);
>> +		if (netif_msg_drv(pdata)) {
>> +			netdev_dbg(netdev,
>> +				   "TC%u: tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n",
>> +				   i, ets->tc_tx_bw[i], ets->tc_rx_bw[i],
>> +				   ets->tc_tsa[i]);
>
> These might be more concise and work a bit easier
> with dynamic_debug using
>
> 	netif_dbg(priv, type, netdev, fmt, ...)
>
> like:
>
> 		netif_dbg(pdata, drv, netdev,
> 			  "TC%u: tx_bw=%hhu, rx_bw=%hhu, tsa=%hhu\n",
> 			  i, ets->tc_tx_bw[i], ets->tc_rx_bw[i], ets->tc_tsa[i]);
>
>

I didn't realize that interface was there.  I'll convert them over
over to the netif_ format.  Thanks for the pointer.

Tom
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ