pdu: introduce ISCSI_PDU_URGENT_DELIVERY

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2014-06-17 14:50:41 +02:00
parent 344b21d37d
commit 98bbeab664
2 changed files with 7 additions and 1 deletions

View File

@@ -212,6 +212,11 @@ struct iscsi_pdu {
#define ISCSI_PDU_DROP_ON_RECONNECT 0x00000004
/* stop sending after this PDU has been sent */
#define ISCSI_PDU_CORK_WHEN_SENT 0x00000008
/* put this immediate delivery PDU in front of outqueue.
* This is currently only used for immediate logout requests
* as answer to an async logout event. */
#define ISCSI_PDU_URGENT_DELIVERY 0x00000010
uint32_t flags;

View File

@@ -94,7 +94,8 @@ iscsi_add_to_outqueue(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
* ensure that pakets with the same CmdSN are kept in FIFO order.
*/
do {
if (iscsi_serial32_compare(pdu->cmdsn, current->cmdsn) < 0) {
if (iscsi_serial32_compare(pdu->cmdsn, current->cmdsn) < 0 ||
pdu->flags & ISCSI_PDU_URGENT_DELIVERY) {
/* insert PDU before the current */
if (last != NULL) {
last->next=pdu;