]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Simplify matching group searches
authorEli Cohen <eli@mellanox.com>
Wed, 26 Feb 2020 13:03:16 +0000 (15:03 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Mar 2020 06:19:04 +0000 (23:19 -0700)
commit1d46119325d1c02c486b4a949bb2d058d6fe3da9
treec7615e264b4b97fe31852ce0ad408c9ae60821b9
parent1b37850518630cf19d1559c4dc782418a891636c
net/mlx5: Simplify matching group searches

Instead of using two different structs for searching groups with the
same match, use a single struct and thus simplify the code, make it more
readable and smaller size which means less code cache misses.

         text    data     bss     dec     hex
before: 35524    2744       0   38268    957c
after:  35038    2744       0   37782    9396

When testing add 70000 rules, delete all the rules, and repeat three
times taking the average, we get (time in seconds):

Before the change: insert 16.80, delete 11.02
After the change:  insert 16.55, delete 10.95

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c