diff --git a/src/nccl_ofi_rdma.c b/src/nccl_ofi_rdma.c index fed9b779f..453c568f2 100644 --- a/src/nccl_ofi_rdma.c +++ b/src/nccl_ofi_rdma.c @@ -4531,10 +4531,12 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, l_comm->stage = COMM_RECV_CONN; + /* fall through */ case COMM_RECV_CONN: l_comm->stage = COMM_CONN_REQ_PENDING; + /* fall through */ case COMM_CONN_REQ_PENDING: /* COMM_CONN_REQ_PENDING: Wait until connect message has been * received. Then, prepare for sending connect accept message, @@ -4609,6 +4611,7 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, l_comm->stage = COMM_SEND_CONN; + /* fall through */ case COMM_SEND_CONN: /* COMM_SEND_CONN: Send connect response message to remote */ @@ -4622,6 +4625,7 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, l_comm->stage = COMM_CONN_RESP_REQ_PENDING; + /* fall through */ case COMM_CONN_RESP_REQ_PENDING: /* COMM_CONN_RESP_REQ_PENDING: Wait until connect * response message has been delivered. Afterwards, @@ -4655,6 +4659,7 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, break; case COMM_CONNECTED: + /* fall through */ default: NCCL_OFI_WARN("Invalid state of receive communicator object: %d", l_comm->stage); @@ -6201,6 +6206,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, } comm_state->stage = COMM_SEND_CONN; + /* fall through */ case COMM_SEND_CONN: @@ -6216,6 +6222,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, } comm_state->stage = COMM_CONN_REQ_PENDING; + /* fall through */ case COMM_CONN_REQ_PENDING: /* COMM_CONN_REQ_PENDING: Wait until connect message @@ -6247,6 +6254,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, req = NULL; comm_state->stage = COMM_RECV_CONN; + /* fall through */ case COMM_RECV_CONN: /* COMM_RECV_CONN: Receive connect response message from remote */ @@ -6254,6 +6262,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, assert(s_comm && s_comm->num_rails > 0); comm_state->stage = COMM_CONN_RESP_REQ_PENDING; + /* fall through */ case COMM_CONN_RESP_REQ_PENDING: diff --git a/src/nccl_ofi_sendrecv.c b/src/nccl_ofi_sendrecv.c index 32f1269fa..d62fbdcfb 100644 --- a/src/nccl_ofi_sendrecv.c +++ b/src/nccl_ofi_sendrecv.c @@ -1410,6 +1410,7 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, } comm_state->stage = COMM_RECV_CONN; + /* fall through */ case COMM_RECV_CONN: @@ -1437,6 +1438,7 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, comm_state->stage = COMM_CONN_REQ_PENDING; + /* fall through */ case COMM_CONN_REQ_PENDING: /* Progress NCCL OFI engine so that connection is accepted */ @@ -1470,8 +1472,11 @@ static int accept(nccl_net_ofi_listen_comm_t *listen_comm, break; case COMM_SEND_CONN: + /* fall through */ case COMM_CONN_RESP_REQ_PENDING: + /* fall through */ case COMM_CONNECTED: + /* fall through */ default: NCCL_OFI_WARN("Invalid state of receive communicator object: %d", stage); @@ -2047,6 +2052,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, comm_state->stage = COMM_SEND_CONN; + /* fall through */ case COMM_SEND_CONN: /* Send "connect" message to remote EP */ rc = send_connect_message(s_comm, device, ep, req); @@ -2063,6 +2069,7 @@ static int connect(nccl_net_ofi_ep_t *base_ep, } comm_state->stage = COMM_CONN_REQ_PENDING; + /* fall through */ case COMM_CONN_REQ_PENDING: if (s_comm->conn_info->connect_to_self == 1) { @@ -2095,8 +2102,11 @@ static int connect(nccl_net_ofi_ep_t *base_ep, break; case COMM_RECV_CONN: + /* fall through */ case COMM_CONN_RESP_REQ_PENDING: + /* fall through */ case COMM_CONNECTED: + /* fall through */ default: NCCL_OFI_WARN("Invalid state of send communicator object: %d", stage); return -EINVAL;