* [PATCH] libcxgb4: fixes for debug build
@ 2016-12-15 21:19 Steve Wise
[not found] ` <20161215212201.AAA3BE08C3-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2016-12-15 21:19 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
providers/cxgb4/dev.c | 14 +++++++-------
providers/cxgb4/libcxgb4.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
index 69b04ac..3d903e8 100644
--- a/providers/cxgb4/dev.c
+++ b/providers/cxgb4/dev.c
@@ -239,7 +239,7 @@ static void dump_cq(struct c4iw_cq *chp)
chp->cq.cqid, chp->cq.queue, chp->cq.cidx,
chp->cq.sw_queue, chp->cq.sw_cidx, chp->cq.sw_pidx, chp->cq.sw_in_use,
chp->cq.size, chp->cq.error, chp->cq.gen, chp->cq.cidx_inc, be64_to_cpu(chp->cq.bits_type_ts),
- t4_cq_notempty(&chp->cq) || (chp->iq ? t4_iq_notempty(chp->iq) : 0));
+ t4_cq_notempty(&chp->cq));
for (i=0; i < chp->cq.size; i++) {
u64 *p = (u64 *)(chp->cq.queue + i);
@@ -310,10 +310,10 @@ static void dump_qp(struct c4iw_qp *qhp)
swsqe->opcode,
swsqe->complete,
swsqe->signaled,
- cpu_to_be64(swsqe->cqe.u.flits[0]),
- cpu_to_be64(swsqe->cqe.u.flits[1]),
- cpu_to_be64((u64)swsqe->cqe.reserved),
- cpu_to_be64(swsqe->cqe.bits_type_ts));
+ cpu_to_be64(((uint64_t *)&swsqe->cqe)[0]),
+ cpu_to_be64(((uint64_t *)&swsqe->cqe)[1]),
+ cpu_to_be64(((uint64_t *)&swsqe->cqe)[2]),
+ cpu_to_be64(((uint64_t *)&swsqe->cqe)[3]));
if (++cidx == qhp->wq.sq.size)
cidx = 0;
}
@@ -359,7 +359,7 @@ static void dump_qp(struct c4iw_qp *qhp)
}
}
-void dump_state()
+void dump_state(void)
{
struct c4iw_dev *dev;
int i;
@@ -462,7 +462,7 @@ found:
}
PDBG("%s found vendor %d device %d type %d\n",
- __FUNCTION__, vendor, device, hca_table[i].chip_version);
+ __FUNCTION__, vendor, device, CHELSIO_CHIP_VERSION(hca_table[i].device >> 8));
dev = calloc(1, sizeof *dev);
if (!dev) {
diff --git a/providers/cxgb4/libcxgb4.h b/providers/cxgb4/libcxgb4.h
index 9a4bc98..3b75661 100644
--- a/providers/cxgb4/libcxgb4.h
+++ b/providers/cxgb4/libcxgb4.h
@@ -260,7 +260,7 @@ extern struct c4iw_stats c4iw_stats;
#endif
#ifdef STALL_DETECTION
-void dump_state();
+void dump_state(void);
extern int stall_to;
#endif
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] libcxgb4: fixes for debug build
[not found] ` <20161215212201.AAA3BE08C3-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
@ 2016-12-15 21:27 ` Doug Ledford
2016-12-15 22:03 ` Jason Gunthorpe
1 sibling, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2016-12-15 21:27 UTC (permalink / raw)
To: Steve Wise, leon-DgEjT+Ai2ygdnm+yROfE0A; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1.1: Type: text/plain, Size: 2511 bytes --]
On 12/15/2016 4:19 PM, Steve Wise wrote:
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
> providers/cxgb4/dev.c | 14 +++++++-------
> providers/cxgb4/libcxgb4.h | 2 +-
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
> index 69b04ac..3d903e8 100644
> --- a/providers/cxgb4/dev.c
> +++ b/providers/cxgb4/dev.c
> @@ -239,7 +239,7 @@ static void dump_cq(struct c4iw_cq *chp)
> chp->cq.cqid, chp->cq.queue, chp->cq.cidx,
> chp->cq.sw_queue, chp->cq.sw_cidx, chp->cq.sw_pidx, chp->cq.sw_in_use,
> chp->cq.size, chp->cq.error, chp->cq.gen, chp->cq.cidx_inc, be64_to_cpu(chp->cq.bits_type_ts),
> - t4_cq_notempty(&chp->cq) || (chp->iq ? t4_iq_notempty(chp->iq) : 0));
> + t4_cq_notempty(&chp->cq));
>
> for (i=0; i < chp->cq.size; i++) {
> u64 *p = (u64 *)(chp->cq.queue + i);
> @@ -310,10 +310,10 @@ static void dump_qp(struct c4iw_qp *qhp)
> swsqe->opcode,
> swsqe->complete,
> swsqe->signaled,
> - cpu_to_be64(swsqe->cqe.u.flits[0]),
> - cpu_to_be64(swsqe->cqe.u.flits[1]),
> - cpu_to_be64((u64)swsqe->cqe.reserved),
> - cpu_to_be64(swsqe->cqe.bits_type_ts));
> + cpu_to_be64(((uint64_t *)&swsqe->cqe)[0]),
> + cpu_to_be64(((uint64_t *)&swsqe->cqe)[1]),
> + cpu_to_be64(((uint64_t *)&swsqe->cqe)[2]),
> + cpu_to_be64(((uint64_t *)&swsqe->cqe)[3]));
> if (++cidx == qhp->wq.sq.size)
> cidx = 0;
> }
> @@ -359,7 +359,7 @@ static void dump_qp(struct c4iw_qp *qhp)
> }
> }
>
> -void dump_state()
> +void dump_state(void)
> {
> struct c4iw_dev *dev;
> int i;
> @@ -462,7 +462,7 @@ found:
> }
>
> PDBG("%s found vendor %d device %d type %d\n",
> - __FUNCTION__, vendor, device, hca_table[i].chip_version);
> + __FUNCTION__, vendor, device, CHELSIO_CHIP_VERSION(hca_table[i].device >> 8));
>
> dev = calloc(1, sizeof *dev);
> if (!dev) {
> diff --git a/providers/cxgb4/libcxgb4.h b/providers/cxgb4/libcxgb4.h
> index 9a4bc98..3b75661 100644
> --- a/providers/cxgb4/libcxgb4.h
> +++ b/providers/cxgb4/libcxgb4.h
> @@ -260,7 +260,7 @@ extern struct c4iw_stats c4iw_stats;
> #endif
>
> #ifdef STALL_DETECTION
> -void dump_state();
> +void dump_state(void);
> extern int stall_to;
> #endif
>
>
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libcxgb4: fixes for debug build
[not found] ` <20161215212201.AAA3BE08C3-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
2016-12-15 21:27 ` Doug Ledford
@ 2016-12-15 22:03 ` Jason Gunthorpe
[not found] ` <20161215220331.GB28939-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2016-12-15 22:03 UTC (permalink / raw)
To: Steve Wise
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
> PDBG("%s found vendor %d device %d type %d\n",
> - __FUNCTION__, vendor, device, hca_table[i].chip_version);
> + __FUNCTION__, vendor, device, CHELSIO_CHIP_VERSION(hca_table[i].device >> 8));
Don't #define debug macros to {} to avoid this kind of bug
see b60ae256e7d1541edc8fd6a072a17c143ce70b4a
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] libcxgb4: fixes for debug build
[not found] ` <20161215220331.GB28939-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-12-15 22:09 ` Steve Wise
0 siblings, 0 replies; 4+ messages in thread
From: Steve Wise @ 2016-12-15 22:09 UTC (permalink / raw)
To: 'Jason Gunthorpe'
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
>
>
> > PDBG("%s found vendor %d device %d type %d\n",
> > - __FUNCTION__, vendor, device, hca_table[i].chip_version);
> > + __FUNCTION__, vendor, device,
> CHELSIO_CHIP_VERSION(hca_table[i].device >> 8));
>
> Don't #define debug macros to {} to avoid this kind of bug
>
> see b60ae256e7d1541edc8fd6a072a17c143ce70b4a
>
> Jason
Thanks Jason, I'll fix this at some point. I don't see a way to open a github
issue to track this. Is that not enabled for rdma-core?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-15 22:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-15 21:19 [PATCH] libcxgb4: fixes for debug build Steve Wise
[not found] ` <20161215212201.AAA3BE08C3-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
2016-12-15 21:27 ` Doug Ledford
2016-12-15 22:03 ` Jason Gunthorpe
[not found] ` <20161215220331.GB28939-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-15 22:09 ` Steve Wise
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox