| .. | .. |
|---|
| 35 | 35 | #include <net/sock.h> |
|---|
| 36 | 36 | |
|---|
| 37 | 37 | #include "en.h" |
|---|
| 38 | | -#include "accel/tls.h" |
|---|
| 39 | 38 | #include "fpga/sdk.h" |
|---|
| 40 | 39 | #include "en_accel/tls.h" |
|---|
| 41 | 40 | |
|---|
| .. | .. |
|---|
| 51 | 50 | |
|---|
| 52 | 51 | #define NUM_TLS_SW_COUNTERS ARRAY_SIZE(mlx5e_tls_sw_stats_desc) |
|---|
| 53 | 52 | |
|---|
| 53 | +static bool is_tls_atomic_stats(struct mlx5e_priv *priv) |
|---|
| 54 | +{ |
|---|
| 55 | + return priv->tls && !mlx5_accel_is_ktls_device(priv->mdev); |
|---|
| 56 | +} |
|---|
| 57 | + |
|---|
| 54 | 58 | int mlx5e_tls_get_count(struct mlx5e_priv *priv) |
|---|
| 55 | 59 | { |
|---|
| 56 | | - if (!priv->tls) |
|---|
| 60 | + if (!is_tls_atomic_stats(priv)) |
|---|
| 57 | 61 | return 0; |
|---|
| 58 | 62 | |
|---|
| 59 | 63 | return NUM_TLS_SW_COUNTERS; |
|---|
| .. | .. |
|---|
| 63 | 67 | { |
|---|
| 64 | 68 | unsigned int i, idx = 0; |
|---|
| 65 | 69 | |
|---|
| 66 | | - if (!priv->tls) |
|---|
| 70 | + if (!is_tls_atomic_stats(priv)) |
|---|
| 67 | 71 | return 0; |
|---|
| 68 | 72 | |
|---|
| 69 | 73 | for (i = 0; i < NUM_TLS_SW_COUNTERS; i++) |
|---|
| .. | .. |
|---|
| 77 | 81 | { |
|---|
| 78 | 82 | int i, idx = 0; |
|---|
| 79 | 83 | |
|---|
| 80 | | - if (!priv->tls) |
|---|
| 84 | + if (!is_tls_atomic_stats(priv)) |
|---|
| 81 | 85 | return 0; |
|---|
| 82 | 86 | |
|---|
| 83 | 87 | for (i = 0; i < NUM_TLS_SW_COUNTERS; i++) |
|---|