David Disseldorp wrote:
--- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c @@ -478,6 +508,7 @@ int iser_send_control(struct iscsi_conn *conn, int err = 0; struct iser_regd_buf *regd_buf; struct iser_device *device; + unsigned char opcode;if (!iser_conn_state_comp(iser_conn->ib_conn, ISER_CONN_UP)) {iser_err("Failed to send, conn: 0x%p is not up\n", iser_conn->ib_conn); @@ -512,10 +543,16 @@ int iser_send_control(struct iscsi_conn *conn, data_seg_len); }- if (iser_post_receive_control(conn) != 0) {- iser_err("post_rcv_buff failed!\n"); - err = -ENOMEM; - goto send_control_error; + opcode = task->hdr->opcode & ISCSI_OPCODE_MASK; + + /* post recv buffer for response if one is expected */ + if (!((opcode == ISCSI_OP_NOOP_OUT) + && (task->hdr->itt == RESERVED_ITT))) { + if (iser_post_receive_control(conn) != 0) { + iser_err("post_rcv_buff failed!\n"); + err = -ENOMEM; + goto send_control_error; + } }
This logic will not let us refill the receive buffers consumes by unexpected PDUs when a Nop-Out with reserved ITT is sent. So the next refill will take place when the next scsi command is issued or when a Nop-Out will be sent with non-reserved ITT. I am fine with this.
Acked-by: Or Gerlitz <[EMAIL PROTECTED]> _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
