diff options
author | Andre Guedes <andre.guedes@intel.com> | 2020-04-07 14:07:10 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2020-05-19 15:46:35 -0700 |
commit | aa7ca7266fc49966844ac1f868085a49092b9b5d (patch) | |
tree | 53c3a554e6b0af687f8b3d4f27af0ef9a98aa7e9 /drivers/net/ethernet/intel/igc/igc_ptp.c | |
parent | b4d48d96eaec9bff4139dcbeb9590869fc765aa9 (diff) |
igc: Refactor ethertype filtering code
The whole ethertype filtering code is implemented in igc_ethtool.c and
mixes logic from ethtool and core parts. This patch refactors it so core
logic is moved to igc_main.c, aligning the ethertype filtering code
organization with the rest of the filtering code from the driver (MAC
address and VLAN priority).
Besides moving code to igc_main.c, this patch also does some minor
improvements to the code. Below are some highlights.
In case all filters are already in use and the user tries to add another
filter, we return -ENOSPC instead of -EINVAL so a more meaningful error
code is provided. This also aligns with the behavior implemented in MAC
address filtering code.
With this code refactoring, 'etype_bitmap' array in struct igc_adapter
and 'etype_reg_index' in struct igc_nfc_filter are not needed anymore
and are removed.
Log messages are added to help debugging the ethertype filtering code.
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_ptp.c')
0 files changed, 0 insertions, 0 deletions