Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
05a6b5eb
Commit
05a6b5eb
authored
Oct 20, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Add total num retransmits accounting.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
e42d291d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
include/linux/tcp.h
include/linux/tcp.h
+4
-0
net/ipv4/tcp_diag.c
net/ipv4/tcp_diag.c
+2
-0
net/ipv4/tcp_output.c
net/ipv4/tcp_output.c
+2
-0
No files found.
include/linux/tcp.h
View file @
05a6b5eb
...
...
@@ -186,6 +186,8 @@ struct tcp_info
__u32
tcpi_rcv_rtt
;
__u32
tcpi_rcv_space
;
__u32
tcpi_total_retrans
;
};
#ifdef __KERNEL__
...
...
@@ -364,6 +366,8 @@ struct tcp_opt {
__u8
urg_mode
;
/* In urgent mode */
__u32
snd_up
;
/* Urgent pointer */
__u32
total_retrans
;
/* Total retransmits for entire connection */
/* The syn_wait_lock is necessary only to avoid proc interface having
* to grab the main lock sock while browsing the listening hash
* (otherwise it's deadlock prone).
...
...
net/ipv4/tcp_diag.c
View file @
05a6b5eb
...
...
@@ -105,6 +105,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info
->
tcpi_rcv_rtt
=
jiffies_to_usecs
(
tp
->
rcv_rtt_est
.
rtt
)
>>
3
;
info
->
tcpi_rcv_space
=
tp
->
rcvq_space
.
space
;
info
->
tcpi_total_retrans
=
tp
->
total_retrans
;
}
static
int
tcpdiag_fill
(
struct
sk_buff
*
skb
,
struct
sock
*
sk
,
...
...
net/ipv4/tcp_output.c
View file @
05a6b5eb
...
...
@@ -1106,6 +1106,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
/* Update global TCP statistics. */
TCP_INC_STATS
(
TCP_MIB_RETRANSSEGS
);
tp
->
total_retrans
++
;
#if FASTRETRANS_DEBUG > 0
if
(
TCP_SKB_CB
(
skb
)
->
sacked
&
TCPCB_SACKED_RETRANS
)
{
if
(
net_ratelimit
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment