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)
commitb820ce00e03af3255e1db9cc086caf742ea32809
treec7615e264b4b97fe31852ce0ad408c9ae60821b9
parentd528d4970503edafc23bd43d322a818d74954f7a
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