aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-01-19 00:50:16 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:34:06 -0500
commitda3bc07171dff957906cbe2ad5abb443eccf57c4 (patch)
treec59b6bec9e78c66c7fc5ceb0ee0288965ee7f47a /drivers/net/sfc/efx.c
parent78b6f4ce58d1c85190003840912cc9097cbb8146 (diff)
sfc: Replace LRO with GRO
This patch makes sfc invoke the GRO hooks instead of LRO. As GRO has a compatible external interface to LRO this is a very straightforward replacement. Everything should appear identical to the user except that the offload is now controlled by the GRO ethtool option instead of LRO. I've kept the lro module parameter as is since that's for compatibility only. I have eliminated efx_rx_mk_skb as the GRO layer can take care of all packets regardless of whether GRO is enabled or not. So the only case where we don't call GRO is if the packet checksum is absent. This is to keep the behaviour changes of the patch to a minimum. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 77aca5d67b57..3ee2a4548cba 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -182,7 +182,6 @@ static int efx_process_channel(struct efx_channel *channel, int rx_quota)
182 channel->rx_pkt = NULL; 182 channel->rx_pkt = NULL;
183 } 183 }
184 184
185 efx_flush_lro(channel);
186 efx_rx_strategy(channel); 185 efx_rx_strategy(channel);
187 186
188 efx_fast_push_rx_descriptors(&efx->rx_queue[channel->channel]); 187 efx_fast_push_rx_descriptors(&efx->rx_queue[channel->channel]);
@@ -1269,18 +1268,11 @@ static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
1269static int efx_init_napi(struct efx_nic *efx) 1268static int efx_init_napi(struct efx_nic *efx)
1270{ 1269{
1271 struct efx_channel *channel; 1270 struct efx_channel *channel;
1272 int rc;
1273 1271
1274 efx_for_each_channel(channel, efx) { 1272 efx_for_each_channel(channel, efx) {
1275 channel->napi_dev = efx->net_dev; 1273 channel->napi_dev = efx->net_dev;
1276 rc = efx_lro_init(&channel->lro_mgr, efx);
1277 if (rc)
1278 goto err;
1279 } 1274 }
1280 return 0; 1275 return 0;
1281 err:
1282 efx_fini_napi(efx);
1283 return rc;
1284} 1276}
1285 1277
1286static void efx_fini_napi(struct efx_nic *efx) 1278static void efx_fini_napi(struct efx_nic *efx)
@@ -1288,7 +1280,6 @@ static void efx_fini_napi(struct efx_nic *efx)
1288 struct efx_channel *channel; 1280 struct efx_channel *channel;
1289 1281
1290 efx_for_each_channel(channel, efx) { 1282 efx_for_each_channel(channel, efx) {
1291 efx_lro_fini(&channel->lro_mgr);
1292 channel->napi_dev = NULL; 1283 channel->napi_dev = NULL;
1293 } 1284 }
1294} 1285}
@@ -2097,7 +2088,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
2097 net_dev->features |= (NETIF_F_IP_CSUM | NETIF_F_SG | 2088 net_dev->features |= (NETIF_F_IP_CSUM | NETIF_F_SG |
2098 NETIF_F_HIGHDMA | NETIF_F_TSO); 2089 NETIF_F_HIGHDMA | NETIF_F_TSO);
2099 if (lro) 2090 if (lro)
2100 net_dev->features |= NETIF_F_LRO; 2091 net_dev->features |= NETIF_F_GRO;
2101 /* Mask for features that also apply to VLAN devices */ 2092 /* Mask for features that also apply to VLAN devices */
2102 net_dev->vlan_features |= (NETIF_F_ALL_CSUM | NETIF_F_SG | 2093 net_dev->vlan_features |= (NETIF_F_ALL_CSUM | NETIF_F_SG |
2103 NETIF_F_HIGHDMA | NETIF_F_TSO); 2094 NETIF_F_HIGHDMA | NETIF_F_TSO);