Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH 01/17] cxgb3: handle global variables properly
From: Christoph Hellwig @ 2016-10-13 19:56 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476388576-22863-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

We'll need to define them in one compilation unit and use an extern
declaration in the headers.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 providers/cxgb3/cxio_wr.h | 6 +++---
 providers/cxgb3/iwch.c    | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/providers/cxgb3/cxio_wr.h b/providers/cxgb3/cxio_wr.h
index e154795..d56c529 100644
--- a/providers/cxgb3/cxio_wr.h
+++ b/providers/cxgb3/cxio_wr.h
@@ -633,9 +633,9 @@ static inline unsigned t3_cq_depth(struct t3_cq *cq)
 	return (1UL<<cq->size_log2);
 }
 
-unsigned long iwch_page_size;
-unsigned long iwch_page_shift;
-unsigned long iwch_page_mask;
+extern unsigned long iwch_page_size;
+extern unsigned long iwch_page_shift;
+extern unsigned long iwch_page_mask;
 
 #define PAGE_ALIGN(x) (((x) + iwch_page_mask) & ~iwch_page_mask)
 
diff --git a/providers/cxgb3/iwch.c b/providers/cxgb3/iwch.c
index aa9b108..804726c 100644
--- a/providers/cxgb3/iwch.c
+++ b/providers/cxgb3/iwch.c
@@ -105,6 +105,10 @@ static struct ibv_context_ops iwch_ctx_ops = {
 	.req_notify_cq = iwch_arm_cq,
 };
 
+unsigned long iwch_page_size;
+unsigned long iwch_page_shift;
+unsigned long iwch_page_mask;
+
 static struct ibv_context *iwch_alloc_context(struct ibv_device *ibdev,
 					      int cmd_fd)
 {
-- 
2.1.4

--
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

* sparse fixes, part2
From: Christoph Hellwig @ 2016-10-13 19:55 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This has the rest of the provider fixes that the mail server
didn't let through last time.

--
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

* Re: [PATCH 12/32] iwpmd: fix the prototype for the pthread_create start functions
From: Jason Gunthorpe @ 2016-10-13 19:44 UTC (permalink / raw)
  To: Steve Wise; +Cc: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <021b01d22585$5b60bbf0$122233d0$@opengridcomputing.com>

On Thu, Oct 13, 2016 at 02:09:44PM -0500, Steve Wise wrote:
> > @@ -1438,11 +1438,11 @@ int main(int argc, char *argv[])
> >  	pthread_cond_init(&cond_req_complete, NULL);
> >  	pthread_cond_init(&cond_pending_msg, NULL);
> > 
> > -	ret = pthread_create(&map_req_thread, NULL,
> > &iwpm_mapping_reqs_handler, NULL);
> > +	ret = pthread_create(&map_req_thread, NULL,
> > iwpm_mapping_reqs_handler, NULL);
> >  	if (ret)
> >  		goto error_exit;
> > 
> > -	ret = pthread_create(&pending_msg_thread, NULL,
> > &iwpm_pending_msgs_handler, NULL);
> > +	ret = pthread_create(&pending_msg_thread, NULL,
> > iwpm_pending_msgs_handler, NULL);
> >  	if (ret)
> >  		goto error_exit;
> 
> How did this work before?

gcc will not warn if an old-style prototype eg () is passed in to a
typed function pointer.

An earlier patch in the series changed it to (void) which broke the
compile.. I reorderd things to avoid this in the PR.

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

* RE: [PATCH rdma-next 00/10] Hardware tag matching support
From: Hefty, Sean @ 2016-10-13 19:43 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Doug Ledford, Leon Romanovsky,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jason Gunthorpe
In-Reply-To: <20161013170641.GA9094-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

> > > I doubt they have, but they change the kernel to user library API.
> I'm
> > > not so worried about that since it's entirely under our control.
> It's
> > > the user library to application API that I would be more concerned
> > > with.
> >
> > I thought there was an agreement that since verbs implies a hardware
> implementation, then all kernel to user ABI changes to verbs would go
> through some external organization, such as the OFVWG, for discussion
> and approval.  Has that changed?
> 
> What makes OFVWG more qualified to review an ABI than linux-rdma?

We've had this discussion on the list before.  The issue is that verbs isn't just a software API.  It defines a hardware implementation.  The consensus was that some 'standards' body needed to be able to review the proposed changes and its impact.  The OFVWG was selected as the best available option.  If we want to say no, and let the linux-rdma maintainer dictate the hardware interface exported by the kernel, then, yes, that's an option.

Now, if we want to kill the notion that there's some sort of common rdma/verbs interface that all devices will be able to use effectively, and replace it with vendor specific interfaces, I would completely go along with that.  Then let user space figure out how to deal with the results.


--
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

* RE: [PATCH 14/32] cxgb4: mark symbols static where possible
From: Steve Wise @ 2016-10-13 19:12 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-15-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

> 
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Looks fine

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
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

* RE: [PATCH 15/32] cxgb4: remove unused function dump_wqe
From: Steve Wise @ 2016-10-13 19:11 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-16-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Looks fine.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>


--
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

* RE: [PATCH 11/32] iwpmd: mark symbols static where possible
From: Steve Wise @ 2016-10-13 19:10 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-12-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Looks good

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
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

* RE: [PATCH 12/32] iwpmd: fix the prototype for the pthread_create start functions
From: Steve Wise @ 2016-10-13 19:09 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-13-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

> @@ -1438,11 +1438,11 @@ int main(int argc, char *argv[])
>  	pthread_cond_init(&cond_req_complete, NULL);
>  	pthread_cond_init(&cond_pending_msg, NULL);
> 
> -	ret = pthread_create(&map_req_thread, NULL,
> &iwpm_mapping_reqs_handler, NULL);
> +	ret = pthread_create(&map_req_thread, NULL,
> iwpm_mapping_reqs_handler, NULL);
>  	if (ret)
>  		goto error_exit;
> 
> -	ret = pthread_create(&pending_msg_thread, NULL,
> &iwpm_pending_msgs_handler, NULL);
> +	ret = pthread_create(&pending_msg_thread, NULL,
> iwpm_pending_msgs_handler, NULL);
>  	if (ret)
>  		goto error_exit;

How did this work before?

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
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

* RE: [PATCH 10/32] iwpmd: move external declarations to iwarp_pm.h
From: Steve Wise @ 2016-10-13 19:07 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-11-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

looks fine.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>


--
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

* Re: [PATCH 06/32] srp_daemon: mark symbols as static where possible
From: Bart Van Assche @ 2016-10-13 19:06 UTC (permalink / raw)
  To: Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-7-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

On 10/13/2016 10:51 AM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
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

* Re: [PATCH 07/32] srp_daemon: give initialize_sysfs a proper ANSI-C prototype
From: Bart Van Assche @ 2016-10-13 19:05 UTC (permalink / raw)
  To: Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-8-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

On 10/13/2016 10:51 AM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

This is something I had not yet noticed myself. I think this means we 
will need to enable more compiler warnings for srp_daemon such that gcc 
also catches this. Anyway:

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
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

* Re: [PATCH 05/32] srp_daemon: use NULL instead of 0 for NULL pointers
From: Bart Van Assche @ 2016-10-13 19:03 UTC (permalink / raw)
  To: Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-6-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

On 10/13/2016 10:51 AM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
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

* Re: trivial sparse fixes for rdma-core
From: Jason Gunthorpe @ 2016-10-13 19:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

On Thu, Oct 13, 2016 at 07:51:03PM +0200, Christoph Hellwig wrote:
> This is the low hanging fruit in terms of reducing sparse noise before
> looking into endianess and iomem annotations.

Looks fine to me. Since I gave them a good compile test I also
prepared the pull request for the first 15 that made it to the list:

https://github.com/linux-rdma/rdma-core/pull/19

Here is the patch to turn on gcc -Wstrict-prototypes

https://github.com/jgunthorpe/rdma-plumbing/commit/dd80c3b362ae90d0de36a6249409c20581bae864

I'll grab the rest of the patches into this PR when they make it to
the list.

Made one tiny change, re-orderd 'iwpmd: fix the prototype for the
pthread_create start functionss' to be before 'iwpmd: use proper
ANSI-C prototypes for functions without arguments' as this ordering
keeps every patch buildable.

Regards,
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

* Re: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions without arguments
From: 'Christoph Hellwig' @ 2016-10-13 18:25 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: 'Christoph Hellwig', Steve Wise,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20161013182420.GA18755-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On Thu, Oct 13, 2016 at 12:24:20PM -0600, Jason Gunthorpe wrote:
> On Thu, Oct 13, 2016 at 08:09:59PM +0200, 'Christoph Hellwig' wrote:
> > On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> > > Is this fixing some warning?
> > 
> > Yes, this fixes warnings when running the code through sparse:
> > 
> > ../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
> > function 'create_netlink_socket'
> 
> Once these are all fixed, lets turn on -Wstrict-prototypes for gcc?

Those are fixed with my full series.  Which you won't see for now
as the mail server crapped out after the first 15, so I'll let people
review and merge that batch before spamming the list again.
--
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

* Re: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions without arguments
From: Jason Gunthorpe @ 2016-10-13 18:24 UTC (permalink / raw)
  To: 'Christoph Hellwig'; +Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20161013180959.GA28057-jcswGhMUV9g@public.gmane.org>

On Thu, Oct 13, 2016 at 08:09:59PM +0200, 'Christoph Hellwig' wrote:
> On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> > Is this fixing some warning?
> 
> Yes, this fixes warnings when running the code through sparse:
> 
> ../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
> function 'create_netlink_socket'

Once these are all fixed, lets turn on -Wstrict-prototypes for gcc?

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

* Re: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions without arguments
From: 'Christoph Hellwig' @ 2016-10-13 18:09 UTC (permalink / raw)
  To: Steve Wise; +Cc: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <01c201d2257c$83313be0$8993b3a0$@opengridcomputing.com>

On Thu, Oct 13, 2016 at 01:06:25PM -0500, Steve Wise wrote:
> Is this fixing some warning?

Yes, this fixes warnings when running the code through sparse:

../iwpmd/iwarp_pm_common.c:215:27: warning: non-ANSI function declaration of
function 'create_netlink_socket'
../iwpmd/iwarp_pm_server.c:90:33: warning: non-ANSI function declaration of
function 'iwpm_mapping_reqs_handler'
../iwpmd/iwarp_pm_server.c:142:33: warning: non-ANSI function declaration of
function 'iwpm_pending_msgs_handler'
../iwpmd/iwarp_pm_server.c:1282:30: warning: non-ANSI function declaration of
function 'iwarp_port_mapper'
../iwpmd/iwarp_pm_server.c:1359:35: warning: non-ANSI function declaration of
function 'daemonize_iwpm_server'
--
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

* RE: [PATCH 09/32] iwpmd: remove the unused check_iwpm_nlattr_tb prototype
From: Steve Wise @ 2016-10-13 18:07 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-10-git-send-email-hch-jcswGhMUV9g@public.gmane.org>



> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Christoph Hellwig
> Sent: Thursday, October 13, 2016 12:51 PM
> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH 09/32] iwpmd: remove the unused check_iwpm_nlattr_tb
> prototype
> 
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Looks good.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>


--
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

* RE: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions without arguments
From: Steve Wise @ 2016-10-13 18:06 UTC (permalink / raw)
  To: 'Christoph Hellwig', linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-9-git-send-email-hch-jcswGhMUV9g@public.gmane.org>



> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-
> owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Christoph Hellwig
> Sent: Thursday, October 13, 2016 12:51 PM
> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH 08/32] iwpmd: use proper ANSI-C prototypes for functions
without
> arguments
> 
> Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>

Is this fixing some warning?

Looks fine.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>



--
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

* [PATCH 15/32] cxgb4: remove unused function dump_wqe
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 providers/cxgb4/qp.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/providers/cxgb4/qp.c b/providers/cxgb4/qp.c
index 95b459a..376a00a 100644
--- a/providers/cxgb4/qp.c
+++ b/providers/cxgb4/qp.c
@@ -267,20 +267,6 @@ static int build_rdma_recv(struct c4iw_qp *qhp, union t4_recv_wr *wqe,
 	return 0;
 }
 
-void dump_wqe(void *arg)
-{
-	u64 *p = arg;
-	int len16;
-
-	len16 = be64_to_cpu(*p) & 0xff;
-	while (len16--) {
-		printf("%02x: %016llx ", (u8)(unsigned long)p, (long long)be64_to_cpu(*p));
-		p++;
-		printf("%016llx\n", (long long)be64_to_cpu(*p));
-		p++;
-	}
-}
-
 static void ring_kernel_db(struct c4iw_qp *qhp, u32 qid, u16 idx)
 {
 	struct ibv_modify_qp cmd;
-- 
2.1.4

--
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

* [PATCH 14/32] cxgb4: mark symbols static where possible
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 providers/cxgb4/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
index e1486ec..69b04ac 100644
--- a/providers/cxgb4/dev.c
+++ b/providers/cxgb4/dev.c
@@ -49,7 +49,7 @@
  * Macros needed to support the PCI Device ID Table ...
  */
 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
-	struct { \
+	static struct { \
 		unsigned vendor; \
 		unsigned device; \
 	} hca_table[] = {
-- 
2.1.4

--
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

* [PATCH 13/32] librdmacm: mark symbols static where possible
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 librdmacm/addrinfo.c              |  2 +-
 librdmacm/examples/rcopy.c        |  4 ++--
 librdmacm/examples/rdma_client.c  | 10 +++++-----
 librdmacm/examples/rdma_server.c  | 10 +++++-----
 librdmacm/examples/rdma_xclient.c | 10 +++++-----
 librdmacm/examples/rdma_xserver.c | 10 +++++-----
 librdmacm/rsocket.c               |  2 +-
 7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/librdmacm/addrinfo.c b/librdmacm/addrinfo.c
index 2f4e674..2c515a2 100644
--- a/librdmacm/addrinfo.c
+++ b/librdmacm/addrinfo.c
@@ -43,7 +43,7 @@
 #include <rdma/rdma_cma.h>
 #include <infiniband/ib.h>
 
-struct rdma_addrinfo nohints;
+static struct rdma_addrinfo nohints;
 
 static void ucma_convert_to_ai(struct addrinfo *ai, struct rdma_addrinfo *rai)
 {
diff --git a/librdmacm/examples/rcopy.c b/librdmacm/examples/rcopy.c
index 085b017..38f6929 100644
--- a/librdmacm/examples/rcopy.c
+++ b/librdmacm/examples/rcopy.c
@@ -59,8 +59,8 @@ static char *src_file;
 static struct timeval start, end;
 //static void buf[1024 * 1024];
 static uint64_t bytes;
-int fd;
-void *file_addr;
+static int fd;
+static void *file_addr;
 
 enum {
 	CMD_NOOP,
diff --git a/librdmacm/examples/rdma_client.c b/librdmacm/examples/rdma_client.c
index d7f65f5..fd7bbc2 100644
--- a/librdmacm/examples/rdma_client.c
+++ b/librdmacm/examples/rdma_client.c
@@ -39,11 +39,11 @@
 static char *server = "127.0.0.1";
 static char *port = "7471";
 
-struct rdma_cm_id *id;
-struct ibv_mr *mr, *send_mr;
-int send_flags;
-uint8_t send_msg[16];
-uint8_t recv_msg[16];
+static struct rdma_cm_id *id;
+static struct ibv_mr *mr, *send_mr;
+static int send_flags;
+static uint8_t send_msg[16];
+static uint8_t recv_msg[16];
 
 static int run(void)
 {
diff --git a/librdmacm/examples/rdma_server.c b/librdmacm/examples/rdma_server.c
index d98d11a..3c7c15e 100644
--- a/librdmacm/examples/rdma_server.c
+++ b/librdmacm/examples/rdma_server.c
@@ -38,11 +38,11 @@
 
 static char *port = "7471";
 
-struct rdma_cm_id *listen_id, *id;
-struct ibv_mr *mr, *send_mr;
-int send_flags;
-uint8_t send_msg[16];
-uint8_t recv_msg[16];
+static struct rdma_cm_id *listen_id, *id;
+static struct ibv_mr *mr, *send_mr;
+static int send_flags;
+static uint8_t send_msg[16];
+static uint8_t recv_msg[16];
 
 static int run(void)
 {
diff --git a/librdmacm/examples/rdma_xclient.c b/librdmacm/examples/rdma_xclient.c
index 8dba266..d86fee1 100644
--- a/librdmacm/examples/rdma_xclient.c
+++ b/librdmacm/examples/rdma_xclient.c
@@ -40,12 +40,12 @@
 static char *server = "127.0.0.1";
 static char port[6] = "7471";
 
-struct rdma_cm_id *id;
-struct ibv_mr *mr;
-struct rdma_addrinfo hints;
+static struct rdma_cm_id *id;
+static struct ibv_mr *mr;
+static struct rdma_addrinfo hints;
 
-uint8_t send_msg[16];
-uint32_t srqn;
+static uint8_t send_msg[16];
+static uint32_t srqn;
 
 static int post_send(void)
 {
diff --git a/librdmacm/examples/rdma_xserver.c b/librdmacm/examples/rdma_xserver.c
index 69f170b..f838e7d 100644
--- a/librdmacm/examples/rdma_xserver.c
+++ b/librdmacm/examples/rdma_xserver.c
@@ -40,12 +40,12 @@
 
 static char *port = "7471";
 
-struct rdma_cm_id *listen_id, *id;
-struct ibv_mr *mr;
-struct rdma_addrinfo hints;
+static struct rdma_cm_id *listen_id, *id;
+static struct ibv_mr *mr;
+static struct rdma_addrinfo hints;
 
-uint8_t recv_msg[16];
-uint32_t srqn;
+static uint8_t recv_msg[16];
+static uint32_t srqn;
 
 static int create_srq(void)
 {
diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c
index 7e7a38e..e0755dd 100644
--- a/librdmacm/rsocket.c
+++ b/librdmacm/rsocket.c
@@ -505,7 +505,7 @@ static int rs_scale_to_value(int value, int bits)
 		(void) rc;                                                     \
 	}
 
-void rs_configure(void)
+static void rs_configure(void)
 {
 	FILE *f;
 	static int init;
-- 
2.1.4

--
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

* [PATCH 12/32] iwpmd: fix the prototype for the pthread_create start functions
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

And also remove the unessecary taking of the address for function
arguments while we're at it.

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 iwpmd/iwarp_pm_server.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/iwpmd/iwarp_pm_server.c b/iwpmd/iwarp_pm_server.c
index b8ae3e3..ab90c6c 100644
--- a/iwpmd/iwarp_pm_server.c
+++ b/iwpmd/iwarp_pm_server.c
@@ -87,7 +87,7 @@ static void iwpm_signal_handler(int signum)
 /**
  * iwpm_mapping_reqs_handler - Handle mapping requests timeouts and retries
  */
-static void *iwpm_mapping_reqs_handler(void)
+static void *iwpm_mapping_reqs_handler(void *unused)
 {
 	iwpm_mapping_request *iwpm_map_req, *next_map_req;
 	int ret = 0;
@@ -139,7 +139,7 @@ mapping_reqs_handler_exit:
 /**
  * iwpm_pending_msgs_handler - Handle sending iwarp port mapper wire messages
  */
-static void *iwpm_pending_msgs_handler(void)
+static void *iwpm_pending_msgs_handler(void *unused)
 {
 	iwpm_pending_msg *pending_msg;
 	iwpm_send_msg *send_msg;
@@ -1438,11 +1438,11 @@ int main(int argc, char *argv[])
 	pthread_cond_init(&cond_req_complete, NULL);
 	pthread_cond_init(&cond_pending_msg, NULL);
 
-	ret = pthread_create(&map_req_thread, NULL, &iwpm_mapping_reqs_handler, NULL);
+	ret = pthread_create(&map_req_thread, NULL, iwpm_mapping_reqs_handler, NULL);
 	if (ret)
 		goto error_exit;
 
-	ret = pthread_create(&pending_msg_thread, NULL, &iwpm_pending_msgs_handler, NULL);
+	ret = pthread_create(&pending_msg_thread, NULL, iwpm_pending_msgs_handler, NULL);
 	if (ret)
 		goto error_exit;
 
-- 
2.1.4

--
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

* [PATCH 11/32] iwpmd: mark symbols static where possible
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 iwpmd/iwarp_pm_common.c |  6 +++---
 iwpmd/iwarp_pm_server.c | 20 ++++++++++----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/iwpmd/iwarp_pm_common.c b/iwpmd/iwarp_pm_common.c
index b20a368..ee9d119 100644
--- a/iwpmd/iwarp_pm_common.c
+++ b/iwpmd/iwarp_pm_common.c
@@ -39,9 +39,9 @@
 #endif
 
 /* iwpm config params */
-char * iwpm_param_names[IWPM_PARAM_NUM] = 
+static char * iwpm_param_names[IWPM_PARAM_NUM] =
 	{ "nl_sock_rbuf_size" };
-int iwpm_param_vals[IWPM_PARAM_NUM] = 
+static int iwpm_param_vals[IWPM_PARAM_NUM] =
 	{ 0 };
 
 /**
@@ -276,7 +276,7 @@ void destroy_iwpm_socket(int pm_sock)
 /**
  * check_iwpm_nlattr - Check for NULL netlink attribute
  */ 
-int check_iwpm_nlattr(struct nlattr *nltb[], int nla_count)
+static int check_iwpm_nlattr(struct nlattr *nltb[], int nla_count)
 { 
         int i, ret = 0;          
         for (i = 1; i < nla_count; i++) {
diff --git a/iwpmd/iwarp_pm_server.c b/iwpmd/iwarp_pm_server.c
index 89d3ee5..b8ae3e3 100644
--- a/iwpmd/iwarp_pm_server.c
+++ b/iwpmd/iwarp_pm_server.c
@@ -34,34 +34,34 @@
 #include "config.h"
 #include "iwarp_pm.h"
 
-const char iwpm_ulib_name [] = "iWarpPortMapperUser";
-int iwpm_version = 3;
+static const char iwpm_ulib_name [] = "iWarpPortMapperUser";
+static int iwpm_version = 3;
 
 LIST_HEAD(mapping_reqs);		      /* list of map tracking objects */
 LIST_HEAD(pending_messages);		      /* list of pending wire messages */
 iwpm_client client_list[IWARP_PM_MAX_CLIENTS];/* list of iwarp port mapper clients */
-int mapinfo_num_list[IWARP_PM_MAX_CLIENTS];   /* list of iwarp port mapper clients */
+static int mapinfo_num_list[IWARP_PM_MAX_CLIENTS];   /* list of iwarp port mapper clients */
 
 /* socket handles */
 static int pmv4_sock, pmv6_sock, netlink_sock, pmv4_client_sock, pmv6_client_sock;
 
-pthread_t map_req_thread; /* handling mapping requests timeout */
-pthread_cond_t cond_req_complete;
+static pthread_t map_req_thread; /* handling mapping requests timeout */
+pthread_cond_t cond_req_complete; 
 pthread_mutex_t map_req_mutex = PTHREAD_MUTEX_INITIALIZER;
 int wake = 0; /* set if map_req_thread is wake */
 
-pthread_t pending_msg_thread; /* sending iwpm wire messages */
+static pthread_t pending_msg_thread; /* sending iwpm wire messages */
 pthread_cond_t cond_pending_msg;
 pthread_mutex_t pending_msg_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void iwpm_cleanup(void);
-int print_mappings = 0;
+static int print_mappings = 0;
 
 /**
  * iwpm_signal_handler - Handle signals which iwarp port mapper receives
  * @signum: the number of the caught signal
  */
-void iwpm_signal_handler(int signum)
+static void iwpm_signal_handler(int signum)
 {
 	switch(signum) {
 		case SIGHUP:
@@ -87,7 +87,7 @@ void iwpm_signal_handler(int signum)
 /**
  * iwpm_mapping_reqs_handler - Handle mapping requests timeouts and retries
  */
-void *iwpm_mapping_reqs_handler(void)
+static void *iwpm_mapping_reqs_handler(void)
 {
 	iwpm_mapping_request *iwpm_map_req, *next_map_req;
 	int ret = 0;
@@ -139,7 +139,7 @@ mapping_reqs_handler_exit:
 /**
  * iwpm_pending_msgs_handler - Handle sending iwarp port mapper wire messages
  */
-void *iwpm_pending_msgs_handler(void)
+static void *iwpm_pending_msgs_handler(void)
 {
 	iwpm_pending_msg *pending_msg;
 	iwpm_send_msg *send_msg;
-- 
2.1.4

--
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

* [PATCH 10/32] iwpmd: move external declarations to iwarp_pm.h
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 iwpmd/iwarp_pm.h        | 8 ++++++++
 iwpmd/iwarp_pm_common.c | 2 --
 iwpmd/iwarp_pm_helper.c | 6 ------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/iwpmd/iwarp_pm.h b/iwpmd/iwarp_pm.h
index 1a2b69a..766e34f 100644
--- a/iwpmd/iwarp_pm.h
+++ b/iwpmd/iwarp_pm.h
@@ -277,4 +277,12 @@ void free_iwpm_mapped_ports(void);
 extern struct list_head pending_messages;
 extern struct list_head mapping_reqs;
 
+extern iwpm_client client_list[IWARP_PM_MAX_CLIENTS];
+
+extern pthread_cond_t cond_req_complete;
+extern pthread_mutex_t map_req_mutex;
+extern int wake;
+extern pthread_cond_t cond_pending_msg;
+extern pthread_mutex_t pending_msg_mutex;
+
 #endif
diff --git a/iwpmd/iwarp_pm_common.c b/iwpmd/iwarp_pm_common.c
index aa6b4a0..b20a368 100644
--- a/iwpmd/iwarp_pm_common.c
+++ b/iwpmd/iwarp_pm_common.c
@@ -44,8 +44,6 @@ char * iwpm_param_names[IWPM_PARAM_NUM] =
 int iwpm_param_vals[IWPM_PARAM_NUM] = 
 	{ 0 };
 
-extern iwpm_client client_list[IWARP_PM_MAX_CLIENTS];
-
 /**
  * get_iwpm_param()
  */
diff --git a/iwpmd/iwarp_pm_helper.c b/iwpmd/iwarp_pm_helper.c
index 0b115c8..63530f1 100644
--- a/iwpmd/iwarp_pm_helper.c
+++ b/iwpmd/iwarp_pm_helper.c
@@ -35,12 +35,6 @@
 
 static LIST_HEAD(mapped_ports);		/* list of mapped ports */
 
-extern pthread_cond_t cond_req_complete;
-extern pthread_mutex_t map_req_mutex;
-extern int wake; /* set if map_req_thread is wake */
-extern pthread_cond_t cond_pending_msg;
-extern pthread_mutex_t pending_msg_mutex;
-
 /**
  * create_iwpm_map_request - Create a new map request tracking object
  * @req_nlh: netlink header of the received client message
-- 
2.1.4

--
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

* [PATCH 09/32] iwpmd: remove the unused check_iwpm_nlattr_tb prototype
From: Christoph Hellwig @ 2016-10-13 17:51 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476381095-20041-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>

Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
---
 iwpmd/iwarp_pm.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/iwpmd/iwarp_pm.h b/iwpmd/iwarp_pm.h
index 8b7eeb1..1a2b69a 100644
--- a/iwpmd/iwarp_pm.h
+++ b/iwpmd/iwarp_pm.h
@@ -209,8 +209,6 @@ int create_netlink_socket(void);
 
 void destroy_iwpm_socket(int);
 
-int check_iwpm_nlattr_tb(struct nlattr * [], int);
-
 int parse_iwpm_nlmsg(struct nlmsghdr *, int, struct nla_policy *, struct nlattr * [], const char *);
 
 int parse_iwpm_msg(iwpm_wire_msg *, iwpm_msg_parms *);
-- 
2.1.4

--
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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox