Skip to content

net: tls: various code cleanups and improvements

Sabrina Dubroca netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 5 repliesApplied 14/14

Patches in v1 All 14 applied

#Subject and filesSizeRepliesApplied
1/14tls: get salt using crypto_info_salt in tls_enc_skbnet/tls/tls_device_fallback.c+1 -30 repliesApplied
2/14tls: drop unnecessary cipher_type checks in tls offloadnet/tls/tls_device.c net/tls/tls_device_fallback.c+4 -210 repliesApplied
3/14tls: store rec_seq directly within cipher_contextinclude/net/tls.h net/tls/tls_device.c net/tls/tls_main.c +1 more+5 -220 repliesApplied
4/14tls: rename MAX_IV_SIZE to TLS_MAX_IV_SIZEinclude/net/tls.h net/tls/tls.h net/tls/tls_device_fallback.c +2 more+7 -70 repliesApplied
5/14tls: store iv directly within cipher_contextinclude/net/tls.h net/tls/tls_device.c net/tls/tls_main.c +1 more+7 -240 repliesApplied
6/14tls: extract context alloc/initialization out of tls_set_sw_offloadnet/tls/tls_sw.c+51 -350 repliesApplied
7/14tls: move tls_prot_info initialization out of tls_set_sw_offloadnet/tls/tls_sw.c+34 -280 repliesApplied
8/14tls: also use init_prot_info in tls_set_device_offloadnet/tls/tls.h net/tls/tls_device.c net/tls/tls_sw.c+18 -143 repliesApplied
9/14tls: add a helper to allocate/initialize offload_ctx_txnet/tls/tls_device.c+25 -140 repliesApplied
10/14tls: remove tls_context argument from tls_set_sw_offloadnet/tls/tls.h net/tls/tls_device.c net/tls/tls_main.c +1 more+12 -140 repliesApplied
11/14tls: remove tls_context argument from tls_set_device_offloadnet/tls/tls.h net/tls/tls_device.c net/tls/tls_main.c+10 -100 repliesApplied
12/14tls: validate crypto_info in a separate helpernet/tls/tls_main.c+27 -240 repliesApplied
13/14chcr_ktls: use tls_offload_context_tx and driver_state like other driversdrivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.h+46 -330 repliesApplied
14/14tls: use fixed size for tls_offload_context_{tx,rx}.driver_stateinclude/net/tls.h net/tls/tls_device.c+6 -120 repliesApplied

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSimon Horman
SeriesR-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 00/14] net: tls: various code cleanups and improvements

This series contains multiple cleanups and simplifications for the config code of both TLS_SW and TLS_HW.

It also modifies the chcr_ktls driver to use driver_state like all other drivers, so that we can then make driver_state fixed size instead of a flex array always allocated to that same fixed size. As reported by Gustavo A. R. Silva, the way chcr_ktls misuses driver_state irritates GCC [1].

Patches 1 and 2 are follow-ups to my previous cipher_desc series.

[1] https://lore.kernel.org/netdev/ZRvzdlvlbX4+eIln@work/

Sabrina Dubroca (14):
tls: get salt using crypto_info_salt in tls_enc_skb
tls: drop unnecessary cipher_type checks in tls offload
tls: store rec_seq directly within cipher_context
tls: rename MAX_IV_SIZE to TLS_MAX_IV_SIZE
tls: store iv directly within cipher_context
tls: extract context alloc/initialization out of tls_set_sw_offload
tls: move tls_prot_info initialization out of tls_set_sw_offload
tls: also use init_prot_info in tls_set_device_offload
tls: add a helper to allocate/initialize offload_ctx_tx
tls: remove tls_context argument from tls_set_sw_offload
tls: remove tls_context argument from tls_set_device_offload
tls: validate crypto_info in a separate helper
chcr_ktls: use tls_offload_context_tx and driver_state like other
drivers
tls: use fixed size for tls_offload_context_{tx,rx}.driver_state

 .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c |  43 ++--
 .../chelsio/inline_crypto/ch_ktls/chcr_ktls.h |  36 +++-
 include/net/tls.h                             |  21 +-
 net/tls/tls.h                                 |  12 +-
 net/tls/tls_device.c                          | 101 ++++-----
 net/tls/tls_device_fallback.c                 |  23 +-
 net/tls/tls_main.c                            |  62 +++---
 net/tls/tls_sw.c                              | 198 +++++++++---------
 8 files changed, 244 insertions(+), 252 deletions(-)
Signature · 1 line
2.42.0