Eliminate GCC warnings
This patch series has already been applied, oops. I sent the pull request, then got TravisCI working then ran out of time to send to the list before Doug picked it.
Anyhow, most patches were on the list already in this group, save for a few for ibacm.
Here are the commits, squashed diff below.
If anyone has concerns..
The notable change is this makes TravisCI use -Werror, and runs the build on 32 bit as well. So all future commits must be warning free on 64/32 bit GCC 6.2 to keep Travis happy.
Jason
.travis.yml | 16 ++++++++- ibacm/src/acm.c | 9 ++--- ibacm/src/acme.c | 5 +-- iwpmd/src/iwarp_pm_helper.c | 2 - libhfi1verbs/src/verbs.c | 2 - libi40iw/src/i40iw_uverbs.c | 6 +-- libibumad/tests/umad_reg2_compat.c | 1 libibverbs/examples/asyncwatch.c | 2 - libibverbs/examples/pingpong.c | 2 - libibverbs/examples/rc_pingpong.c | 19 +++++------ libibverbs/examples/srq_pingpong.c | 17 +++++++--- libibverbs/examples/uc_pingpong.c | 19 +++++------ libibverbs/examples/ud_pingpong.c | 21 +++++-------- libibverbs/examples/xsrq_pingpong.c | 4 +- libibverbs/src/neigh.c | 21 ++++++------- libipathverbs/src/verbs.c | 2 - libmlx5/src/verbs.c | 4 +- libnes/src/nes_uverbs.c | 21 +++++++------ libocrdma/src/ocrdma_verbs.c | 3 + librdmacm/examples/cmtime.c | 16 --------- librdmacm/src/acm.c | 3 + librdmacm/src/rsocket.c | 58 +++++++++++++++++++++++++----------- librxe/src/rxe.c | 6 +++ 23 files changed, 146 insertions(+), 113 deletions(-)
.travis.yml +14 -2
@@ -21,8 +21,20 @@ addons: - pkg-config - python - valgrind + + # 32 bit support packages + - gcc-multilib + - lib32gcc-6-dev script: - - mkdir build + - mkdir build build32 - cd build - - CC=gcc-6 cmake -GNinja .. + # The goal is warning free compile on latest gcc. + - CC=gcc-6 CFLAGS=-Werror cmake -GNinja .. + - ninja + + # 32 bit build + - cd ../build32 + # travis's trusty is not configured in a way that enables all32 bit + # packages. We could fix this with some sudo stuff.. For now turn off libnl + - CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0 - ninja
ibacm/src/acm.c +4 -5
@@ -218,7 +218,7 @@ static struct sa_data {struct pollfd *fds;struct acmc_port **ports;int nfds; -} sa = { 2000, 2, 1}; +} sa = { 2000, 2, 1, 0, NULL, NULL, 0};/* * Service options - may be set through ibacm_opts.cfg file.
@@ -1402,7 +1402,7 @@ static int acm_nl_send(SOCKET sock, struct acm_msg *msg)int ret;int datalen; - orig = (struct acm_nl_msg *) msg->hdr.tid; + orig = (struct acm_nl_msg *)(uintptr_t )msg->hdr.tid;memset (&dst_addr,0 ,sizeof (dst_addr)); dst_addr.nl_family =AF_NETLINK ;
@@ -1562,7 +1562,7 @@ static void acm_nl_process_invalid_request(struct acmc_client *client, msg.hdr.version =ACM_VERSION ; msg.hdr.length =ACM_MSG_HDR_LENGTH ; msg.hdr.status =ACM_STATUS_EINVAL ; - msg.hdr.tid = (uint64_t ) acmnlmsg; + msg.hdr.tid = (uintptr_t ) acmnlmsg;acm_nl_send (client->sock, &msg); }
@@ -1584,7 +1584,7 @@ static void acm_nl_process_resolve(struct acmc_client *client, msg.hdr.version =ACM_VERSION ; msg.hdr.length =ACM_MSG_HDR_LENGTH +ACM_MSG_EP_LENGTH ; msg.hdr.status =ACM_STATUS_SUCCESS ; - msg.hdr.tid = (uint64_t ) acmnlmsg; + msg.hdr.tid = (uintptr_t ) acmnlmsg; msg.resolve_data[0 ].type =ACM_EP_INFO_PATH ;/* We support only one pathrecord */
@@ -3031,7 +3031,6 @@ static int acm_open_lock_file(void)snprintf (pid,sizeof pid,"%d\n" ,getpid ());if (write (lock_fd, pid,strlen (pid)) !=strlen (pid)){ -lockf (lock_fd,F_ULOCK ,0 );close (lock_fd);return -1 ; }
ibacm/src/acme.c +3 -2
@@ -38,6 +38,7 @@#include <getopt.h> #include <netdb.h> #include <arpa/inet.h> +#include <inttypes.h> #include <osd.h> #include <infiniband/verbs.h>
@@ -902,7 +903,7 @@ static int enumerate_ep(char *svc, int index) labels =1 ; } -printf ("%s,0x%016lx,%d,0x%04x,%d,%s" , svc, ep_data->dev_guid, +printf ("%s,0x%016" PRIx64",%d,0x%04x,%d,%s" , svc, ep_data->dev_guid, ep_data->port_num, ep_data->pkey, index, ep_data->prov_name);for (i =0 ; i < ep_data->addr_cnt; i++)printf (",%s" , ep_data->addrs[i].name);
@@ -927,7 +928,7 @@ static void enumerate_eps(char *svc)static int query_svcs (void ) {char **svc_list; -int ret, i; +int ret =-1 , i; svc_list =parse (svc_arg,NULL );if (!svc_list) {
iwpmd/src/iwarp_pm_helper.c +1 -1
@@ -82,7 +82,7 @@ iwpm_mapping_request *create_iwpm_map_request(struct nlmsghdr *req_nlh,/* assochandle helps match iwpm request sent to remote peer with future iwpm accept/reject */ iwpm_map_req->assochandle = assochandle;if (!assochandle) - iwpm_map_req->assochandle = (__u64 )iwpm_map_req; + iwpm_map_req->assochandle = (uintptr_t )iwpm_map_req;memcpy (&iwpm_map_req->src_addr, src_addr,sizeof (struct sockaddr_storage ));/* keep record of remote IP address and port */
libhfi1verbs/src/verbs.c +1 -1
@@ -607,7 +607,7 @@ int hfi1_modify_srq(struct ibv_srq *ibsrq, (sizeof(struct ibv_sge) * srq->rq.max_sge)) * srq->rq.size; } - cmd.offset_addr = (__u64) &offset; + cmd.offset_addr = (uintptr_t ) &offset; ret =ibv_cmd_modify_srq (ibsrq, attr, attr_mask, &cmd.ibv_cmd,sizeof cmd);if (ret) {
libi40iw/src/i40iw_uverbs.c +3 -3
@@ -557,7 +557,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd,return 0 ; } cmd.user_wqe_buffers = (__u64)((uintptr_t )info->sq); - cmd.user_compl_ctx = (u64)&iwuqp->qp; + cmd.user_compl_ctx = (uintptr_t )&iwuqp->qp; ret =ibv_cmd_create_qp (pd, &iwuqp->ibv_qp, attr, &cmd.ibv_cmd,sizeof (cmd), &resp->ibv_resp,sizeof (struct i40iw_ucreate_qp_resp ));
@@ -858,7 +858,7 @@ int i40iw_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, struct ibv info.op_type =I40IW_OP_TYPE_SEND ;if (ib_wr->send_flags &IBV_SEND_INLINE ) { - info.op.inline_send.data = (void *)ib_wr->sg_list[0 ].addr; + info.op.inline_send.data = (void *)(uintptr_t )ib_wr->sg_list[0 ].addr; info.op.inline_send.len = ib_wr->sg_list[0 ].length; ret = iwuqp->qp.ops.iw_inline_send (&iwuqp->qp, &info, ib_wr->wr.rdma.rkey, false);
@@ -881,7 +881,7 @@ int i40iw_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, struct ibv info.op_type =I40IW_OP_TYPE_RDMA_WRITE ;if (ib_wr->send_flags &IBV_SEND_INLINE ) { - info.op.inline_rdma_write.data = (void *)ib_wr->sg_list[0 ].addr; + info.op.inline_rdma_write.data = (void *)(uintptr_t )ib_wr->sg_list[0 ].addr; info.op.inline_rdma_write.len = ib_wr->sg_list[0 ].length; info.op.inline_rdma_write.rem_addr.tag_off = ib_wr->wr.rdma.remote_addr; info.op.inline_rdma_write.rem_addr.len = ib_wr->sg_list->length;
libibumad/tests/umad_reg2_compat.c +0 -1
@@ -100,7 +100,6 @@ int open_test_device(void)void test_register (void ) { -int rc =0 ;int agent_id;long method_mask[16 /sizeof (long )];uint32_t class_oui =0x001405 ;/* OPENIB_OUI */
libibverbs/examples/asyncwatch.c +1 -1
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])static struct option long_options[] = { { .name ="ib-dev" , .has_arg =1 , .val ='d' }, { .name ="help" , .has_arg =0 , .val ='h' }, - {0 } + {} }; c =getopt_long (argc, argv,"d:h" , long_options,NULL );
libibverbs/examples/pingpong.c +1 -1
@@ -44,7 +44,7 @@ enum ibv_mtu pp_mtu_to_enum(int mtu)case 1024 :return IBV_MTU_1024 ;case 2048 :return IBV_MTU_2048 ;case 4096 :return IBV_MTU_4096 ; -default :return -1 ; +default :return 0 ; } }
libibverbs/examples/rc_pingpong.c +9 -10
@@ -208,14 +208,13 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por goto out; } -if (read (sockfd, msg,sizeof msg) !=sizeof msg) { -perror ("client read" ); -fprintf (stderr,"Couldn't read remote address\n" ); +if (read (sockfd, msg,sizeof msg) !=sizeof msg || +write (sockfd,"done" ,sizeof "done" ) !=sizeof "done" ) { +perror ("client read/write" ); +fprintf (stderr,"Couldn't read/write remote address\n" ); goto out; } -write (sockfd,"done" ,sizeof "done" ); - rem_dest =malloc (sizeof *rem_dest);if (!rem_dest) goto out;
@@ -316,14 +315,14 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,gid_to_wire_gid (&my_dest->gid, gid);sprintf (msg,"%04x:%06x:%06x:%s" , my_dest->lid, my_dest->qpn, my_dest->psn, gid); -if (write (connfd, msg,sizeof msg) !=sizeof msg) { -fprintf (stderr,"Couldn't send local address\n" ); +if (write (connfd, msg,sizeof msg) !=sizeof msg || +read (connfd, msg,sizeof msg) !=sizeof msg) { +fprintf (stderr,"Couldn't send/recv local address\n" );free (rem_dest); rem_dest =NULL ; goto out; } -read (connfd, msg,sizeof msg); out:close (connfd);
@@ -732,7 +731,7 @@ int main(int argc, char *argv[]) { .name = "gid-idx", .has_arg = 1, .val = 'g' }, { .name = "odp", .has_arg = 0, .val = 'o' }, { .name = "ts", .has_arg = 0, .val = 't' }, - { 0 } + {} }; c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:ot",
@@ -768,7 +767,7 @@ int main(int argc, char *argv[])case 'm' : mtu =pp_mtu_to_enum (strtol (optarg,NULL ,0 )); -if (mtu <0 ) { +if (mtu ==0 ) {usage (argv[0 ]);return 1 ; }
libibverbs/examples/srq_pingpong.c +12 -5
@@ -222,8 +222,10 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int porwire_gid_to_gid (gid, &rem_dest[i].gid); } -write (sockfd,"done" ,sizeof "done" ); - +if (write (sockfd,"done" ,sizeof "done" ) !=sizeof "done" ) { +perror ("client write" ); + goto out; + } out:close (sockfd);return rem_dest;
@@ -333,7 +335,12 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx, } } -read (connfd, msg,sizeof msg); +if (read (connfd, msg,sizeof msg) !=sizeof msg) { +perror ("client write" ); +free (rem_dest); + rem_dest =NULL ; + goto out; + } out:close (connfd);
@@ -658,7 +665,7 @@ int main(int argc, char *argv[]) { .name = "sl", .has_arg = 1, .val = 'l' }, { .name = "events", .has_arg = 0, .val = 'e' }, { .name = "gid-idx", .has_arg = 1, .val = 'g' }, - { 0 } + {} }; c = getopt_long(argc, argv, "p:d:i:s:m:q:r:n:l:eg:",
@@ -697,7 +704,7 @@ int main(int argc, char *argv[])case 'm' : mtu =pp_mtu_to_enum (strtol (optarg,NULL ,0 )); -if (mtu <0 ) { +if (mtu ==0 ) {usage (argv[0 ]);return 1 ; }
libibverbs/examples/uc_pingpong.c +9 -10
@@ -176,13 +176,13 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por goto out; } -if (read (sockfd, msg,sizeof msg) !=sizeof msg) { -perror ("client read" ); -fprintf (stderr,"Couldn't read remote address\n" ); +if (read (sockfd, msg,sizeof msg) !=sizeof msg || +write (sockfd,"done" ,sizeof "done" ) !=sizeof "done" ) { +perror ("client read/write" ); +fprintf (stderr,"Couldn't read/write remote address\n" ); goto out; } -write (sockfd,"done" ,sizeof "done" ); rem_dest =malloc (sizeof *rem_dest);if (!rem_dest)
@@ -284,15 +284,14 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,gid_to_wire_gid (&my_dest->gid, gid);sprintf (msg,"%04x:%06x:%06x:%s" , my_dest->lid, my_dest->qpn, my_dest->psn, gid); -if (write (connfd, msg,sizeof msg) !=sizeof msg) { -fprintf (stderr,"Couldn't send local address\n" ); +if (write (connfd, msg,sizeof msg) !=sizeof msg || +read (connfd, msg,sizeof msg) !=sizeof msg) { +fprintf (stderr,"Couldn't send/recv local address\n" );free (rem_dest); rem_dest =NULL ; goto out; } -read (connfd, msg,sizeof msg); - out:close (connfd);return rem_dest;
@@ -569,7 +568,7 @@ int main(int argc, char *argv[]) { .name = "sl", .has_arg = 1, .val = 'l' }, { .name = "events", .has_arg = 0, .val = 'e' }, { .name = "gid-idx", .has_arg = 1, .val = 'g' }, - { 0 } + {} }; c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:",
@@ -604,7 +603,7 @@ int main(int argc, char *argv[])case 'm' : mtu =pp_mtu_to_enum (strtol (optarg,NULL ,0 )); -if (mtu <0 ) { +if (mtu ==0 ) {usage (argv[0 ]);return 1 ; }
libibverbs/examples/ud_pingpong.c +9 -12
@@ -176,14 +176,13 @@ static struct pingpong_dest *pp_client_exch_dest(const char *servername, int por goto out; } -if (read (sockfd, msg,sizeof msg) !=sizeof msg) { -perror ("client read" ); -fprintf (stderr,"Couldn't read remote address\n" ); +if (read (sockfd, msg,sizeof msg) !=sizeof msg || +write (sockfd,"done" ,sizeof "done" ) !=sizeof "done" ) { +perror ("client read/write" ); +fprintf (stderr,"Couldn't read/write remote address\n" ); goto out; } -write (sockfd,"done" ,sizeof "done" ); - rem_dest =malloc (sizeof *rem_dest);if (!rem_dest) goto out;
@@ -282,15 +281,13 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,gid_to_wire_gid (&my_dest->gid, gid);sprintf (msg,"%04x:%06x:%06x:%s" , my_dest->lid, my_dest->qpn, my_dest->psn, gid); -if (write (connfd, msg,sizeof msg) !=sizeof msg) { -fprintf (stderr,"Couldn't send local address\n" ); +if (write (connfd, msg,sizeof msg) !=sizeof msg || +read (connfd, msg,sizeof msg) !=sizeof msg) { +fprintf (stderr,"Couldn't send/recv local address\n" );free (rem_dest); rem_dest =NULL ; goto out; } - -read (connfd, msg,sizeof msg); - out:close (connfd);return rem_dest;
@@ -327,7 +324,7 @@ static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size, } { -struct ibv_port_attr port_info = {0 }; +struct ibv_port_attr port_info = {};int mtu;if (ibv_query_port (ctx->context, port, &port_info)) {
@@ -591,7 +588,7 @@ int main(int argc, char *argv[]) { .name = "sl", .has_arg = 1, .val = 'l' }, { .name = "events", .has_arg = 0, .val = 'e' }, { .name = "gid-idx", .has_arg = 1, .val = 'g' }, - { 0 } + {} }; c = getopt_long(argc, argv, "p:d:i:s:r:n:l:eg:",
libibverbs/examples/xsrq_pingpong.c +2 -2
@@ -875,7 +875,7 @@ int main(int argc, char *argv[]) { .name = "sl", .has_arg = 1, .val = 'l' }, { .name = "events", .has_arg = 0, .val = 'e' }, { .name = "gid-idx", .has_arg = 1, .val = 'g' }, - { 0 } + {} }; c = getopt_long(argc, argv, "p:d:i:s:m:c:n:l:eg:", long_options,
@@ -906,7 +906,7 @@ int main(int argc, char *argv[])break ;case 'm' : ctx.mtu =pp_mtu_to_enum (strtol (optarg,NULL ,0 )); -if (ctx.mtu <0 ) { +if (ctx.mtu ==0 ) {usage (argv[0 ]);return 1 ; }
libibverbs/src/neigh.c +11 -10
@@ -19,6 +19,7 @@#include <unistd.h> #include <ifaddrs.h> #include <netdb.h> +#include <assert.h> #ifndef _LINUX_IF_H#include <net/if.h> #else
@@ -207,7 +208,7 @@ static int create_socket(struct get_neigh_handler *neigh_handler, &addr_src.len);if (err) { errno =EADDRNOTAVAIL ; -return err; +return -1 ; } addr_dst->len =sizeof (addr_dst->sktaddr);
@@ -216,24 +217,22 @@ static int create_socket(struct get_neigh_handler *neigh_handler, &addr_dst->len);if (err) { errno =EADDRNOTAVAIL ; -return err; +return -1 ; } err =set_link_port (&addr_dst->sktaddr,PORT_DISCARD , neigh_handler->oif);if (err) -return err; +return -1 ; sock_fd =socket (addr_dst->sktaddr.s.sa_family,SOCK_DGRAM |SOCK_CLOEXEC ,0 );if (sock_fd ==-1 ) -return errno ? -errno :-1 ; +return -1 ; err =bind (sock_fd, &addr_src.sktaddr.s, addr_src.len);if (err) { -int bind_err = -errno; -close (sock_fd); -return bind_err ?:EADDRNOTAVAIL ; +return -1 ; } *psock_fd = sock_fd;
@@ -374,9 +373,11 @@ static struct nl_addr *process_get_neigh_mac(if (FD_ISSET (timer_fd, &fdset)) {uint64_t read_val; +ssize_t rc; - (void )read (timer_fd, &read_val, -sizeof (read_val)); + rc = +read (timer_fd, &read_val,sizeof (read_val)); +assert (rc ==sizeof (read_val));if (++retries >=NUM_OF_TRIES ) {if (!errno) errno =EDESTADDRREQ ;
@@ -729,7 +730,7 @@ uint16_t neigh_get_vlan_id_from_dev(struct get_neigh_handler *neigh_handler)void neigh_set_vlan_id (struct get_neigh_handler *neigh_handler,uint16_t vid) { -if (vid >=0 && vid <=0xfff ) +if (vid <=0xfff ) neigh_handler->vid = vid; }
libipathverbs/src/verbs.c +1 -1
@@ -583,7 +583,7 @@ int ipath_modify_srq(struct ibv_srq *ibsrq, (sizeof(struct ibv_sge) * srq->rq.max_sge)) * srq->rq.size; } - cmd.offset_addr = (__u64) &offset; + cmd.offset_addr = (uintptr_t ) &offset; ret =ibv_cmd_modify_srq (ibsrq, attr, attr_mask, &cmd.ibv_cmd,sizeof cmd);if (ret) {
libmlx5/src/verbs.c +2 -2
@@ -1700,8 +1700,8 @@ mlx5_open_xrcd(struct ibv_context *context, {int err;struct verbs_xrcd *xrcd; -struct ibv_open_xrcd cmd = {0 }; -struct ibv_open_xrcd_resp resp = {0 }; +struct ibv_open_xrcd cmd = {}; +struct ibv_open_xrcd_resp resp = {}; xrcd =calloc (1 ,sizeof (*xrcd));if (!xrcd)
libnes/src/nes_uverbs.c +12 -9
@@ -215,6 +215,7 @@ int nes_udereg_mr(struct ibv_mr *mr)return 0 ; } +#if HAVE_DECL_IBV_QPT_RAW_ETH static int nes_ima_ureplace_cq(struct ibv_cq *cq, int mcrqf,
@@ -296,6 +297,7 @@ int nes_ima_ureplace_cq(struct ibv_cq *cq, err: return ret; } +#endif /** * nes_ucreate_cq
@@ -425,7 +427,6 @@ int nes_ima_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)int cqe_count =0 ;uint32_t head;uint32_t cq_size; -uint16_t qp_size;volatile struct nes_hw_nic_cqe *cqe =0 ;volatile struct nes_hw_nic_cqe *cqes;
@@ -487,7 +488,6 @@ int nes_ima_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry) entry->src_qp = nesuqp->qp_id;if (cqe_misc &NES_NIC_CQE_SQ ) { entry->opcode =IBV_WC_SEND ; - qp_size = nesuqp->sq_size; entry->wr_id = nesuqp->send_wr_id[nesuqp->sq_tail];
@@ -518,8 +518,8 @@ int nes_ima_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)/* Working on a RQ Completion*/ if (++nesuqp->rq_tail >= nesuqp->rq_size) nesuqp->rq_tail =0 ; -if (entry->status ==NES_CQ_BUF_OV_ERR ) - entry->status =IBV_WC_LOC_LEN_ERR ; +if (entry->status ==NES_CQ_BUF_OV_ERR ) + entry->status =IBV_WC_LOC_LEN_ERR ; }if (++head >= cq_size)
@@ -557,7 +557,6 @@ int nes_upoll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *entry)uint32_t wqe_index;uint32_t wq_tail =0 ;struct nes_hw_cqe cqe; -uint32_t tmp;uint64_t u64temp;int move_cq_head =1 ;uint32_t err_code;
@@ -679,7 +678,6 @@ nes_upoll_cq_update: nesvctx =to_nes_uctx (cq->context); nesvctx->nesupd->udoorbell->cqe_alloc =cpu_to_le32 (nesucq->cq_id | (nesucq->polled_completions <<16 )); - tmp = nesvctx->nesupd->udoorbell->cqe_alloc; nesucq->polled_completions =0 ; } }else {
@@ -699,7 +697,6 @@ nes_upoll_cq_update: nesvctx =to_nes_uctx (cq->context); nesvctx->nesupd->udoorbell->cqe_alloc =cpu_to_le32 (nesucq->cq_id | (nesucq->polled_completions <<16 )); - tmp = nesvctx->nesupd->udoorbell->cqe_alloc; nesucq->polled_completions =0 ; } nesucq->head = head;
@@ -1140,7 +1137,6 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)struct nes_uqp *nesuqp;int sqdepth, rqdepth;int status =1 ; -int i =0 ;/* fprintf(stderr, PFX "%s\n", __FUNCTION__); */
@@ -1211,6 +1207,8 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)#if HAVE_DECL_IBV_QPT_RAW_ETH if (attr->qp_type ==IBV_QPT_RAW_ETH ) { +int i =0 ; + nesuqp->nes_ud_sksq_fd =open ("/dev/infiniband/nes_ud_sksq" ,O_RDWR );if (nesuqp->nes_ud_sksq_fd <=0 )
@@ -1327,7 +1325,6 @@ int nes_udestroy_qp(struct ibv_qp *qp) {struct nes_uqp *nesuqp =to_nes_uqp (qp);int ret =0 ; -int i =0 ;// fprintf(stderr, PFX "%s addr&mr= %p \n", __FUNCTION__, &nesuqp->mr );
@@ -1353,6 +1350,8 @@ int nes_udestroy_qp(struct ibv_qp *qp)#if HAVE_DECL_IBV_QPT_RAW_ETH if (qp->qp_type ==IBV_QPT_RAW_ETH ) { +int i =0 ; +if (nesuqp->pend_rx_wr) {for (i =0 ; i <NES_UD_RX_BATCH_SZ ; i++)if (nesuqp->pend_rx_wr[i].sg_list) {
@@ -1381,6 +1380,7 @@ int nes_udestroy_qp(struct ibv_qp *qp)return 0 ; } +#if HAVE_DECL_IBV_QPT_RAW_ETH static inline int nes_ima_upost_send (struct ibv_qp *ib_qp,struct ibv_send_wr *ib_wr,struct ibv_send_wr **bad_wr)
@@ -1457,6 +1457,7 @@ int nes_ima_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr, out: return ret; } +#endif /** * nes_upost_send
@@ -1653,6 +1654,7 @@ int nes_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,return err; } +#if HAVE_DECL_IBV_QPT_RAW_ETH static inline int nes_ima_upost_recv (struct ibv_qp *ib_qp,struct ibv_recv_wr *ib_wr,struct ibv_recv_wr **bad_wr)
@@ -1727,6 +1729,7 @@ int nes_ima_upost_recv(struct ibv_qp *ib_qp, struct ibv_recv_wr *ib_wr, out: return ret; } +#endif /** * nes_upost_recv
libocrdma/src/ocrdma_verbs.c +2 -1
@@ -945,10 +945,11 @@ static inline void *ocrdma_hwq_head(struct ocrdma_qp_hwq_info *q)return q->va + (q->head * q->entry_size); } -static inline void *ocrdma_wq_tail (struct ocrdma_qp_hwq_info *q) +/*static inline void *ocrdma_wq_tail(struct ocrdma_qp_hwq_info *q) { return q->va + (q->tail * q->entry_size); } +*/ static inline void *ocrdma_hwq_head_from_idx (struct ocrdma_qp_hwq_info *q,uint32_t idx)
librdmacm/examples/cmtime.c +0 -16
@@ -128,13 +128,6 @@ static inline int __list_empty(struct work_list *list)return list->list.next == &list->list; } -static inline int list_empty (struct work_list *work_list) -{ -pthread_mutex_lock (&work_list->lock); -return work_list->list.next == &work_list->list; -pthread_mutex_unlock (&work_list->lock); -} -static inline struct list_head *__list_remove_head (struct work_list *work_list) {struct list_head *list_item;
@@ -144,15 +137,6 @@ static inline struct list_head *__list_remove_head(struct work_list *work_list)return list_item; } -static inline struct list_head *list_remove_head (struct work_list *work_list) -{ -struct list_head *list_item; -pthread_mutex_lock (&work_list->lock); - list_item =__list_remove_head (work_list); -pthread_mutex_unlock (&work_list->lock); -return list_item; -} -static inline void list_add_tail (struct work_list *work_list,struct list_head *req) {int empty;
librdmacm/src/acm.c +2 -1
@@ -121,7 +121,8 @@ static int ucma_set_server_port(void)FILE *f;if ((f =fopen (IBACM_PORT_FILE ,"r" STREAM_CLOEXEC ))) { -fscanf (f,"%" SCNu16, &server_port); +if (fscanf (f,"%" SCNu16, &server_port) !=1 ) + server_port =0 ;fclose (f); }return server_port;
librdmacm/src/rsocket.c +41 -17
158 lines not on this page · raw message
librxe/src/rxe.c +6 -0
@@ -596,6 +596,12 @@ void convert_send_wr(struct rxe_send_wr *kwr, struct ibv_send_wr *uwr) kwr->wr.atomic.swap = uwr->wr.atomic.swap; kwr->wr.atomic.rkey = uwr->wr.atomic.rkey;break ; + +case IBV_WR_LOCAL_INV : +case IBV_WR_BIND_MW : +case IBV_WR_SEND_WITH_INV : +case IBV_WR_TSO : +break ; } }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html