diff options
-rw-r--r-- | drivers/net/Kconfig | 11 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 12 |
2 files changed, 1 insertions, 22 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 7159a39aa2b9..45403e67e351 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2301,6 +2301,7 @@ config UGETH_TX_ON_DEMAND | |||
2301 | config MV643XX_ETH | 2301 | config MV643XX_ETH |
2302 | tristate "Marvell Discovery (643XX) and Orion ethernet support" | 2302 | tristate "Marvell Discovery (643XX) and Orion ethernet support" |
2303 | depends on MV64360 || MV64X60 || (PPC_MULTIPLATFORM && PPC32) || PLAT_ORION | 2303 | depends on MV64360 || MV64X60 || (PPC_MULTIPLATFORM && PPC32) || PLAT_ORION |
2304 | select INET_LRO | ||
2304 | select PHYLIB | 2305 | select PHYLIB |
2305 | help | 2306 | help |
2306 | This driver supports the gigabit ethernet MACs in the | 2307 | This driver supports the gigabit ethernet MACs in the |
@@ -2310,16 +2311,6 @@ config MV643XX_ETH | |||
2310 | Some boards that use the Discovery chipset are the Momenco | 2311 | Some boards that use the Discovery chipset are the Momenco |
2311 | Ocelot C and Jaguar ATX and Pegasos II. | 2312 | Ocelot C and Jaguar ATX and Pegasos II. |
2312 | 2313 | ||
2313 | config MV643XX_ETH_LRO | ||
2314 | tristate "Marvell 643XX ethernet driver LRO support" | ||
2315 | depends on MV643XX_ETH | ||
2316 | select INET_LRO | ||
2317 | help | ||
2318 | Say y here if you want to use Large Receive Offload for the | ||
2319 | mv643xx_eth driver. | ||
2320 | |||
2321 | If in doubt, say N. | ||
2322 | |||
2323 | config QLA3XXX | 2314 | config QLA3XXX |
2324 | tristate "QLogic QLA3XXX Network Driver Support" | 2315 | tristate "QLogic QLA3XXX Network Driver Support" |
2325 | depends on PCI | 2316 | depends on PCI |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 56912add8b13..d4d5a5690d89 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -351,10 +351,8 @@ struct rx_queue { | |||
351 | int rx_desc_area_size; | 351 | int rx_desc_area_size; |
352 | struct sk_buff **rx_skb; | 352 | struct sk_buff **rx_skb; |
353 | 353 | ||
354 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
355 | struct net_lro_mgr lro_mgr; | 354 | struct net_lro_mgr lro_mgr; |
356 | struct net_lro_desc lro_arr[8]; | 355 | struct net_lro_desc lro_arr[8]; |
357 | #endif | ||
358 | }; | 356 | }; |
359 | 357 | ||
360 | struct tx_queue { | 358 | struct tx_queue { |
@@ -516,7 +514,6 @@ static void txq_maybe_wake(struct tx_queue *txq) | |||
516 | 514 | ||
517 | 515 | ||
518 | /* rx napi ******************************************************************/ | 516 | /* rx napi ******************************************************************/ |
519 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
520 | static int | 517 | static int |
521 | mv643xx_get_skb_header(struct sk_buff *skb, void **iphdr, void **tcph, | 518 | mv643xx_get_skb_header(struct sk_buff *skb, void **iphdr, void **tcph, |
522 | u64 *hdr_flags, void *priv) | 519 | u64 *hdr_flags, void *priv) |
@@ -542,7 +539,6 @@ mv643xx_get_skb_header(struct sk_buff *skb, void **iphdr, void **tcph, | |||
542 | 539 | ||
543 | return 0; | 540 | return 0; |
544 | } | 541 | } |
545 | #endif | ||
546 | 542 | ||
547 | static int rxq_process(struct rx_queue *rxq, int budget) | 543 | static int rxq_process(struct rx_queue *rxq, int budget) |
548 | { | 544 | { |
@@ -612,13 +608,11 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
612 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 608 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
613 | skb->protocol = eth_type_trans(skb, mp->dev); | 609 | skb->protocol = eth_type_trans(skb, mp->dev); |
614 | 610 | ||
615 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
616 | if (skb->dev->features & NETIF_F_LRO && | 611 | if (skb->dev->features & NETIF_F_LRO && |
617 | skb->ip_summed == CHECKSUM_UNNECESSARY) { | 612 | skb->ip_summed == CHECKSUM_UNNECESSARY) { |
618 | lro_receive_skb(&rxq->lro_mgr, skb, (void *)cmd_sts); | 613 | lro_receive_skb(&rxq->lro_mgr, skb, (void *)cmd_sts); |
619 | lro_flush_needed = 1; | 614 | lro_flush_needed = 1; |
620 | } else | 615 | } else |
621 | #endif | ||
622 | netif_receive_skb(skb); | 616 | netif_receive_skb(skb); |
623 | 617 | ||
624 | continue; | 618 | continue; |
@@ -640,10 +634,8 @@ err: | |||
640 | dev_kfree_skb(skb); | 634 | dev_kfree_skb(skb); |
641 | } | 635 | } |
642 | 636 | ||
643 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
644 | if (lro_flush_needed) | 637 | if (lro_flush_needed) |
645 | lro_flush_all(&rxq->lro_mgr); | 638 | lro_flush_all(&rxq->lro_mgr); |
646 | #endif | ||
647 | 639 | ||
648 | if (rx < budget) | 640 | if (rx < budget) |
649 | mp->work_rx &= ~(1 << rxq->index); | 641 | mp->work_rx &= ~(1 << rxq->index); |
@@ -1231,7 +1223,6 @@ static void mv643xx_eth_grab_lro_stats(struct mv643xx_eth_private *mp) | |||
1231 | u32 lro_no_desc = 0; | 1223 | u32 lro_no_desc = 0; |
1232 | int i; | 1224 | int i; |
1233 | 1225 | ||
1234 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
1235 | for (i = 0; i < mp->rxq_count; i++) { | 1226 | for (i = 0; i < mp->rxq_count; i++) { |
1236 | struct rx_queue *rxq = mp->rxq + i; | 1227 | struct rx_queue *rxq = mp->rxq + i; |
1237 | 1228 | ||
@@ -1239,7 +1230,6 @@ static void mv643xx_eth_grab_lro_stats(struct mv643xx_eth_private *mp) | |||
1239 | lro_flushed += rxq->lro_mgr.stats.flushed; | 1230 | lro_flushed += rxq->lro_mgr.stats.flushed; |
1240 | lro_no_desc += rxq->lro_mgr.stats.no_desc; | 1231 | lro_no_desc += rxq->lro_mgr.stats.no_desc; |
1241 | } | 1232 | } |
1242 | #endif | ||
1243 | 1233 | ||
1244 | mp->lro_counters.lro_aggregated = lro_aggregated; | 1234 | mp->lro_counters.lro_aggregated = lro_aggregated; |
1245 | mp->lro_counters.lro_flushed = lro_flushed; | 1235 | mp->lro_counters.lro_flushed = lro_flushed; |
@@ -1939,7 +1929,6 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index) | |||
1939 | nexti * sizeof(struct rx_desc); | 1929 | nexti * sizeof(struct rx_desc); |
1940 | } | 1930 | } |
1941 | 1931 | ||
1942 | #ifdef CONFIG_MV643XX_ETH_LRO | ||
1943 | rxq->lro_mgr.dev = mp->dev; | 1932 | rxq->lro_mgr.dev = mp->dev; |
1944 | memset(&rxq->lro_mgr.stats, 0, sizeof(rxq->lro_mgr.stats)); | 1933 | memset(&rxq->lro_mgr.stats, 0, sizeof(rxq->lro_mgr.stats)); |
1945 | rxq->lro_mgr.features = LRO_F_NAPI; | 1934 | rxq->lro_mgr.features = LRO_F_NAPI; |
@@ -1952,7 +1941,6 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index) | |||
1952 | rxq->lro_mgr.get_skb_header = mv643xx_get_skb_header; | 1941 | rxq->lro_mgr.get_skb_header = mv643xx_get_skb_header; |
1953 | 1942 | ||
1954 | memset(&rxq->lro_arr, 0, sizeof(rxq->lro_arr)); | 1943 | memset(&rxq->lro_arr, 0, sizeof(rxq->lro_arr)); |
1955 | #endif | ||
1956 | 1944 | ||
1957 | return 0; | 1945 | return 0; |
1958 | 1946 | ||