diff options
| author | Maxim Mikityanskiy <[email protected]> | 2022-01-25 12:52:51 +0200 |
|---|---|---|
| committer | Saeed Mahameed <[email protected]> | 2022-02-14 22:30:50 -0800 |
| commit | 8bf30be75069d6080659de9a28565c048f6cef9b (patch) | |
| tree | 15387708674cff11ec2e28da8cd778944bb5cfd9 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 17c84cb46e33fcd682d5d5d6180162374cb24a34 (diff) | |
net/mlx5e: Introduce select queue parameters
ndo_select_queue can be called at any time, and there is no way to stop
the kernel from calling it to synchronize with configuration changes
(real_num_tx_queues, num_tc). This commit introduces an internal way in
mlx5e to sync mlx5e_select_queue() with these changes. The configuration
needed by this function is stored in a struct mlx5e_selq_params, which
is modified and accessed in an atomic way using RCU methods. The whole
ndo_select_queue is called under an RCU lock, providing the necessary
guarantees.
The parameters stored in the new struct mlx5e_selq_params should only be
used from inside mlx5e_select_queue. It's the minimal set of parameters
needed for mlx5e_select_queue to do its job efficiently, derived from
parameters stored elsewhere. That means that when the configuration
change, mlx5e_selq_params may need to be updated. In such cases, the
mlx5e_selq_prepare/mlx5e_selq_apply API should be used.
struct mlx5e_selq contains two slots for the params: active and standby.
mlx5e_selq_prepare updates the standby slot, and mlx5e_selq_apply swaps
the slots in a safe atomic way using the RCU API. It integrates well
with the open/activate stages of the configuration change flow.
Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions