SOCKET order packets in outqueue by CmdSN
Ordering by itt adds the special case of handling itt == 0xffffffff. Order by CmdSN instead as described by RFC3720. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -61,11 +61,11 @@ iscsi_add_to_outqueue(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
|
||||
return;
|
||||
}
|
||||
|
||||
/* queue pdus in ascending order of itt.
|
||||
* ensure that pakets with the same itt are kept in order.
|
||||
/* queue pdus in ascending order of CmdSN.
|
||||
* ensure that pakets with the same CmdSN are kept in FIFO order.
|
||||
*/
|
||||
do {
|
||||
if (iscsi_serial32_compare(pdu->itt, current->itt) < 0) {
|
||||
if (iscsi_serial32_compare(pdu->cmdsn, current->cmdsn) < 0) {
|
||||
/* insert PDU before the current */
|
||||
if (last != NULL) {
|
||||
last->next=pdu;
|
||||
|
||||
Reference in New Issue
Block a user