Skip to content

Commit

Permalink
RDS: IB: Support Fastreg MR (FRMR) memory registration mode
Browse files Browse the repository at this point in the history
Fastreg MR(FRMR) is another method with which one can
register memory to HCA. Some of the newer HCAs supports only fastreg
mr mode, so we need to add support for it to have RDS functional
on them.

Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Avinash Repaka <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Avinash Repaka authored and davem330 committed Mar 2, 2016
1 parent ad6832f commit 1659185
Show file tree
Hide file tree
Showing 6 changed files with 422 additions and 5 deletions.
2 changes: 1 addition & 1 deletion net/rds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rds-y := af_rds.o bind.o cong.o connection.o info.o message.o \
obj-$(CONFIG_RDS_RDMA) += rds_rdma.o
rds_rdma-y := rdma_transport.o \
ib.o ib_cm.o ib_recv.o ib_ring.o ib_send.o ib_stats.o \
ib_sysctl.o ib_rdma.o ib_fmr.o
ib_sysctl.o ib_rdma.o ib_fmr.o ib_frmr.o


obj-$(CONFIG_RDS_TCP) += rds_tcp.o
Expand Down
1 change: 1 addition & 0 deletions net/rds/ib.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr);
void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn);
void rds_ib_remove_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn);
void rds_ib_destroy_nodev_conns(void);
void rds_ib_mr_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc);

/* ib_recv.c */
int rds_ib_recv_init(void);
Expand Down
7 changes: 6 additions & 1 deletion net/rds/ib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ static void poll_scq(struct rds_ib_connection *ic, struct ib_cq *cq,
(unsigned long long)wc->wr_id, wc->status,
wc->byte_len, be32_to_cpu(wc->ex.imm_data));

rds_ib_send_cqe_handler(ic, wc);
if (wc->wr_id <= ic->i_send_ring.w_nr ||
wc->wr_id == RDS_IB_ACK_WR_ID)
rds_ib_send_cqe_handler(ic, wc);
else
rds_ib_mr_cqe_handler(ic, wc);

}
}
}
Expand Down
Loading

0 comments on commit 1659185

Please sign in to comment.