summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@intel.com>2020-03-19 02:01:00 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-04-19 22:17:14 +0300
commit794e5bc817bcc16ca955691e957e23908edbef9c (patch)
tree9160a97b71de79548bb7f026c26baf582aa627ff /tools/perf/scripts/python/export-to-sqlite.py
parent83ba21b9ef7706413bdaf9fa8357b93c4986d8a0 (diff)
downloadlinux-794e5bc817bcc16ca955691e957e23908edbef9c.tar.xz
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/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions