diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-01 11:36:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-01 17:35:50 -0400 |
commit | 48f2a4e1e83992af6c721c6c93a6b012910e255f (patch) | |
tree | 2e851c6104517988e392bf4a05afb799308e58c3 /drivers/net/ethernet/tile | |
parent | 815d3baeaefa027eb5c3c715575ab71d4eed71ec (diff) |
tile: remove dead is_dup_ack() function from tilepro net driver
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/tile')
-rw-r--r-- | drivers/net/ethernet/tile/tilepro.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c index 2f4b7b9fa5fb..fd17af518451 100644 --- a/drivers/net/ethernet/tile/tilepro.c +++ b/drivers/net/ethernet/tile/tilepro.c | |||
@@ -89,9 +89,6 @@ | |||
89 | /* ISSUE: This has not been thoroughly tested (except at 1500). */ | 89 | /* ISSUE: This has not been thoroughly tested (except at 1500). */ |
90 | #define TILE_NET_MTU 1500 | 90 | #define TILE_NET_MTU 1500 |
91 | 91 | ||
92 | /* Define this to collapse "duplicate" acks. */ | ||
93 | /* #define IGNORE_DUP_ACKS */ | ||
94 | |||
95 | /* HACK: Define this to verify incoming packets. */ | 92 | /* HACK: Define this to verify incoming packets. */ |
96 | /* #define TILE_NET_VERIFY_INGRESS */ | 93 | /* #define TILE_NET_VERIFY_INGRESS */ |
97 | 94 | ||
@@ -625,79 +622,6 @@ static void tile_net_handle_egress_timer(unsigned long arg) | |||
625 | } | 622 | } |
626 | 623 | ||
627 | 624 | ||
628 | #ifdef IGNORE_DUP_ACKS | ||
629 | |||
630 | /* | ||
631 | * Help detect "duplicate" ACKs. These are sequential packets (for a | ||
632 | * given flow) which are exactly 66 bytes long, sharing everything but | ||
633 | * ID=2@0x12, Hsum=2@0x18, Ack=4@0x2a, WinSize=2@0x30, Csum=2@0x32, | ||
634 | * Tstamps=10@0x38. The ID's are +1, the Hsum's are -1, the Ack's are | ||
635 | * +N, and the Tstamps are usually identical. | ||
636 | * | ||
637 | * NOTE: Apparently truly duplicate acks (with identical "ack" values), | ||
638 | * should not be collapsed, as they are used for some kind of flow control. | ||
639 | */ | ||
640 | static bool is_dup_ack(char *s1, char *s2, unsigned int len) | ||
641 | { | ||
642 | int i; | ||
643 | |||
644 | unsigned long long ignorable = 0; | ||
645 | |||
646 | /* Identification. */ | ||
647 | ignorable |= (1ULL << 0x12); | ||
648 | ignorable |= (1ULL << 0x13); | ||
649 | |||
650 | /* Header checksum. */ | ||
651 | ignorable |= (1ULL << 0x18); | ||
652 | ignorable |= (1ULL << 0x19); | ||
653 | |||
654 | /* ACK. */ | ||
655 | ignorable |= (1ULL << 0x2a); | ||
656 | ignorable |= (1ULL << 0x2b); | ||
657 | ignorable |= (1ULL << 0x2c); | ||
658 | ignorable |= (1ULL << 0x2d); | ||
659 | |||
660 | /* WinSize. */ | ||
661 | ignorable |= (1ULL << 0x30); | ||
662 | ignorable |= (1ULL << 0x31); | ||
663 | |||
664 | /* Checksum. */ | ||
665 | ignorable |= (1ULL << 0x32); | ||
666 | ignorable |= (1ULL << 0x33); | ||
667 | |||
668 | for (i = 0; i < len; i++, ignorable >>= 1) { | ||
669 | |||
670 | if ((ignorable & 1) || (s1[i] == s2[i])) | ||
671 | continue; | ||
672 | |||
673 | #ifdef TILE_NET_DEBUG | ||
674 | /* HACK: Mention non-timestamp diffs. */ | ||
675 | if (i < 0x38 && i != 0x2f && | ||
676 | net_ratelimit()) | ||
677 | pr_info("Diff at 0x%x\n", i); | ||
678 | #endif | ||
679 | |||
680 | return false; | ||
681 | } | ||
682 | |||
683 | #ifdef TILE_NET_NO_SUPPRESS_DUP_ACKS | ||
684 | /* HACK: Do not suppress truly duplicate ACKs. */ | ||
685 | /* ISSUE: Is this actually necessary or helpful? */ | ||
686 | if (s1[0x2a] == s2[0x2a] && | ||
687 | s1[0x2b] == s2[0x2b] && | ||
688 | s1[0x2c] == s2[0x2c] && | ||
689 | s1[0x2d] == s2[0x2d]) { | ||
690 | return false; | ||
691 | } | ||
692 | #endif | ||
693 | |||
694 | return true; | ||
695 | } | ||
696 | |||
697 | #endif | ||
698 | |||
699 | |||
700 | |||
701 | static void tile_net_discard_aux(struct tile_net_cpu *info, int index) | 625 | static void tile_net_discard_aux(struct tile_net_cpu *info, int index) |
702 | { | 626 | { |
703 | struct tile_netio_queue *queue = &info->queue; | 627 | struct tile_netio_queue *queue = &info->queue; |