diff options
author | Andre Guedes <andre.guedes@intel.com> | 2020-03-18 16:01:00 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2020-04-19 12:17:14 -0700 |
commit | 794e5bc817bcc16ca955691e957e23908edbef9c (patch) | |
tree | 9160a97b71de79548bb7f026c26baf582aa627ff /drivers/net/ethernet/intel/igc/igc_base.c | |
parent | 83ba21b9ef7706413bdaf9fa8357b93c4986d8a0 (diff) |
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 'drivers/net/ethernet/intel/igc/igc_base.c')
0 files changed, 0 insertions, 0 deletions