diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2014-04-01 05:07:20 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-04-18 20:42:45 -0400 |
commit | 059dab69652da3525d320d77ac5422ec708ced14 (patch) | |
tree | d4efdfc6e31e663ba1197aa6c88ca7a59e422435 /drivers/net | |
parent | dd225bc675bc16972cc11f73fa0dc3ccb1ed9da1 (diff) |
i40e: fix TCP flag replication for hardware offload
As reported by Eric Dumazet, the i40e driver was allowing the hardware
to replicate the PSH flag on all segments of a TSO operation.
This patch fixes the first/middle/last TCP flags settings which
makes the TSO operations work correctly.
With this change we are now configuring the CWR bit to only be set
in the first packet of a TSO, so this patch also enables TSO_ECN,
in order to advertise to the stack that we do the right thing
on the wire.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 861b722c2672..59eada31e211 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -4271,6 +4271,14 @@ static int i40e_open(struct net_device *netdev) | |||
4271 | if (err) | 4271 | if (err) |
4272 | return err; | 4272 | return err; |
4273 | 4273 | ||
4274 | /* configure global TSO hardware offload settings */ | ||
4275 | wr32(&pf->hw, I40E_GLLAN_TSOMSK_F, be32_to_cpu(TCP_FLAG_PSH | | ||
4276 | TCP_FLAG_FIN) >> 16); | ||
4277 | wr32(&pf->hw, I40E_GLLAN_TSOMSK_M, be32_to_cpu(TCP_FLAG_PSH | | ||
4278 | TCP_FLAG_FIN | | ||
4279 | TCP_FLAG_CWR) >> 16); | ||
4280 | wr32(&pf->hw, I40E_GLLAN_TSOMSK_L, be32_to_cpu(TCP_FLAG_CWR) >> 16); | ||
4281 | |||
4274 | #ifdef CONFIG_I40E_VXLAN | 4282 | #ifdef CONFIG_I40E_VXLAN |
4275 | vxlan_get_rx_port(netdev); | 4283 | vxlan_get_rx_port(netdev); |
4276 | #endif | 4284 | #endif |
@@ -6712,6 +6720,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) | |||
6712 | NETIF_F_HW_VLAN_CTAG_FILTER | | 6720 | NETIF_F_HW_VLAN_CTAG_FILTER | |
6713 | NETIF_F_IPV6_CSUM | | 6721 | NETIF_F_IPV6_CSUM | |
6714 | NETIF_F_TSO | | 6722 | NETIF_F_TSO | |
6723 | NETIF_F_TSO_ECN | | ||
6715 | NETIF_F_TSO6 | | 6724 | NETIF_F_TSO6 | |
6716 | NETIF_F_RXCSUM | | 6725 | NETIF_F_RXCSUM | |
6717 | NETIF_F_NTUPLE | | 6726 | NETIF_F_NTUPLE | |