diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2009-03-24 16:57:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-25 03:06:21 -0400 |
commit | 64ef8957986f6a04f61e7c95fa6ffeb3a86a6661 (patch) | |
tree | e24cd2b2fba794c83e297774b5500adfbf65f734 /drivers/s390/net/qeth_l2_main.c | |
parent | f61a0d0538ca62547a127fd270d9f3c6e713027f (diff) |
qeth: remove EDDP
Performance measurements showed EDDP does not lower CPU costs but increase
them. So we dump out EDDP code from qeth driver.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 81 |
1 files changed, 8 insertions, 73 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 7632d1208844..9e628b322bd3 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/ip.h> | 21 | #include <linux/ip.h> |
22 | 22 | ||
23 | #include "qeth_core.h" | 23 | #include "qeth_core.h" |
24 | #include "qeth_core_offl.h" | ||
25 | 24 | ||
26 | static int qeth_l2_set_offline(struct ccwgroup_device *); | 25 | static int qeth_l2_set_offline(struct ccwgroup_device *); |
27 | static int qeth_l2_stop(struct net_device *); | 26 | static int qeth_l2_stop(struct net_device *); |
@@ -634,8 +633,6 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
634 | struct qeth_qdio_out_q *queue = card->qdio.out_qs | 633 | struct qeth_qdio_out_q *queue = card->qdio.out_qs |
635 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; | 634 | [qeth_get_priority_queue(card, skb, ipv, cast_type)]; |
636 | int tx_bytes = skb->len; | 635 | int tx_bytes = skb->len; |
637 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; | ||
638 | struct qeth_eddp_context *ctx = NULL; | ||
639 | int data_offset = -1; | 636 | int data_offset = -1; |
640 | int elements_needed = 0; | 637 | int elements_needed = 0; |
641 | int hd_len = 0; | 638 | int hd_len = 0; |
@@ -655,14 +652,10 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
655 | } | 652 | } |
656 | netif_stop_queue(dev); | 653 | netif_stop_queue(dev); |
657 | 654 | ||
658 | if (skb_is_gso(skb)) | ||
659 | large_send = QETH_LARGE_SEND_EDDP; | ||
660 | |||
661 | if (card->info.type == QETH_CARD_TYPE_OSN) | 655 | if (card->info.type == QETH_CARD_TYPE_OSN) |
662 | hdr = (struct qeth_hdr *)skb->data; | 656 | hdr = (struct qeth_hdr *)skb->data; |
663 | else { | 657 | else { |
664 | if ((card->info.type == QETH_CARD_TYPE_IQD) && (!large_send) && | 658 | if (card->info.type == QETH_CARD_TYPE_IQD) { |
665 | (skb_shinfo(skb)->nr_frags == 0)) { | ||
666 | new_skb = skb; | 659 | new_skb = skb; |
667 | data_offset = ETH_HLEN; | 660 | data_offset = ETH_HLEN; |
668 | hd_len = ETH_HLEN; | 661 | hd_len = ETH_HLEN; |
@@ -689,62 +682,26 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
689 | } | 682 | } |
690 | } | 683 | } |
691 | 684 | ||
692 | if (large_send == QETH_LARGE_SEND_EDDP) { | 685 | elements = qeth_get_elements_no(card, (void *)hdr, new_skb, |
693 | ctx = qeth_eddp_create_context(card, new_skb, hdr, | ||
694 | skb->sk->sk_protocol); | ||
695 | if (ctx == NULL) { | ||
696 | QETH_DBF_MESSAGE(2, "could not create eddp context\n"); | ||
697 | goto tx_drop; | ||
698 | } | ||
699 | } else { | ||
700 | elements = qeth_get_elements_no(card, (void *)hdr, new_skb, | ||
701 | elements_needed); | 686 | elements_needed); |
702 | if (!elements) { | 687 | if (!elements) { |
703 | if (data_offset >= 0) | 688 | if (data_offset >= 0) |
704 | kmem_cache_free(qeth_core_header_cache, hdr); | 689 | kmem_cache_free(qeth_core_header_cache, hdr); |
705 | goto tx_drop; | 690 | goto tx_drop; |
706 | } | ||
707 | } | ||
708 | |||
709 | if ((large_send == QETH_LARGE_SEND_NO) && | ||
710 | (skb->ip_summed == CHECKSUM_PARTIAL)) { | ||
711 | qeth_tx_csum(new_skb); | ||
712 | if (card->options.performance_stats) | ||
713 | card->perf_stats.tx_csum++; | ||
714 | } | 691 | } |
715 | 692 | ||
716 | if (card->info.type != QETH_CARD_TYPE_IQD) | 693 | if (card->info.type != QETH_CARD_TYPE_IQD) |
717 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, | 694 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, |
718 | elements, ctx); | 695 | elements); |
719 | else | 696 | else |
720 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, | 697 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, |
721 | elements, ctx, data_offset, hd_len); | 698 | elements, data_offset, hd_len); |
722 | if (!rc) { | 699 | if (!rc) { |
723 | card->stats.tx_packets++; | 700 | card->stats.tx_packets++; |
724 | card->stats.tx_bytes += tx_bytes; | 701 | card->stats.tx_bytes += tx_bytes; |
725 | if (new_skb != skb) | 702 | if (new_skb != skb) |
726 | dev_kfree_skb_any(skb); | 703 | dev_kfree_skb_any(skb); |
727 | if (card->options.performance_stats) { | ||
728 | if (large_send != QETH_LARGE_SEND_NO) { | ||
729 | card->perf_stats.large_send_bytes += tx_bytes; | ||
730 | card->perf_stats.large_send_cnt++; | ||
731 | } | ||
732 | if (skb_shinfo(new_skb)->nr_frags > 0) { | ||
733 | card->perf_stats.sg_skbs_sent++; | ||
734 | /* nr_frags + skb->data */ | ||
735 | card->perf_stats.sg_frags_sent += | ||
736 | skb_shinfo(new_skb)->nr_frags + 1; | ||
737 | } | ||
738 | } | ||
739 | |||
740 | if (ctx != NULL) { | ||
741 | qeth_eddp_put_context(ctx); | ||
742 | dev_kfree_skb_any(new_skb); | ||
743 | } | ||
744 | } else { | 704 | } else { |
745 | if (ctx != NULL) | ||
746 | qeth_eddp_put_context(ctx); | ||
747 | |||
748 | if (data_offset >= 0) | 705 | if (data_offset >= 0) |
749 | kmem_cache_free(qeth_core_header_cache, hdr); | 706 | kmem_cache_free(qeth_core_header_cache, hdr); |
750 | 707 | ||
@@ -881,30 +838,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) | |||
881 | return; | 838 | return; |
882 | } | 839 | } |
883 | 840 | ||
884 | static int qeth_l2_ethtool_set_tso(struct net_device *dev, u32 data) | ||
885 | { | ||
886 | struct qeth_card *card = dev->ml_priv; | ||
887 | |||
888 | if (data) { | ||
889 | if (card->options.large_send == QETH_LARGE_SEND_NO) { | ||
890 | card->options.large_send = QETH_LARGE_SEND_EDDP; | ||
891 | dev->features |= NETIF_F_TSO; | ||
892 | } | ||
893 | } else { | ||
894 | dev->features &= ~NETIF_F_TSO; | ||
895 | card->options.large_send = QETH_LARGE_SEND_NO; | ||
896 | } | ||
897 | return 0; | ||
898 | } | ||
899 | |||
900 | static struct ethtool_ops qeth_l2_ethtool_ops = { | 841 | static struct ethtool_ops qeth_l2_ethtool_ops = { |
901 | .get_link = ethtool_op_get_link, | 842 | .get_link = ethtool_op_get_link, |
902 | .get_tx_csum = ethtool_op_get_tx_csum, | ||
903 | .set_tx_csum = ethtool_op_set_tx_hw_csum, | ||
904 | .get_sg = ethtool_op_get_sg, | ||
905 | .set_sg = ethtool_op_set_sg, | ||
906 | .get_tso = ethtool_op_get_tso, | ||
907 | .set_tso = qeth_l2_ethtool_set_tso, | ||
908 | .get_strings = qeth_core_get_strings, | 843 | .get_strings = qeth_core_get_strings, |
909 | .get_ethtool_stats = qeth_core_get_ethtool_stats, | 844 | .get_ethtool_stats = qeth_core_get_ethtool_stats, |
910 | .get_stats_count = qeth_core_get_stats_count, | 845 | .get_stats_count = qeth_core_get_stats_count, |