* [PATCH] cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB
@ 2015-01-28 16:19 Hariprasad Shenai
2015-01-29 23:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Shenai @ 2015-01-28 16:19 UTC (permalink / raw)
To: netdev; +Cc: davem, leedom, anish, nirranjan, praveenm, Hariprasad Shenai
In commit dc9daab226aa ("cxgb4: Added support in debugfs to dump
sge_qinfo") a preprocessor check for CONFIG_CXGB4_DCB got added, which should
have been CONFIG_CHELSIO_T4_DCB.
Reported-by: Paul Bolle <pebolle@tiscal.nl>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 24 +++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
index 47c0869..61c000a 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
@@ -1229,6 +1229,28 @@ static const struct file_operations rss_vf_config_debugfs_fops = {
.release = seq_release_private
};
+/**
+ * ethqset2pinfo - return port_info of an Ethernet Queue Set
+ * @adap: the adapter
+ * @qset: Ethernet Queue Set
+ */
+static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset)
+{
+ int pidx;
+
+ for_each_port(adap, pidx) {
+ struct port_info *pi = adap2pinfo(adap, pidx);
+
+ if (qset >= pi->first_qset &&
+ qset < pi->first_qset + pi->nqsets)
+ return pi;
+ }
+
+ /* should never happen! */
+ BUG_ON(1);
+ return NULL;
+}
+
static int sge_qinfo_show(struct seq_file *seq, void *v)
{
struct adapter *adap = seq->private;
@@ -1272,7 +1294,7 @@ do { \
T("TxQ inuse:", q.in_use);
T("TxQ CIDX:", q.cidx);
T("TxQ PIDX:", q.pidx);
-#ifdef CONFIG_CXGB4_DCB
+#ifdef CONFIG_CHELSIO_T4_DCB
T("DCB Prio:", dcb_prio);
S3("u", "DCB PGID:",
(ethqset2pinfo(adap, base_qset + i)->dcb.pgid >>
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB
2015-01-28 16:19 [PATCH] cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB Hariprasad Shenai
@ 2015-01-29 23:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-01-29 23:10 UTC (permalink / raw)
To: hariprasad; +Cc: netdev, leedom, anish, nirranjan, praveenm
From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed, 28 Jan 2015 21:49:51 +0530
> In commit dc9daab226aa ("cxgb4: Added support in debugfs to dump
> sge_qinfo") a preprocessor check for CONFIG_CXGB4_DCB got added, which should
> have been CONFIG_CHELSIO_T4_DCB.
>
> Reported-by: Paul Bolle <pebolle@tiscal.nl>
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
That's not all this patch is doing:
> +static inline struct port_info *ethqset2pinfo(struct adapter *adap, int qset)
You need to explain why this function needs to be added in the
commit message.
I can see myself that the build fails without it because you
forgot to add it in the original commit, or someone removed
it meanwhile, but you have to say so in the commit message
so everyone can understand.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-29 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 16:19 [PATCH] cxgb4: Remove preprocessor check for CONFIG_CXGB4_DCB Hariprasad Shenai
2015-01-29 23:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).