• Tariq Toukan's avatar
    net/tls: Multi-threaded calls to TX tls_dev_del · 7adc91e0
    Tariq Toukan authored
    Multiple TLS device-offloaded contexts can be added in parallel via
    concurrent calls to .tls_dev_add, while calls to .tls_dev_del are
    sequential in tls_device_gc_task.
    
    This is not a sustainable behavior. This creates a rate gap between add
    and del operations (addition rate outperforms the deletion rate).  When
    running for enough time, the TLS device resources could get exhausted,
    failing to offload new connections.
    
    Replace the single-threaded garbage collector work with a per-context
    alternative, so they can be handled on several cores in parallel. Use
    a new dedicated destruct workqueue for this.
    
    Tested with mlx5 device:
    Before: 22141 add/sec,   103 del/sec
    After:  11684 add/sec, 11684 del/sec
    Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
    Reviewed-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    7adc91e0
tls.h 13.4 KB