sfc: Implement TSO for TCP/IPv6
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8880f4ec21
commit
738a8f4b0c
@@ -471,6 +471,23 @@ static void efx_ethtool_get_stats(struct net_device *net_dev,
|
||||
}
|
||||
}
|
||||
|
||||
static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable)
|
||||
{
|
||||
struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev);
|
||||
unsigned long features;
|
||||
|
||||
features = NETIF_F_TSO;
|
||||
if (efx->type->offload_features & NETIF_F_V6_CSUM)
|
||||
features |= NETIF_F_TSO6;
|
||||
|
||||
if (enable)
|
||||
net_dev->features |= features;
|
||||
else
|
||||
net_dev->features &= ~features;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable)
|
||||
{
|
||||
struct efx_nic *efx = netdev_priv(net_dev);
|
||||
@@ -834,7 +851,8 @@ const struct ethtool_ops efx_ethtool_ops = {
|
||||
.get_sg = ethtool_op_get_sg,
|
||||
.set_sg = ethtool_op_set_sg,
|
||||
.get_tso = ethtool_op_get_tso,
|
||||
.set_tso = ethtool_op_set_tso,
|
||||
/* Need to enable/disable TSO-IPv6 too */
|
||||
.set_tso = efx_ethtool_set_tso,
|
||||
.get_flags = ethtool_op_get_flags,
|
||||
.set_flags = ethtool_op_set_flags,
|
||||
.get_sset_count = efx_ethtool_get_sset_count,
|
||||
|
Reference in New Issue
Block a user