Skip to content

Commit

Permalink
IB/hfi1: Add functions to receive TID RDMA WRITE request
Browse files Browse the repository at this point in the history
This patch adds the functions to receive TID RDMA WRITE request. The
request will be stored in the QP's s_ack_queue. This patch also adds
code to handle duplicate TID RDMA WRITE request and a function to
allocate TID resources for data receiving on the responder side.

Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
kwan-intc authored and Doug Ledford committed Feb 5, 2019
1 parent 4f9264d commit 07b9237
Show file tree
Hide file tree
Showing 5 changed files with 601 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/infiniband/hw/hfi1/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,6 +1512,7 @@ static int __init hfi1_mod_init(void)
goto bail_dev;
}

hfi1_compute_tid_rdma_flow_wt();
/*
* These must be called before the driver is registered with
* the PCI subsystem.
Expand Down
3 changes: 3 additions & 0 deletions drivers/infiniband/hw/hfi1/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
void *data = packet->payload;
u32 tlen = packet->tlen;
struct rvt_qp *qp = packet->qp;
struct hfi1_qp_priv *qpriv = qp->priv;
struct hfi1_ibport *ibp = rcd_to_iport(rcd);
struct ib_other_headers *ohdr = packet->ohdr;
u32 opcode = packet->opcode;
Expand Down Expand Up @@ -2716,6 +2717,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
qp->r_state = opcode;
qp->r_nak_state = 0;
qp->r_head_ack_queue = next;
qpriv->r_tid_alloc = qp->r_head_ack_queue;

/* Schedule the send engine. */
qp->s_flags |= RVT_S_RESP_PENDING;
Expand Down Expand Up @@ -2789,6 +2791,7 @@ void hfi1_rc_rcv(struct hfi1_packet *packet)
qp->r_state = opcode;
qp->r_nak_state = 0;
qp->r_head_ack_queue = next;
qpriv->r_tid_alloc = qp->r_head_ack_queue;

/* Schedule the send engine. */
qp->s_flags |= RVT_S_RESP_PENDING;
Expand Down
Loading

0 comments on commit 07b9237

Please sign in to comment.