Changeset 21839 in vbox
- Timestamp:
- Jul 28, 2009 1:27:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
r21807 r21839 108 108 109 109 110 /** Maximum PDU payload size we can handle in one piece. */ 111 #define ISCSI_PDU_SIZE_MAX _256K 112 110 113 /** Maximum PDU size we can handle in one piece. */ 111 #define ISCSI_RECV_PDU_BUFFER_SIZE ( 65536+ ISCSI_BHS_SIZE)114 #define ISCSI_RECV_PDU_BUFFER_SIZE (ISCSI_PDU_SIZE_MAX + ISCSI_BHS_SIZE) 112 115 113 116 … … 888 891 break; 889 892 case 0x0100: /* login operational negotiation, step 0: set parameters. */ 893 char szMaxPDU[16]; 894 RTStrPrintf(szMaxPDU, sizeof(szMaxPDU), "%u", ISCSI_PDU_SIZE_MAX); 890 895 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "HeaderDigest", "None", 0); 891 896 if (RT_FAILURE(rc)) … … 903 908 if (RT_FAILURE(rc)) 904 909 goto out; 905 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "MaxRecvDataSegmentLength", "65536", 0);910 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "MaxRecvDataSegmentLength", szMaxPDU, 0); 906 911 if (RT_FAILURE(rc)) 907 912 goto out; 908 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "MaxBurstLength", "262144", 0);913 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "MaxBurstLength", szMaxPDU, 0); 909 914 if (RT_FAILURE(rc)) 910 915 goto out; 911 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "FirstBurstLength", "65536", 0);916 rc = iscsiTextAddKeyValue(bBuf, sizeof(bBuf), &cbBuf, "FirstBurstLength", szMaxPDU, 0); 912 917 if (RT_FAILURE(rc)) 913 918 goto out; … … 2761 2766 * Clip read size to a value which is supported by many targets. 2762 2767 */ 2763 cbToRead = RT_MIN(cbToRead, _256K);2768 cbToRead = RT_MIN(cbToRead, ISCSI_PDU_SIZE_MAX); 2764 2769 2765 2770 lba = uOffset / pImage->cbSector; … … 2835 2840 * Clip write size to a value which is supported by many targets. 2836 2841 */ 2837 cbToWrite = RT_MIN(cbToWrite, _256K);2842 cbToWrite = RT_MIN(cbToWrite, ISCSI_PDU_SIZE_MAX); 2838 2843 2839 2844 lba = uOffset / pImage->cbSector;
Note:
See TracChangeset
for help on using the changeset viewer.