Date: Thu, 10 Sep 2015 21:41:12 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287631 - head/sys/dev/cxgbe/tom Message-ID: <201509102141.t8ALfC82010509@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Sep 10 21:41:11 2015 New Revision: 287631 URL: https://svnweb.freebsd.org/changeset/base/287631 Log: Add a comment that to clarify how to determine the amount of received DDP data. Reviewed by: np Differential Revision: https://reviews.freebsd.org/D3619 Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 10 21:08:54 2015 (r287630) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Thu Sep 10 21:41:11 2015 (r287631) @@ -405,6 +405,19 @@ handle_ddp_data(struct toepcb *toep, __b } 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509102141.t8ALfC82010509>