]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: jump out for cases which need to leave skb on list
authorJakub Kicinski <kuba@kernel.org>
Fri, 8 Apr 2022 18:31:34 +0000 (11:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Apr 2022 16:32:12 +0000 (17:32 +0100)
commitbf843d412536d618043d135b18d40d4abc46a95d
treefdcd97ef1acda17a2d02f336d52feba54e800471
parentf1127d8d398013415fee0032a19344ba1f1fea0b
tls: rx: jump out for cases which need to leave skb on list

The current invese logic is harder to follow (and adds extra
tests to the fast path). We have to enumerate all cases which
need to keep the skb before consuming it. It's simpler to
jump out of the full record flow as we detect those cases.

This makes it clear that partial consumption and peek can
only reach end of the function thru the !zc case so move
the code up there.

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