Skip to content

Commit

Permalink
[RoCE] update cluster manager for IB
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyehtsai committed Nov 12, 2017
1 parent 2e723b4 commit d118bfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cluster-manager/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct atomic_struct{
#include "fifo.h"


#define LITE_ROCE
//#define LITE_ROCE
#ifdef LITE_ROCE
#define SGID_INDEX 0
#else
Expand Down
9 changes: 6 additions & 3 deletions cluster-manager/lite-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,13 @@ static struct lite_context *server_init_ctx(struct ibv_device *ib_dev,int size,i
}
ctx->ah = malloc(sizeof(struct ibv_ah *)*ctx->num_node);
ctx->ah_attrUD = malloc(sizeof(struct client_ah_combined)*ctx->num_node);
if(ibv_query_gid(ctx->context, port, SGID_INDEX, &ctx->gid))
if(SGID_INDEX!=-1)
{
fprintf(stderr, "Failed to query GID\n");
return -1;
if(ibv_query_gid(ctx->context, port, SGID_INDEX, &ctx->gid))
{
fprintf(stderr, "Failed to query GID\n");
return -1;
}
}

return ctx;
Expand Down

0 comments on commit d118bfe

Please sign in to comment.