From: Joe Perches <joe@perches•com>
To: Tom Lendacky <thomas.lendacky@amd•com>
Cc: netdev@vger•kernel.org, David Miller <davem@davemloft•net>
Subject: Re: [PATCH net-next v1 2/7] amd-xgbe: Add netif_msg_* support for driver messages
Date: Tue, 12 May 2015 12:44:48 -0700 [thread overview]
Message-ID: <1431459888.2884.87.camel@perches.com> (raw)
In-Reply-To: <20150512192242.14091.56225.stgit@tlendack-t1.amdoffice.net>
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]);
next prev parent reply other threads:[~2015-05-12 19:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 19:22 [PATCH net-next v1 0/7] amd-xgbe: AMD XGBE driver updates 2015-05-12 Tom Lendacky
2015-05-12 19:22 ` [PATCH net-next v1 1/7] amd-xgbe: Add additional stats to be reported via ethtool Tom Lendacky
2015-05-12 19:22 ` [PATCH net-next v1 2/7] amd-xgbe: Add netif_msg_* support for driver messages Tom Lendacky
2015-05-12 19:44 ` Joe Perches [this message]
2015-05-12 20:03 ` Tom Lendacky
2015-05-12 19:22 ` [PATCH net-next v1 3/7] amd-xgbe: Rework the Rx path SKB allocation Tom Lendacky
2015-05-12 19:22 ` [PATCH net-next v1 4/7] amd-xgbe: Move the PHY support into amd-xgbe Tom Lendacky
2015-05-12 22:19 ` Florian Fainelli
2015-05-13 14:01 ` Tom Lendacky
2015-05-12 19:23 ` [PATCH net-next v1 5/7] amd-xgbe: Support defining PHY resources in ETH device node Tom Lendacky
2015-05-12 19:23 ` [PATCH net-next v1 6/7] amd-xgbe: Fix flow control setting logic Tom Lendacky
2015-05-12 19:23 ` [PATCH net-next v1 7/7] amd-xgbe: Remove manual check and set of dma_mask pointer Tom Lendacky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431459888.2884.87.camel@perches.com \
--to=joe@perches$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=thomas.lendacky@amd$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox