Search code examples
vmwareiscsi

iscsi: data-out & targettransfertag of 0xffffffff


For fun I'm implementing iSCSI target software. Most operating systems work already fine with it, only one resists: VMware ESXi 6.5.

When adding a LUN from my target in the storage configuration panel, it can read the target fine but as soon as it comes to writing to it, VMware fails. When I perform a network-trace, I see:

screenshot showing that the TargetTransferTag has a strange value

As you can see, the TargetTransferTag has a value of 0xffffffff. The thing I don't understand about this: how is the target supposed to know to which SCSI WRITE this DATA-OUT PDU belongs? Can I then always assume that it (the DATA-OUT PDU) is related to the last SCSI WRITE PDU in the TCP stream?

For what it's worth, I uploaded the network-trace to my website: pcap-file The problem is at the end (before the NOP-IN/OUT).


Solution

  • This is called "unsolicited data". It is for the WRITE identified by the InitiatorTaskTag.

    Once your target sends an R2T for more data (soliciting it), the DATA OUTs you receive will have a TargetTransferTag that matches your R2T.