Re: [PATCH 09/14] nvme-tcp: control message handling for recvmsg()

Sagi Grimberg
2023-08-08T09:06:09Z

>>>> Is the cmsg passed unconditionally? meaning this does not
>>>> impact non-tls?
>>>>
>>>> If so, why is the ifdef needed?
>>>>
>>> Passing in a cmsg (and a controllen) always enables the use of
>>> control messages, irrespective of the type.
>>> As we never enabled control messages prior to this we would
>>> change the implementation when TLS is not enabled; who knows,
>>> someone might have been sending us control messages all along,
>>> but we never checked. So I thought it prudent to only enable
>>> it for TLS where we know that we might be getting control messages.
>>
>> But you are doing this only based on the compile-time config option, not
>> based on a runtime setting. I am not sure I follow your logic.
>
> For TLS I actually check the cmsg type, so even if we were to receive
> other control messages they would be caught.
> If I were to enable control messages in general I would need to check
> for control messages on every packet, which may well impact performance.
> Do we want that?

Hannes, still not following.

Lets assume that CONFIG_NVME_TCP_TLS=y, like it will usually be
by default for most server systems on the planet (where nvmet is
expected to run).

Please explain how you do not affect non-tls workloads? Or what is
the difference? I am not following your logic here.