@@ -1680,7 +1680,10 @@ struct ksock_peer *
&conn->ksnc_ipaddr, conn->ksnc_port,
iov_iter_count(&conn->ksnc_rx_to), conn->ksnc_rx_nob_left,
ktime_get_seconds() - last_rcv);
- lnet_finalize(conn->ksnc_cookie, -EIO);
+ if (conn->ksnc_lnet_msg)
+ conn->ksnc_lnet_msg->msg_health_status =
+ LNET_MSG_STATUS_REMOTE_ERROR;
+ lnet_finalize(conn->ksnc_lnet_msg, -EIO);
break;
case SOCKNAL_RX_LNET_HEADER:
if (conn->ksnc_rx_started)
@@ -355,8 +355,7 @@ struct ksock_conn {
u32 ksnc_rx_csum; /* partial checksum for incoming
* data
*/
- void *ksnc_cookie; /* rx lnet_finalize passthru arg
- */
+ struct lnet_msg *ksnc_lnet_msg; /* rx lnet_finalize arg */
struct ksock_msg ksnc_msg; /* incoming message buffer:
* V2.x message takes the
* whole struct
@@ -344,9 +344,6 @@ struct ksock_tx *
ksocknal_free_tx(tx);
if (lnetmsg) { /* KSOCK_MSG_NOOP go without lnetmsg */
- if (rc)
- CERROR("tx failure rc = %d, hstatus = %d\n", rc,
- hstatus);
lnetmsg->msg_health_status = hstatus;
lnet_finalize(lnetmsg, rc);
}
@@ -1266,7 +1263,10 @@ struct ksock_route *
le64_to_cpu(lhdr->src_nid) != id->nid);
}
- lnet_finalize(conn->ksnc_cookie, rc);
+ if (rc && conn->ksnc_lnet_msg)
+ conn->ksnc_lnet_msg->msg_health_status =
+ LNET_MSG_STATUS_REMOTE_ERROR;
+ lnet_finalize(conn->ksnc_lnet_msg, rc);
if (rc) {
ksocknal_new_packet(conn, 0);
@@ -1300,7 +1300,7 @@ struct ksock_route *
LASSERT(iov_iter_count(to) <= rlen);
LASSERT(to->nr_segs <= LNET_MAX_IOV);
- conn->ksnc_cookie = msg;
+ conn->ksnc_lnet_msg = msg;
conn->ksnc_rx_nob_left = rlen;
conn->ksnc_rx_to = *to;