diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2009-04-27 18:36:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-28 04:53:15 -0400 |
commit | 45a5ead0220cc7cc70f6961879decffbd0a54cc0 (patch) | |
tree | b9e038ea11b3fbfe0d5ed7ca4f38fc0fc1b7f0b2 /drivers/net/ixgbe/ixgbe_main.c | |
parent | b9473560c6d882e0fbd3a8817e906c847b11c722 (diff) |
ixgbe: enable hardware offload for sctp
Inspired by: Vlad Yasevich <vladislav.yasevich@hp.com>
This is the code to enable ixgbe for hardware offload support
of CRC32c on both transmit and receive of SCTP traffic.
only 82599 supports this offload, not 82598.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 42b803d5cfd3..c3dff8f02e33 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -4189,12 +4189,18 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter, | |||
4189 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) | 4189 | if (ip_hdr(skb)->protocol == IPPROTO_TCP) |
4190 | type_tucmd_mlhl |= | 4190 | type_tucmd_mlhl |= |
4191 | IXGBE_ADVTXD_TUCMD_L4T_TCP; | 4191 | IXGBE_ADVTXD_TUCMD_L4T_TCP; |
4192 | else if (ip_hdr(skb)->protocol == IPPROTO_SCTP) | ||
4193 | type_tucmd_mlhl |= | ||
4194 | IXGBE_ADVTXD_TUCMD_L4T_SCTP; | ||
4192 | break; | 4195 | break; |
4193 | case cpu_to_be16(ETH_P_IPV6): | 4196 | case cpu_to_be16(ETH_P_IPV6): |
4194 | /* XXX what about other V6 headers?? */ | 4197 | /* XXX what about other V6 headers?? */ |
4195 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) | 4198 | if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) |
4196 | type_tucmd_mlhl |= | 4199 | type_tucmd_mlhl |= |
4197 | IXGBE_ADVTXD_TUCMD_L4T_TCP; | 4200 | IXGBE_ADVTXD_TUCMD_L4T_TCP; |
4201 | else if (ipv6_hdr(skb)->nexthdr == IPPROTO_SCTP) | ||
4202 | type_tucmd_mlhl |= | ||
4203 | IXGBE_ADVTXD_TUCMD_L4T_SCTP; | ||
4198 | break; | 4204 | break; |
4199 | default: | 4205 | default: |
4200 | if (unlikely(net_ratelimit())) { | 4206 | if (unlikely(net_ratelimit())) { |
@@ -4718,6 +4724,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4718 | netdev->features |= NETIF_F_TSO6; | 4724 | netdev->features |= NETIF_F_TSO6; |
4719 | netdev->features |= NETIF_F_GRO; | 4725 | netdev->features |= NETIF_F_GRO; |
4720 | 4726 | ||
4727 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
4728 | netdev->features |= NETIF_F_SCTP_CSUM; | ||
4729 | |||
4721 | netdev->vlan_features |= NETIF_F_TSO; | 4730 | netdev->vlan_features |= NETIF_F_TSO; |
4722 | netdev->vlan_features |= NETIF_F_TSO6; | 4731 | netdev->vlan_features |= NETIF_F_TSO6; |
4723 | netdev->vlan_features |= NETIF_F_IP_CSUM; | 4732 | netdev->vlan_features |= NETIF_F_IP_CSUM; |