• Tariq Toukan's avatar
    net/mlx5e: kTLS, Fix RX counters atomicity · 6f4fdd53
    Tariq Toukan authored
    Some TLS RX counters increment per socket/connection, and are not
    protected against parallel modifications from several cores.
    Switch them to atomic counters by taking them out of the RQ stats into
    the global atomic TLS stats.
    
    In this patch, we touch 'rx_tls_ctx/del' that count the number of
    device-offloaded RX TLS connections added/deleted.
    These counters are updated in the add/del callbacks, out of the fast
    data-path.
    
    This change is not needed for counters that increment only in NAPI
    context, as they are protected by the NAPI mechanism.
    Keep them as tls_* counters under 'struct mlx5e_rq_stats'.
    
    Fixes: 76c1e1ac ("net/mlx5e: kTLS, Add kTLS RX stats")
    Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
    Reviewed-by: default avatarMaxim Mikityanskiy <maximmi@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    6f4fdd53
en_stats.h 12.5 KB