summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/mlx5_ifc.h
diff options
context:
space:
mode:
authorVlad Buslov2018-09-26 14:19:19 +0200
committerSaeed Mahameed2018-10-18 22:13:31 +0200
commit2a4c4298025084ba61788dfa27bcf6ea3f3c789e (patch)
tree49db76eee5150e18d15395a57acb7077d7cc7f0c /include/linux/mlx5/mlx5_ifc.h
parentnet/mlx5: Take fs_counters dellist before addlist (diff)
downloadkernel-qcow2-linux-2a4c4298025084ba61788dfa27bcf6ea3f3c789e.tar.gz
kernel-qcow2-linux-2a4c4298025084ba61788dfa27bcf6ea3f3c789e.tar.xz
kernel-qcow2-linux-2a4c4298025084ba61788dfa27bcf6ea3f3c789e.zip
net/mlx5: Remove counter from idr after removing it from list
Fs_counters list can temporary become unsorted when new counters are created/deleted concurrently. Idr is used to quickly lookup position to insert new counter in logarithmic time. However, if new flows are concurrently inserted during time window when flows with adjacent ids are already removed from idr but are still present in counters list, mlx5_fc_stats_work() observes counters list in inconsistent state, which results following warning: [ 1839.561955] mlx5_core 0000:81:00.0: mlx5_cmd_fc_bulk_get:587:(pid 729): Flow counter id (0x102d5) out of range (0x1c0a8..0x1c10b). Counter ignored. Move idr_remove() call to be executed synchronously with counter deletion from list. Extract this code to mlx5_fc_stats_remove() helper function that is called by workqueue job handler mlx5_fc_stats_work(). Fixes: 12d6066c3b29 ("net/mlx5: Add flow counters idr") Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com>
Diffstat (limited to 'include/linux/mlx5/mlx5_ifc.h')
0 files changed, 0 insertions, 0 deletions