aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/snmp_counter.rst12
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
415TCP Fast Path 415TCP Fast Path
416============ 416=============
417When kernel receives a TCP packet, it has two paths to handler the 417When kernel receives a TCP packet, it has two paths to handler the
418packet, one is fast path, another is slow path. The comment in kernel 418packet, one is fast path, another is slow path. The comment in kernel
419code provides a good explanation of them, I pasted them below:: 419code 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
681DSACK to the sender. 681DSACK to the sender.
682 682
683* TcpExtTCPDSACKRecv 683* TcpExtTCPDSACKRecv
684
684The TCP stack receives a DSACK, which indicates an acknowledged 685The TCP stack receives a DSACK, which indicates an acknowledged
685duplicate packet is received. 686duplicate packet is received.
686 687
@@ -690,7 +691,7 @@ The TCP stack receives a DSACK, which indicate an out of order
690duplicate packet is received. 691duplicate packet is received.
691 692
692invalid SACK and DSACK 693invalid SACK and DSACK
693==================== 694======================
694When a SACK (or DSACK) block is invalid, a corresponding counter would 695When a SACK (or DSACK) block is invalid, a corresponding counter would
695be updated. The validation method is base on the start/end sequence 696be updated. The validation method is base on the start/end sequence
696number of the SACK block. For more details, please refer the comment 697number 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
707This counter indicates how many SACK blocks are invalid. If the invalid 709This counter indicates how many SACK blocks are invalid. If the invalid
708SACK block is caused by ACK recording, the TCP stack will only ignore 710SACK block is caused by ACK recording, the TCP stack will only ignore
709it and won't update this counter. 711it and won't update this counter.
710 712
711* TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo 713* TcpExtTCPDSACKIgnoredOld and TcpExtTCPDSACKIgnoredNoUndo
714
712When a DSACK block is invalid, one of these two counters would be 715When a DSACK block is invalid, one of these two counters would be
713updated. Which counter will be updated depends on the undo_marker flag 716updated. Which counter will be updated depends on the undo_marker flag
714of the TCP socket. If the undo_marker is not set, the TCP stack isn't 717of 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
719will be updated. As implied in its name, it might be an old packet. 722will be updated. As implied in its name, it might be an old packet.
720 723
721SACK shift 724SACK shift
722========= 725==========
723The linux networking stack stores data in sk_buff struct (skb for 726The linux networking stack stores data in sk_buff struct (skb for
724short). If a SACK block acrosses multiple skb, the TCP stack will try 727short). If a SACK block acrosses multiple skb, the TCP stack will try
725to re-arrange data in these skb. E.g. if a SACK block acknowledges seq 728to 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
730discard, this operation is 'merge'. 733discard, this operation is 'merge'.
731 734
732* TcpExtTCPSackShifted 735* TcpExtTCPSackShifted
736
733A skb is shifted 737A skb is shifted
734 738
735* TcpExtTCPSackMerged 739* TcpExtTCPSackMerged
740
736A skb is merged 741A skb is merged
737 742
738* TcpExtTCPSackShiftFallback 743* TcpExtTCPSackShiftFallback
744
739A skb should be shifted or merged, but the TCP stack doesn't do it for 745A skb should be shifted or merged, but the TCP stack doesn't do it for
740some reasons. 746some reasons.
741 747