[ofa-general] ibv_get_cq_event problem~

yangdong yangdong at ncic.ac.cn
Sat Oct 27 11:57:34 PDT 2007


whether there is some errs in my makefile? whether i need to include sth?

CC = cc
RM = rm -f
AR = ar rvs
MV = mv -f
RANLIB = ranlib
TOP_DIR = /usr/include
INC_VERBS = ${TOP_DIR}/infiniband/
INC_RDMACM = ${TOP_DIR}/rdma/
INC_THIS = ./
CFLAGS = -DHAVE_CONFIG_H -I../../include/ -I${INC_VERBS} -I${INC_RDMACM}
-I${INC_THIS} -Wall -g -D_GNU_SOURCE -O2 -D__RDMA__

LDFLAGS = -lm -lpthread -libverbs -lrdmacm
LIBPATH = ../../lib/

OBJS = amp_interface.o amp_conn.o amp_utcp.o amp_uopenib.o amp_protos.o
amp_request.o \
amp_uthread.o amp_help.o
LIB = libamp.a

.c.o:
${CC} ${CFLAGS} ${EXTRA_CFLAGS} -c $*.c


lib: ${OBJS}
${AR} ${LIB} ${OBJS}
${RANLIB} ${LIB}
${MV} ${LIB} ${LIBPATH}

clean:
${RM} *.o core ~* *.cpp
~


yangdong 写道:
> when i was using ibv_get_cq_event in my thread just as follow (this is
> similar to some codes in rping.c), i post a send op by ibv_post_send,
> but thread find ibv_get_cq_event cannot get a cq event. why ? send is
> post successfully , matbe any other errors ? when i cannot get a cq
> event, which may happen?
>
> void thread() {
> ...
> while (1) {
> ret = ibv_get_cq_event(conn->ac_rdma->cr_send_comp_channel, &ev_cq,
> &ev_ctx);
> if (ret) {
> AMP_ERROR("__amp_rdma_scq_thread:Failed to get scq event!\n");
> goto EXIT;
> }
> AMP_DEBUG(AMP_DEBUG_MSG, "__amp_rdma_sendcompletion_thread:
> ibv_get_cq_event.\n");
>
> if (ev_cq != conn->ac_rdma->cr_scq) {
> AMP_ERROR("__amp_rdma_scq_thread: Unkown SCQ!\n");
> ret = -1;
> goto EXIT;
> }
>
> ret = ibv_req_notify_cq(conn->ac_rdma->cr_scq, 0);
> if (ret) {
> AMP_ERROR("__amp_rdma_scq_thread: Failed to set notify!\n");
> goto EXIT;
> }
> AMP_DEBUG(AMP_DEBUG_MSG, "__amp_rdma_scq_thread: ibv_req_notify_cq.\n");
>
> ret = __amp_sq_cq_reap(conn->ac_rdma, NULL);
> AMP_DEBUG(AMP_DEBUG_MSG, "__amp_rdma_scq_thread: __amp_rq_cq_reap.\n");
>
> ibv_ack_cq_events(conn->ac_rdma->cr_scq, 1);
> if (ret) {
> AMP_ERROR("__amp_rdma_scq_thread: Failed to ack scq event!\n");
> goto EXIT;
> }
> AMP_DEBUG(AMP_DEBUG_MSG, "__amp_rdma_scq_thread: ibv_ack_cq_events.\n");
> }
> }
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
>
>
>   




More information about the general mailing list