-
Notifications
You must be signed in to change notification settings - Fork 700
fabrics: fix concat during connect-all #3035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I think the Something like this here: if (e->trtype == NVMF_TRTYPE_TCP &&
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE &&
!cfg->tls)
c->cfg.tls = true;If we check the command line for |
Yes, I agree. This code snippet at nvmf_connect_disc_entry() is really unwarranted IMO. But anyways...
This won't help because That's the reason I made this fix in nvmf_add_ctrl() itself in the above commit, and not in nvmf_connect_disc_entry(). |
|
Or should we just do away with the current code snippet of enabling What do you say? |
|
There was already some changes on this condition:
After reading up on the BTW, I think we should add a blktests for this scenario. |
Then why not go with the current fix itself in the above commit at d1377a7? That way, we retain the existing check of default enabling |
|
I was digging more into this, and looks like there is a simple solution for this issue. For configured PSK, the |
|
@hreinecke - Could you please share your comments on this? |
c8bdcce to
597fc46
Compare
This is the spec interpretation following the discussion with Hannes:
So for generated PSK TLS (i.e. concat), it doesn't matter whether TSC is supported or not supported, but the value should be |
|
So effectively, we can ignore TASC for now and focus only on the TSC value here (within the TREQ field) for distinguishing between the two TLS types - TSC being So given enum Right? |
|
Any updates here? Without this fix, one is unable to secure concat TLS connect across several subsystems at one go using the JSON config file. Instead, one has to manually connect to each subsystem here one at a time, which is a big pain. |
|
I've started to look into it but run out of time. |
|
Tested nvme connect-all successfully using the JSON config file with 597fc46 applied for both configured PSK TLS & generated PSK TLS respectively. No issues here. Let me know if you want me to attach the logs. |
|
I assume you are testing with the 2.x branch, as the current master will crash when entering the discover path. Also figured out that we do not really handle the config parsing correctly for the tls/concat parameters (at least in master). There is a lot of cleanup necessary and that's also why I said I wont take any patches for fabrics until the cleanup has been done. It's a huge mess at the moment. Unfortunately, I can't test your changes with nvmet, as it seems it lacks the support for this type of configuration. Though, though the change is very contain and doesn't add any other random hack, I'll take it. Another thing I started to wonder: should we enforce tls 1.3 and drop support tls 1.2? |
The discovery controller is using the identify command and also the get log page command. Thus, create the transport handle for the discovery controller. Signed-off-by: Daniel Wagner <[email protected]>
During nvme connect-all, if a discovery log page record reports the sectype as anything other than NVMF_TCP_SECTYPE_NONE in nvmf_connect_disc_entry(), it then assumes that --tls should be default set for the same. But this holds true only for configured PSK TLS alone and not for generated PSK TLS. For generated PSK TLS connections using --concat (i.e. secure channel concat), this would lead to connection failures since both --tls and --concat are not to be invoked together. Fix this by distinguishing the two through their respective treq values and setting the appropriate --tls or --concat flags for each. Signed-off-by: Martin George <[email protected]>
597fc46 to
c912140
Compare
Weird. I have been using the master branch itself, but didn't encounter any such crash in the discovery path. Could it be because I'm running this on a relatively old kernel like SLES15 SP7 MU (i.e. kernel-default-6.4.0-150700.53.25.1) ? I understand there is a lot of cleanup required here in the master branch. But in context of
Thanks for merging this. As said above, it solves a big overhead by enabling multiple connects to multiple subsystems via the JSON file.
Yes, I think that makes sense because Section 3.6.1.1 Transport Specific Address Subtype: TLS of the NVMe/TCP Transport Specification 1.2 explicitly states:
@hreinecke - do you concur? |

During nvme connect-all, if a discovery log page record reports the sectype as anything other than NVMF_TCP_SECTYPE_NONE in nvmf_connect_disc_entry(), it then assumes that tls should be default set for the same. But this holds true only for configured PSK TLS connections alone and not generated PSK TLS (i.e. secure channel concat) connections since both concat and tls flags are meant to be mutually exclusive. Fix the same.
Fixes: #3034