summaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/tom/t4_ddp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/cxgbe/tom/t4_ddp.c')
-rw-r--r--sys/dev/cxgbe/tom/t4_ddp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c
index 7cbb2639e9da..244287fcb3aa 100644
--- a/sys/dev/cxgbe/tom/t4_ddp.c
+++ b/sys/dev/cxgbe/tom/t4_ddp.c
@@ -405,6 +405,19 @@ handle_ddp_data(struct toepcb *toep, __be32 ddp_report, __be32 rcv_nxt, int len)
}
tp = intotcpcb(inp);
+
+ /*
+ * For RX_DDP_COMPLETE, len will be zero and rcv_nxt is the
+ * sequence number of the next byte to receive. The length of
+ * the data received for this message must be computed by
+ * comparing the new and old values of rcv_nxt.
+ *
+ * For RX_DATA_DDP, len might be non-zero, but it is only the
+ * length of the most recent DMA. It does not include the
+ * total length of the data received since the previous update
+ * for this DDP buffer. rcv_nxt is the sequence number of the
+ * first received byte from the most recent DMA.
+ */
len += be32toh(rcv_nxt) - tp->rcv_nxt;
tp->rcv_nxt += len;
tp->t_rcvtime = ticks;