]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: async: don't put async zc on the list
authorJakub Kicinski <kuba@kernel.org>
Fri, 15 Jul 2022 05:22:34 +0000 (22:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 10:24:11 +0000 (11:24 +0100)
commit2580b113dc27968daa93901be6888fec760a528a
tree80c8238a535ffef13e6298bad2ba1667bf072236
parentd671085bb65268ba77d4c86c2a2f8ff476bec34e
tls: rx: async: don't put async zc on the list

The "zero-copy" path in SW TLS will engage either for no skbs or
for all but last. If the recvmsg parameters are right and the
socket can do ZC we'll ZC until the iterator can't fit a full
record at which point we'll decrypt one more record and copy
over the necessary bits to fill up the request.

The only reason we hold onto the ZC skbs which went thru the async
path until the end of recvmsg() is to count bytes. We need an accurate
count of zc'ed bytes so that we can calculate how much of the non-zc'd
data to copy. To allow freeing input skbs on the ZC path count only
how much of the list we'll need to consume.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c