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
nexedi
linux
Commits
46f3dece
Commit
46f3dece
authored
Apr 23, 2004
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Report vegas info via tcp_diag.
parent
7ce42ae1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
include/linux/tcp_diag.h
include/linux/tcp_diag.h
+12
-1
net/ipv4/tcp_diag.c
net/ipv4/tcp_diag.c
+11
-0
No files found.
include/linux/tcp_diag.h
View file @
46f3dece
...
...
@@ -98,9 +98,10 @@ enum
TCPDIAG_NONE
,
TCPDIAG_MEMINFO
,
TCPDIAG_INFO
,
TCPDIAG_VEGASINFO
,
};
#define TCPDIAG_MAX TCPDIAG_INFO
#define TCPDIAG_MAX TCPDIAG_
VEGAS
INFO
/* TCPDIAG_MEM */
...
...
@@ -113,4 +114,14 @@ struct tcpdiag_meminfo
__u32
tcpdiag_tmem
;
};
/* TCPDIAG_VEGASINFO */
struct
tcpvegas_info
{
__u32
tcpv_enabled
;
__u32
tcpv_rttcnt
;
__u32
tcpv_rtt
;
__u32
tcpv_minrtt
;
};
#endif
/* _TCP_DIAG_H_ */
net/ipv4/tcp_diag.c
View file @
46f3dece
...
...
@@ -50,6 +50,7 @@ static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
struct
nlmsghdr
*
nlh
;
struct
tcp_info
*
info
=
NULL
;
struct
tcpdiag_meminfo
*
minfo
=
NULL
;
struct
tcpvegas_info
*
vinfo
=
NULL
;
unsigned
char
*
b
=
skb
->
tail
;
nlh
=
NLMSG_PUT
(
skb
,
pid
,
seq
,
TCPDIAG_GETSOCK
,
sizeof
(
*
r
));
...
...
@@ -59,6 +60,9 @@ static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
minfo
=
TCPDIAG_PUT
(
skb
,
TCPDIAG_MEMINFO
,
sizeof
(
*
minfo
));
if
(
ext
&
(
1
<<
(
TCPDIAG_INFO
-
1
)))
info
=
TCPDIAG_PUT
(
skb
,
TCPDIAG_INFO
,
sizeof
(
*
info
));
if
(
tcp_is_vegas
(
tp
)
&&
(
ext
&
(
1
<<
(
TCPDIAG_VEGASINFO
-
1
))))
vinfo
=
TCPDIAG_PUT
(
skb
,
TCPDIAG_VEGASINFO
,
sizeof
(
*
vinfo
));
}
r
->
tcpdiag_family
=
sk
->
sk_family
;
r
->
tcpdiag_state
=
sk
->
sk_state
;
...
...
@@ -196,6 +200,13 @@ static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,
info
->
tcpi_reordering
=
tp
->
reordering
;
}
if
(
vinfo
)
{
vinfo
->
tcpv_enabled
=
tp
->
vegas
.
doing_vegas_now
;
vinfo
->
tcpv_rttcnt
=
tp
->
vegas
.
cntRTT
;
vinfo
->
tcpv_rtt
=
tp
->
vegas
.
baseRTT
;
vinfo
->
tcpv_minrtt
=
tp
->
vegas
.
minRTT
;
}
nlh
->
nlmsg_len
=
skb
->
tail
-
b
;
return
skb
->
len
;
...
...
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