diff options
-rw-r--r-- | Documentation/networking/snmp_counter.rst | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/networking/snmp_counter.rst b/Documentation/networking/snmp_counter.rst index 52b026be028f..38a4edc4522b 100644 --- a/Documentation/networking/snmp_counter.rst +++ b/Documentation/networking/snmp_counter.rst | |||
@@ -413,7 +413,7 @@ algorithm. | |||
413 | .. _F-RTO: https://tools.ietf.org/html/rfc5682 | 413 | .. _F-RTO: https://tools.ietf.org/html/rfc5682 |
414 | 414 | ||
415 | TCP Fast Path | 415 | TCP Fast Path |
416 | ============ | 416 | ============= |
417 | When kernel receives a TCP packet, it has two paths to handler the | 417 | When kernel receives a TCP packet, it has two paths to handler the |
418 | packet, one is fast path, another is slow path. The comment in kernel | 418 | packet, one is fast path, another is slow path. The comment in kernel |
419 | code provides a good explanation of them, I pasted them below:: | 419 | code provides a good explanation of them, I pasted them below:: |
@@ -681,6 +681,7 @@ The TCP stack receives an out of order duplicate packet, so it sends a | |||
681 | DSACK to the sender. | 681 | DSACK to the sender. |
682 | 682 | ||
683 | * TcpExtTCPDSACKRecv | 683 | * TcpExtTCPDSACKRecv |
684 | |||
684 | The TCP stack receives a DSACK, which indicates an acknowledged | 685 | The TCP stack receives a DSACK, which indicates an acknowledged |
685 | duplicate packet is received. | 686 | duplicate packet is received. |
686 | 687 | ||
@@ -690,7 +691,7 @@ The TCP stack receives a DSACK, which indicate an out of order | |||
690 | duplicate packet is received. | 691 | duplicate packet is received. |
691 | 692 | ||
692 | invalid SACK and DSACK | 693 | invalid SACK and DSACK |
693 | ==================== | 694 | ====================== |
694 | When a SACK (or DSACK) block is invalid, a corresponding counter would | 695 | When a SACK (or DSACK) block is invalid, a corresponding counter would |
695 | be updated. The validation method is base on the start/end sequence | 696 | be updated. The validation method is base on the start/end sequence |
696 | number of the SACK block. For more details, please refer the comment | 697 | number of the SACK block. For more details, please refer the comment |
@@ -704,11 +705,13 @@ explaination: | |||
704 | .. _Add counters for discarded SACK blocks: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18f02545a9a16c9a89778b91a162ad16d510bb32 | 705 | .. _Add counters for discarded SACK blocks: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=18f02545a9a16c9a89778b91a162ad16d510bb32 |
705 | 706 | ||
706 | * TcpExtTCPSACKDiscard | 707 | * TcpExtTCPSACKDiscard |
708 | |||
707 | This counter indicates how many SACK blocks are invalid. If the invalid | 709 | This counter indicates how many SACK blocks are invalid. If the invalid |
708 | SACK block is caused by ACK recording, the TCP stack will only ignore | 710 | SACK block is caused by ACK recording, the TCP stack will only ignore |
709 | it and won't update this counter. | 711 | it and won't update this counter. |
710 | 712 | ||
711 | * TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo | 713 | * TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo |
714 | |||
712 | When a DSACK block is invalid, one of these two counters would be | 715 | When a DSACK block is invalid, one of these two counters would be |
713 | updated. Which counter will be updated depends on the undo_marker flag | 716 | updated. Which counter will be updated depends on the undo_marker flag |
714 | of the TCP socket. If the undo_marker is not set, the TCP stack isn't | 717 | of the TCP socket. If the undo_marker is not set, the TCP stack isn't |
@@ -719,7 +722,7 @@ will be updated. If the undo_marker is set, TcpExtTCPDSACKIgnoredOld | |||
719 | will be updated. As implied in its name, it might be an old packet. | 722 | will be updated. As implied in its name, it might be an old packet. |
720 | 723 | ||
721 | SACK shift | 724 | SACK shift |
722 | ========= | 725 | ========== |
723 | The linux networking stack stores data in sk_buff struct (skb for | 726 | The linux networking stack stores data in sk_buff struct (skb for |
724 | short). If a SACK block acrosses multiple skb, the TCP stack will try | 727 | short). If a SACK block acrosses multiple skb, the TCP stack will try |
725 | to re-arrange data in these skb. E.g. if a SACK block acknowledges seq | 728 | to re-arrange data in these skb. E.g. if a SACK block acknowledges seq |
@@ -730,12 +733,15 @@ seq 14 to 20. All data in skb2 will be moved to skb1, and skb2 will be | |||
730 | discard, this operation is 'merge'. | 733 | discard, this operation is 'merge'. |
731 | 734 | ||
732 | * TcpExtTCPSackShifted | 735 | * TcpExtTCPSackShifted |
736 | |||
733 | A skb is shifted | 737 | A skb is shifted |
734 | 738 | ||
735 | * TcpExtTCPSackMerged | 739 | * TcpExtTCPSackMerged |
740 | |||
736 | A skb is merged | 741 | A skb is merged |
737 | 742 | ||
738 | * TcpExtTCPSackShiftFallback | 743 | * TcpExtTCPSackShiftFallback |
744 | |||
739 | A skb should be shifted or merged, but the TCP stack doesn't do it for | 745 | A skb should be shifted or merged, but the TCP stack doesn't do it for |
740 | some reasons. | 746 | some reasons. |
741 | 747 | ||