[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151124000011.GA9301@obsidianresearch.com>
Date: Mon, 23 Nov 2015 17:00:11 -0700
From: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To: Caitlin Bestler <cait@...mi.com>
Cc: Bart Van Assche <bart.vanassche@...disk.com>,
Christoph Hellwig <hch@....de>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"sagig@....mellanox.co.il" <sagig@....mellanox.co.il>,
"axboe@...com" <axboe@...com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/9] IB: add a proper completion queue abstraction
On Mon, Nov 23, 2015 at 03:30:42PM -0800, Caitlin Bestler wrote:
> The receive completion can be safely assumed to indicate transmit
> completion over a reliable connection unless your peer has gone
> completely bonkers and is replying to a command that it did not
> receive.
Perhaps iWarp is different and does specify this ordering but IB does
not.
The issue with IB is how the ACK protocol is designed. There is not
strong ordering between ACKs and data transfers. A HCA can send
ACK,DATA and the network could drop the ACK. The recevier side does
not know the ACK was lost and goes ahead to process DATA.
Since only ACK advances the sendq and DATA advances the recvq it is
trivial to get a case where the recvq is advanced with a reply while
the sendq continues to wait for the ACK to be resent.
Further IB allows ACK coalescing and has no rules for how an ACK is
placed. It is entirely valid for a HCA to RECV,REPLY,ACK - for
instance.
> I actually had a bug in an early iWARP emulation where the simulated
> peer, because it was simulated, responded
> instantly. The result was a TCP segment that both acked the
> transmission *and* contained the reply. The bug was
> that the code processed the reception before the transmission ack,
> causing the receive completion to be placed
> on the completion queue before transmit completion.
I don't know if iWARP has the same lax ordering as IB, but certainly,
what you describe is legal for IB verbs to do, and our kernel ULPs
have to cope with it.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists