Commit d1acfae5 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] libiscsi_tcp: update recv tracking for each skb instead of iscsi pdu

Everytime we read in a pdu libiscsi will update a tracking field.
It uses this to decide when to check if the transport might be bad.
If we have not got data in recv_timeout seconds then we will
send a iscsi ping/nop.

If we are on a slow link then it could take a while to read in all
the data for a data_in. In that case we might send a ping/nop when
we do not need to or we might drop a session thinking it is bad
when the lower layer is making forward progress on it.

This patch has libiscsi_tcp update the recv tracking for each skb
(basically network packet from our point of view) instead of the
entire iscsi pdu+data, so we account for these cases where data is
coming in slowly.
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 26013ad4
...@@ -863,6 +863,12 @@ int iscsi_tcp_recv_skb(struct iscsi_conn *conn, struct sk_buff *skb, ...@@ -863,6 +863,12 @@ int iscsi_tcp_recv_skb(struct iscsi_conn *conn, struct sk_buff *skb,
int rc = 0; int rc = 0;
ISCSI_DBG_TCP(conn, "in %d bytes\n", skb->len - offset); ISCSI_DBG_TCP(conn, "in %d bytes\n", skb->len - offset);
/*
* Update for each skb instead of pdu, because over slow networks a
* data_in's data could take a while to read in. We also want to
* account for r2ts.
*/
conn->last_recv = jiffies;
if (unlikely(conn->suspend_rx)) { if (unlikely(conn->suspend_rx)) {
ISCSI_DBG_TCP(conn, "Rx suspended!\n"); ISCSI_DBG_TCP(conn, "Rx suspended!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment