ixgbe: add support for geneve Rx offload
Subsystems (2)
PATCH 1/1 ixgbe: add support for geneve Rx offload
Add geneve Rx offload support for x550em_a.
The implementation follows the vxlan code with the lower 16 bits of the VXLANCTRL register holding the UDP port for VXLAN and the upper for Geneve.
Disabled NFS filters in the RFCTL register which allows us to simplify the check for VXLAN and Geneve packets in ixgbe_rx_checksum().
Removed vxlan from the name of the callback functions and replaced it with udp_tunnel which is more in line with the new API.
--- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 174 ++++++++++++++++++------- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 7 + 3 files changed, 134 insertions(+), 51 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe.h +3 -1
@@ -645,6 +645,7 @@ struct ixgbe_adapter {#define IXGBE_FLAG_RX_HWTSTAMP_ENABLED BIT(25)#define IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER BIT(26)#define IXGBE_FLAG_DCB_CAPABLE BIT(27) +#define IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE BIT(28)u32 flags2;#define IXGBE_FLAG2_RSC_CAPABLE BIT(0)
@@ -658,7 +659,7 @@ struct ixgbe_adapter {#define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP BIT(9)#define IXGBE_FLAG2_PTP_PPS_ENABLED BIT(10)#define IXGBE_FLAG2_PHY_INTERRUPT BIT(11) -#define IXGBE_FLAG2_VXLAN_REREG_NEEDED BIT(12) +#define IXGBE_FLAG2_UDP_TUN_REREG_NEEDED BIT(12)#define IXGBE_FLAG2_VLAN_PROMISC BIT(13)/* Tx fast path data */
@@ -672,6 +673,7 @@ struct ixgbe_adapter {/* Port number used to identify VXLAN traffic */ __be16 vxlan_port; +__be16 geneve_port;/* TX */ struct ixgbe_ring *tx_ring[MAX_TX_QUEUES ]____cacheline_aligned_in_smp ;
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +124 -50
278 lines not on this page · raw message
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +7 -0
@@ -487,6 +487,13 @@ struct ixgbe_thermal_sensor_data {#define IXGBE_FHFT_EXT (_n) (0x09800 + ((_n) * 0x100))/* Ext Flexible Host * Filter Table */ +/* masks for accessing VXLAN and GENEVE UDP ports */ +#define IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK 0x0000ffff/* VXLAN port */ +#define IXGBE_VXLANCTRL_GENEVE_UDPPORT_MASK 0xffff0000/* GENEVE port */ +#define IXGBE_VXLANCTRL_ALL_UDPPORT_MASK 0xffffffff/* GENEVE/VXLAN */ + +#define IXGBE_VXLANCTRL_GENEVE_UDPPORT_SHIFT 16 +#define IXGBE_FLEXIBLE_FILTER_COUNT_MAX 4#define IXGBE_EXT_FLEXIBLE_FILTER_COUNT_MAX 2
Bowers
PATCH 1/1 ixgbe: add support for geneve Rx offload
Quoted 19 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Emil Tantilov
Sent: Wednesday, August 10, 2016 11:19 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] ixgbe: add support for geneve Rx offloadAdd geneve Rx offload support for
x550em_a.The implementation follows the vxlan code with the lower 16 bits of the VXLANCTRL register holding the UDP port for VXLAN and the upper for Geneve.
Disabled NFS filters in the RFCTL register which allows us to simplify the check for VXLAN and Geneve packets in
ixgbe_rx_checksum().Removed vxlan from the name of the callback functions and replaced it with
udp_tunnelwhich is more in line with the new API.
Quoted 7 lines
Signed-off-by Emil Tantilov <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 4 - drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 174 ++++++++++++++++++------- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 7 + 3 files changed, 134 insertions(+), 51 deletions(-)