diff options
author | 2020-03-18 16:01:00 -0700 | |
---|---|---|
committer | 2020-04-19 12:17:14 -0700 | |
commit | 794e5bc817bcc16ca955691e957e23908edbef9c (patch) | |
tree | 9160a97b71de79548bb7f026c26baf582aa627ff /tools/perf/scripts/python | |
parent | igc: Remove igc_*_mac_steering_filter() wrappers (diff) | |
download | linux-dev-794e5bc817bcc16ca955691e957e23908edbef9c.tar.xz linux-dev-794e5bc817bcc16ca955691e957e23908edbef9c.zip |
igc: Refactor igc_mac_entry_can_be_used()
The helper igc_mac_entry_can_be_used() implementation is a bit
convoluted since it does two different things: find a not-in-use slot
in mac_table or find an in-use slot where the address and address type
match. This patch does a code refactoring and break it up into two
helper functions.
With this patch we might traverse mac_table twice in some situations,
but this is not harmful performance-wise (mac_table has only 16 entries
and adding mac filters is not hot-path), and it improves igc_add_mac_
filter() readability considerably.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions