Sean, Thanks for the quick reply. Some errors got resolved some new added. Some of the errors but not all are caused by the picky gcc 3.4.4 that I could avoid by some casting. I left them all in to give you the whole picture. Here is the actual output:
cmpost.c:65: error: field `path_rec' has incomplete type cmpost.c: In function `int modify_to_rtr(cmtest_node*)': cmpost.c:130: error: invalid conversion from `int' to `ibv_qp_attr_mask' cmpost.c:130: error: initializing argument 3 of `int ibv_modify_qp(ibv_qp*, ibv_qp_attr*, ibv_qp_attr_mask)' cmpost.c:142: error: invalid conversion from `int' to `ibv_qp_attr_mask' cmpost.c:142: error: initializing argument 3 of `int ibv_modify_qp(ibv_qp*, ibv_qp_attr*, ibv_qp_attr_mask)' cmpost.c: In function `int modify_to_rts(cmtest_node*)': cmpost.c:161: error: invalid conversion from `int' to `ibv_qp_attr_mask' cmpost.c:161: error: initializing argument 3 of `int ibv_modify_qp(ibv_qp*, ibv_qp_attr*, ibv_qp_attr_mask)' cmpost.c: In function `void cm_handler(ib_cm_id*, ib_cm_event*)': cmpost.c:267: error: invalid conversion from `void*' to `cmtest_node*' cmpost.c: In function `int create_nodes()': cmpost.c:353: error: invalid conversion from `void*' to `cmtest_node*' cmpost.c: In function `int query_for_path(char*)': cmpost.c:631: error: `RDMA_PS_TCP' undeclared (first use this function) cmpost.c:631: error: (Each undeclared identifier is reported only once for each function it appears in.) cmpost.c:657: error: 'struct cmtest' has no member named 'path_rec' cmpost.c:657: error: invalid use of undefined type `struct ibv_sa_path_rec' /vob/pkgs/sys/linux-include/rdma/rdma_cma.h:84: error: forward declaration of `struct ibv_sa_path_rec' cmpost.c: In function `void run_client(char*)': cmpost.c:678: error: 'struct cmtest' has no member named 'path_rec' *** Error code 1 clearmake: Error: Build script failed for "cmpost.o" Thomas -----Original Message----- From: Sean Hefty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 15, 2006 6:11 PM To: Bub Thomas; [email protected] Cc: Erez Cohen Subject: [PATCH] cmpost: allow cmpost to build with latest RDMA CM Can you see if this patch lets you build compost? Signed-off-by: Sean Hefty <[EMAIL PROTECTED]> --- Index: examples/cmpost.c =================================================================== --- examples/cmpost.c (revision 8215) +++ examples/cmpost.c (working copy) @@ -614,6 +614,7 @@ out: static int query_for_path(char *dst) { + struct rdma_event_channel *channel; struct rdma_cm_id *id; struct sockaddr_in addr_in; struct rdma_cm_event *event; @@ -623,15 +624,19 @@ static int query_for_path(char *dst) if (ret) return ret; - ret = rdma_create_id(&id, NULL); + channel = rdma_create_event_channel(); + if (!channel) + return -1; + + ret = rdma_create_id(channel, &id, NULL, RDMA_PS_TCP); if (ret) - return ret; + goto destroy_channel; ret = rdma_resolve_addr(id, NULL, (struct sockaddr *) &addr_in, 2000); if (ret) goto out; - ret = rdma_get_cm_event(&event); + ret = rdma_get_cm_event(channel, &event); if (!ret && event->event != RDMA_CM_EVENT_ADDR_RESOLVED) ret = event->status; rdma_ack_cm_event(event); @@ -642,7 +647,7 @@ static int query_for_path(char *dst) if (ret) goto out; - ret = rdma_get_cm_event(&event); + ret = rdma_get_cm_event(channel, &event); if (!ret && event->event != RDMA_CM_EVENT_ROUTE_RESOLVED) ret = event->status; rdma_ack_cm_event(event); @@ -652,6 +657,8 @@ static int query_for_path(char *dst) test.path_rec = id->route.path_rec[0]; out: rdma_destroy_id(id); +destroy_channel: + rdma_destroy_event_channel(channel); return ret; } _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
