Andre Guedes 794e5bc817 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>
2020-04-19 12:17:14 -07:00
..
2020-02-24 11:24:47 -08:00
2020-02-24 11:24:47 -08:00
2020-03-03 17:54:54 -08:00
2020-04-12 21:20:27 -07:00
2020-04-14 16:30:14 -07:00
2020-03-03 17:54:55 -08:00