diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-29 10:16:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-29 20:23:57 -0500 |
commit | 738a8f4b0c0e6ce7260e1514d41c764f334982e4 (patch) | |
tree | ef24785fe6f168be25a97e00f7619eb7ec9e0d89 /drivers/net/sfc/ethtool.c | |
parent | 8880f4ec21e668dcab3c6d387524a887e5bcbf73 (diff) |
sfc: Implement TSO for TCP/IPv6
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/ethtool.c')
-rw-r--r-- | drivers/net/sfc/ethtool.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 5492b6336602..f6981216f1fc 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -471,6 +471,23 @@ static void efx_ethtool_get_stats(struct net_device *net_dev, | |||
471 | } | 471 | } |
472 | } | 472 | } |
473 | 473 | ||
474 | static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) | ||
475 | { | ||
476 | struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev); | ||
477 | unsigned long features; | ||
478 | |||
479 | features = NETIF_F_TSO; | ||
480 | if (efx->type->offload_features & NETIF_F_V6_CSUM) | ||
481 | features |= NETIF_F_TSO6; | ||
482 | |||
483 | if (enable) | ||
484 | net_dev->features |= features; | ||
485 | else | ||
486 | net_dev->features &= ~features; | ||
487 | |||
488 | return 0; | ||
489 | } | ||
490 | |||
474 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) | 491 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) |
475 | { | 492 | { |
476 | struct efx_nic *efx = netdev_priv(net_dev); | 493 | struct efx_nic *efx = netdev_priv(net_dev); |
@@ -834,7 +851,8 @@ const struct ethtool_ops efx_ethtool_ops = { | |||
834 | .get_sg = ethtool_op_get_sg, | 851 | .get_sg = ethtool_op_get_sg, |
835 | .set_sg = ethtool_op_set_sg, | 852 | .set_sg = ethtool_op_set_sg, |
836 | .get_tso = ethtool_op_get_tso, | 853 | .get_tso = ethtool_op_get_tso, |
837 | .set_tso = ethtool_op_set_tso, | 854 | /* Need to enable/disable TSO-IPv6 too */ |
855 | .set_tso = efx_ethtool_set_tso, | ||
838 | .get_flags = ethtool_op_get_flags, | 856 | .get_flags = ethtool_op_get_flags, |
839 | .set_flags = ethtool_op_set_flags, | 857 | .set_flags = ethtool_op_set_flags, |
840 | .get_sset_count = efx_ethtool_get_sset_count, | 858 | .get_sset_count = efx_ethtool_get_sset_count, |