aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc.h
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@intel.com>2020-04-24 13:16:11 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-05-21 16:19:28 -0700
commitc983e3271923c96cd5f90de0b580f1b210f7f8b6 (patch)
tree89667c3da96275b92264a25b9335a531dcc42d94 /drivers/net/ethernet/intel/igc/igc.h
parentigc: Align terms used in NFC support code (diff)
downloadlinux-dev-c983e3271923c96cd5f90de0b580f1b210f7f8b6.tar.xz
linux-dev-c983e3271923c96cd5f90de0b580f1b210f7f8b6.zip
igc: Change byte order in struct igc_nfc_filter
Every time we access the 'etype' and 'vlan_tci' fields from struct igc_nfc_filter to enable or disable filters in hardware we have to convert them from big endian to host order so it makes more sense to simply have these fields in host order. The byte order conversion should take place in igc_ethtool_get_nfc_ rule() and igc_ethtool_add_nfc_rule(), which are called by .get_rxnfc and .set_rxnfc ethtool ops, since ethtool subsystem is the one who deals with them in big endian order. 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.h')
-rw-r--r--drivers/net/ethernet/intel/igc/igc.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 7124ba254b89..fcc6261d7f67 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -452,16 +452,10 @@ enum igc_filter_match_flags {
IGC_FILTER_FLAG_DST_MAC_ADDR = 0x8,
};
-/* RX network flow classification data structure */
struct igc_nfc_filter {
- /* Byte layout in order, all values with MSB first:
- * match_flags - 1 byte
- * etype - 2 bytes
- * vlan_tci - 2 bytes
- */
u8 match_flags;
- __be16 etype;
- __be16 vlan_tci;
+ u16 etype;
+ u16 vlan_tci;
u8 src_addr[ETH_ALEN];
u8 dst_addr[ETH_ALEN];
};