ixgbe: Add support for VXLAN RX offloads
Subsystems (2)
PATCH v5 1/1 ixgbe: Add support for VXLAN RX offloads
From: Mark Rustad <[email protected]>
Add support for VXLAN RX offloads for the X55x devices that support them.
---
Changes in V3:
- change __constant_htons to simply htons
Changes in V4:
- add static to ixgbe_clear_vxlan_port
- use ixgbe_clear_vxlan_port to clear vxlan port
- call ixgbe_clear_vxlan_port when turning checksum offload off Changes in V5:
- removed redundant include of net/vxlan.h
--- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 6 + drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 18 +++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 116 ++++++++++++++++++++---- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 15 ++- 4 files changed, 124 insertions(+), 31 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe.h +6 -0
@@ -630,6 +630,7 @@ struct ixgbe_adapter {#define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 21)#define IXGBE_FLAG_SRIOV_CAPABLE (u32)(1 << 22)#define IXGBE_FLAG_SRIOV_ENABLED (u32)(1 << 23) +#define IXGBE_FLAG_VXLAN_OFFLOAD_CAPABLE BIT(24)u32 flags2;#define IXGBE_FLAG2_RSC_CAPABLE (u32)(1 << 0)
@@ -644,6 +645,9 @@ 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 /* Tx fast path data */ int num_tx_queues;
@@ -757,7 +761,9 @@ 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;
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c +14 -4
@@ -1519,20 +1519,28 @@ static u32 ixgbe_atr_compute_sig_hash_82599(union ixgbe_atr_hash_dword input,* @input: unique input dword * @common: compressed common input dword * @queue: queue index to direct traffic to +* +* Note that the tunnel bit in input must not be set when the hardware +* tunneling support does not exist. **/ s32 ixgbe_fdir_add_signature_filter_82599 (struct ixgbe_hw *hw,union ixgbe_atr_hash_dword input,union ixgbe_atr_hash_dword common,u8 queue) { -u64 fdirhashcmd; -u32 fdircmd; +u64 fdirhashcmd; +u8 flow_type; +bool tunnel; +u32 fdircmd;/* * Get the flow_type in order to program FDIRCMD properly * lowest 2 bits are FDIRCMD.L4TYPE, third lowest bit is FDIRCMD.IPV6 */ -switch (input.formatted.flow_type) { + tunnel = !!(input.formatted.flow_type &IXGBE_ATR_L4TYPE_TUNNEL_MASK ); + flow_type = input.formatted.flow_type & + (IXGBE_ATR_L4TYPE_TUNNEL_MASK -1 ); +switch (flow_type) {case IXGBE_ATR_FLOW_TYPE_TCPV4 :case IXGBE_ATR_FLOW_TYPE_UDPV4 :case IXGBE_ATR_FLOW_TYPE_SCTPV4 :
@@ -1548,8 +1556,10 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,/* configure FDIRCMD register */ fdircmd =IXGBE_FDIRCMD_CMD_ADD_FLOW |IXGBE_FDIRCMD_FILTER_UPDATE |IXGBE_FDIRCMD_LAST |IXGBE_FDIRCMD_QUEUE_EN ; - fdircmd |= input.formatted.flow_type <<IXGBE_FDIRCMD_FLOW_TYPE_SHIFT ; + fdircmd |= (u32 )flow_type <<IXGBE_FDIRCMD_FLOW_TYPE_SHIFT ; fdircmd |= (u32 )queue <<IXGBE_FDIRCMD_RX_QUEUE_SHIFT ; +if (tunnel) + fdircmd |=IXGBE_FDIRCMD_TUNNEL_FILTER ;/* * The lower 32-bits of fdirhashcmd is for FDIRHASH, the upper 32-bits
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +95 -21
241 lines not on this page · raw message
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +9 -6
@@ -2566,9 +2566,11 @@ enum ixgbe_fdir_pballoc_type {#define IXGBE_FDIRCMD_QUEUE_EN 0x00008000#define IXGBE_FDIRCMD_FLOW_TYPE_SHIFT 5#define IXGBE_FDIRCMD_RX_QUEUE_SHIFT 16 +#define IXGBE_FDIRCMD_RX_TUNNEL_FILTER_SHIFT 23#define IXGBE_FDIRCMD_VT_POOL_SHIFT 24#define IXGBE_FDIR_INIT_DONE_POLL 10#define IXGBE_FDIRCMD_CMD_POLL 10 +#define IXGBE_FDIRCMD_TUNNEL_FILTER 0x00800000#define IXGBE_FDIR_DROP_QUEUE 127
@@ -2859,12 +2861,13 @@ typedef u32 ixgbe_link_speed;#define IXGBE_ATR_SIGNATURE_HASH_KEY 0x174D3614/* Software ATR input stream values and masks */ -#define IXGBE_ATR_HASH_MASK 0x7fff -#define IXGBE_ATR_L4TYPE_MASK 0x3 -#define IXGBE_ATR_L4TYPE_UDP 0x1 -#define IXGBE_ATR_L4TYPE_TCP 0x2 -#define IXGBE_ATR_L4TYPE_SCTP 0x3 -#define IXGBE_ATR_L4TYPE_IPV6_MASK 0x4 +#define IXGBE_ATR_HASH_MASK 0x7fff +#define IXGBE_ATR_L4TYPE_MASK 0x3 +#define IXGBE_ATR_L4TYPE_UDP 0x1 +#define IXGBE_ATR_L4TYPE_TCP 0x2 +#define IXGBE_ATR_L4TYPE_SCTP 0x3 +#define IXGBE_ATR_L4TYPE_IPV6_MASK 0x4 +#define IXGBE_ATR_L4TYPE_TUNNEL_MASK 0x10enum ixgbe_atr_flow_type {IXGBE_ATR_FLOW_TYPE_IPV4 =0x0 ,IXGBE_ATR_FLOW_TYPE_UDPV4 =0x1 ,
Rustad
PATCH v5 1/1 ixgbe: Add support for VXLAN RX offloads
Quoted 8 lines · Mark D Rustad
From: Mark Rustad <[email protected]>
Add support for VXLAN RX offloads for the X55x devices that support them.
Signed-off-by Mark Rustad <[email protected]>
Quoted 9 lines
---
Changes in V3:
- change__constant_htonsto simply htons
Changes in V4:
- add static toixgbe_clear_vxlan_port
- useixgbe_clear_vxlan_portto clear vxlan port
- callixgbe_clear_vxlan_portwhen turning checksum offload off Changes in V5:
- removed redundant include ofnet/vxlan.h
This is intended to replace the single patch with the same name that was in a two-patch series. The only change in this version was to delete a redundant include of net/vxlan.h.
--
Mark Rustad, Networking Division, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150826/e7f0b458/attachment.asc>
PATCH v5 1/1 ixgbe: Add support for VXLAN RX offloads
In reply to Mark D RustadQuoted 15 lines · Mark D Rustad
From: Mark Rustad <[email protected]>
Add support for VXLAN RX offloads for the X55x devices that support them.
Signed-off-by Mark Rustad <[email protected]>---
Changes in V3:
- change__constant_htonsto simply htons
Changes in V4:
- add static toixgbe_clear_vxlan_port
- useixgbe_clear_vxlan_portto clear vxlan port
- callixgbe_clear_vxlan_portwhen turning checksum offload off Changes in V5:
- removed redundant include ofnet/vxlan.h
Quoted 7 lines
--- drivers/net/ethernet/intel/ixgbe/ixgbe.h | 6 + drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 18 +++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 116 ++++++++++++++++++++---- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 15 ++- 4 files changed, 124 insertions(+), 31 deletions(-)
Your v4 of this patch was already pushed upstream and accepted, so I am
dropping this patch, as most of it is already upstream. If the
redundant include still exists, please submit a patch to resolve that
single issue.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150910/59fec0aa/attachment.asc>