Re: [PATCH net-next] net: tls: make the offload check helper take skb not socket

From
Tariq Toukan <hidden>
Date
2023-06-14 11:03:25
Also in
linux-rdma
Reply to
Jakub Kicinski, 2023-06-13

On 13/06/2023 23:50, Jakub Kicinski wrote:
All callers of tls_is_sk_tx_device_offloaded() currently do
an equivalent of:

  if (skb->sk && tls_is_skb_tx_device_offloaded(skb->sk))

Have the helper accept skb and do the skb->sk check locally.
Two drivers have local static inlines with similar wrappers
already.

While at it change the ifdef condition to TLS_DEVICE.
Only TLS_DEVICE selects SOCK_VALIDATE_XMIT, so the two are
equivalent. This makes removing the duplicated IS_ENABLED()
check in funeth more obviously correct.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: <redacted>
CC: andy@greyhouse.net
CC: <redacted>
CC: ayush.sawal@chelsio.com
CC: dmichail@fungible.com
CC: borisp@nvidia.com
CC: saeedm@nvidia.com
CC: leon@kernel.org
CC: <redacted>
CC: john.fastabend@gmail.com
CC: <redacted>
CC: <redacted>
CC: tariqt@nvidia.com
Acked-by: Tariq Toukan <tariqt@nvidia.com>

Thanks.
Thread (7 messages) 7 messages, 6 authors, last reply 2023-06-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help