Re: [PATCH 10/18] nvme-tcp: fixup send workflow for kTLS

Sagi Grimberg
2023-03-30T15:24:08Z

> kTLS does not support MSG_EOR flag for sendmsg(), and in general
> is really picky about invalid MSG_XXX flags.

CC'ing TLS folks.

Can't tls simply ignore MSG_EOR instead of consumers having to be
careful over it?

> So ensure that the MSG_EOR flags is blanked out for TLS, and that
> the MSG_SENDPAGE_LAST is only set if we actually do sendpage().

You mean MSG_SENDPAGE_NOTLAST.

It is also a bit annoying that a tls socket dictates different behavior
than a normal socket.

The current logic is rather simple:
if more data comming:
flags = MSG_MORE | MSG_SENDPAGE_NOTLAST
else:
flags = MSG_EOR

Would like to keep it that way for tls as well. Can someone
explain why this is a problem with tls?