diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-02-24 10:41:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-25 02:17:21 -0500 |
commit | ab307a3983a7fa28f260f3123293c7b91d5d629e (patch) | |
tree | 7c9e21b65d00d32e60f1cf231a60185c4516f95e /drivers/net/mv643xx_eth.c | |
parent | 97daee83b0fd2361cc70be6f3d6ecda69def2103 (diff) |
mv643xx_eth: make LRO unconditional
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 12 |
1 files changed, 0 insertions, 12 deletions
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 | ||