ixgbe: Store VXLAN port number in network order
The VXLAN port number should be stored in network order instead of in host order as it is accessed from the hot-path in ATR. This way we can avoid having to do any byte swaps in order to validate the port number. I moved the vxlan_port value into a hole in the read-mostly region of the adapter struct. This way it should be in a warm cache-line instead of in some isolated region in memory when it needs to be accessed. In addition I went through and stripped a bunch of unneeded ifdef flags since having an extra variable present doesn't really hurt anything and makes the code easier to read. I also went through and dropped the NETIF_F_RXCSUM flag which was being set in hw_encap_features but provides no value as the flag is not evaluated in the Rx path. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:

committed by
Jeff Kirsher

parent
5676804518
commit
9f12df906c
@@ -661,9 +661,7 @@ struct ixgbe_adapter {
|
||||
#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP (u32)(1 << 9)
|
||||
#define IXGBE_FLAG2_PTP_PPS_ENABLED (u32)(1 << 10)
|
||||
#define IXGBE_FLAG2_PHY_INTERRUPT (u32)(1 << 11)
|
||||
#ifdef CONFIG_IXGBE_VXLAN
|
||||
#define IXGBE_FLAG2_VXLAN_REREG_NEEDED BIT(12)
|
||||
#endif
|
||||
#define IXGBE_FLAG2_VLAN_PROMISC BIT(13)
|
||||
|
||||
/* Tx fast path data */
|
||||
@@ -675,6 +673,9 @@ struct ixgbe_adapter {
|
||||
int num_rx_queues;
|
||||
u16 rx_itr_setting;
|
||||
|
||||
/* Port number used to identify VXLAN traffic */
|
||||
__be16 vxlan_port;
|
||||
|
||||
/* TX */
|
||||
struct ixgbe_ring *tx_ring[MAX_TX_QUEUES] ____cacheline_aligned_in_smp;
|
||||
|
||||
@@ -782,9 +783,6 @@ struct ixgbe_adapter {
|
||||
u32 timer_event_accumulator;
|
||||
u32 vferr_refcount;
|
||||
struct ixgbe_mac_addr *mac_table;
|
||||
#ifdef CONFIG_IXGBE_VXLAN
|
||||
u16 vxlan_port;
|
||||
#endif
|
||||
struct kobject *info_kobj;
|
||||
#ifdef CONFIG_IXGBE_HWMON
|
||||
struct hwmon_buff *ixgbe_hwmon_buff;
|
||||
|
Reference in New Issue
Block a user