Commit 1ad8630
nvmet: Do not require SGL for PCI target controller commands
Support for SGL is optional for the PCI transport. Modify
nvmet_req_init() to not require the NVME_CMD_SGL_METABUF command flag to
be set if the target controller transport type is NVMF_TRTYPE_PCI.
In addition to this, the NVMe base specification v2.1 mandate that all
admin commands use PRP, that is, have CDW0.PSDT cleared to 0. Modify
nvmet_parse_admin_cmd() to check this.
Finally, modify nvmet_check_transfer_len() and
nvmet_check_data_len_lte() to return the appropriate error status
depending on the command using SGL or PRP. Since for fabrics
nvmet_req_init() checks that a command uses SGL, always, this change
affects only PCI target controllers.
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Tested-by: Rick Wertenbroek <[email protected]>
Tested-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Keith Busch <[email protected]>1 parent 60d3cd8 commit 1ad8630
2 files changed
+26
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1481 | 1486 | | |
1482 | 1487 | | |
1483 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1122 | 1122 | | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | | - | |
| 1125 | + | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1131 | 1134 | | |
1132 | 1135 | | |
1133 | 1136 | | |
| |||
1182 | 1185 | | |
1183 | 1186 | | |
1184 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
1185 | 1190 | | |
1186 | | - | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1187 | 1196 | | |
1188 | 1197 | | |
1189 | 1198 | | |
| |||
1194 | 1203 | | |
1195 | 1204 | | |
1196 | 1205 | | |
| 1206 | + | |
| 1207 | + | |
1197 | 1208 | | |
1198 | | - | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1199 | 1214 | | |
1200 | 1215 | | |
1201 | 1216 | | |
| |||
0 commit comments