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
424be00c
Commit
424be00c
authored
Apr 21, 2004
by
Stephen Hemminger
Committed by
David S. Miller
Apr 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Add sysctl to turn off matrics caching.
parent
719c06b8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
include/linux/sysctl.h
include/linux/sysctl.h
+1
-0
include/net/tcp.h
include/net/tcp.h
+1
-0
net/ipv4/sysctl_net_ipv4.c
net/ipv4/sysctl_net_ipv4.c
+9
-0
net/ipv4/tcp_input.c
net/ipv4/tcp_input.c
+4
-0
No files found.
include/linux/sysctl.h
View file @
424be00c
...
@@ -326,6 +326,7 @@ enum
...
@@ -326,6 +326,7 @@ enum
NET_IPV4_IPFRAG_SECRET_INTERVAL
=
94
,
NET_IPV4_IPFRAG_SECRET_INTERVAL
=
94
,
NET_TCP_WESTWOOD
=
95
,
NET_TCP_WESTWOOD
=
95
,
NET_IPV4_IGMP_MAX_MSF
=
96
,
NET_IPV4_IGMP_MAX_MSF
=
96
,
NET_TCP_NO_METRICS_SAVE
=
97
,
};
};
enum
{
enum
{
...
...
include/net/tcp.h
View file @
424be00c
...
@@ -583,6 +583,7 @@ extern int sysctl_tcp_tw_reuse;
...
@@ -583,6 +583,7 @@ extern int sysctl_tcp_tw_reuse;
extern
int
sysctl_tcp_frto
;
extern
int
sysctl_tcp_frto
;
extern
int
sysctl_tcp_low_latency
;
extern
int
sysctl_tcp_low_latency
;
extern
int
sysctl_tcp_westwood
;
extern
int
sysctl_tcp_westwood
;
extern
int
sysctl_tcp_nometrics_save
;
extern
atomic_t
tcp_memory_allocated
;
extern
atomic_t
tcp_memory_allocated
;
extern
atomic_t
tcp_sockets_allocated
;
extern
atomic_t
tcp_sockets_allocated
;
...
...
net/ipv4/sysctl_net_ipv4.c
View file @
424be00c
...
@@ -593,6 +593,14 @@ ctl_table ipv4_table[] = {
...
@@ -593,6 +593,14 @@ ctl_table ipv4_table[] = {
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
.
strategy
=
&
sysctl_jiffies
},
},
{
.
ctl_name
=
NET_TCP_NO_METRICS_SAVE
,
.
procname
=
"tcp_no_metrics_save"
,
.
data
=
&
sysctl_tcp_nometrics_save
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
{
.
ctl_name
=
NET_TCP_WESTWOOD
,
.
ctl_name
=
NET_TCP_WESTWOOD
,
.
procname
=
"tcp_westwood"
,
.
procname
=
"tcp_westwood"
,
...
@@ -601,6 +609,7 @@ ctl_table ipv4_table[] = {
...
@@ -601,6 +609,7 @@ ctl_table ipv4_table[] = {
.
mode
=
0644
,
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
.
proc_handler
=
&
proc_dointvec
,
},
},
{
.
ctl_name
=
0
}
{
.
ctl_name
=
0
}
};
};
...
...
net/ipv4/tcp_input.c
View file @
424be00c
...
@@ -87,6 +87,7 @@ int sysctl_tcp_rfc1337;
...
@@ -87,6 +87,7 @@ int sysctl_tcp_rfc1337;
int
sysctl_tcp_max_orphans
=
NR_FILE
;
int
sysctl_tcp_max_orphans
=
NR_FILE
;
int
sysctl_tcp_frto
;
int
sysctl_tcp_frto
;
int
sysctl_tcp_westwood
;
int
sysctl_tcp_westwood
;
int
sysctl_tcp_nometrics_save
;
#define FLAG_DATA 0x01
/* Incoming frame contained data. */
#define FLAG_DATA 0x01
/* Incoming frame contained data. */
#define FLAG_WIN_UPDATE 0x02
/* Incoming ACK was a window update. */
#define FLAG_WIN_UPDATE 0x02
/* Incoming ACK was a window update. */
...
@@ -518,6 +519,9 @@ void tcp_update_metrics(struct sock *sk)
...
@@ -518,6 +519,9 @@ void tcp_update_metrics(struct sock *sk)
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
struct
dst_entry
*
dst
=
__sk_dst_get
(
sk
);
struct
dst_entry
*
dst
=
__sk_dst_get
(
sk
);
if
(
sysctl_tcp_nometrics_save
)
return
;
dst_confirm
(
dst
);
dst_confirm
(
dst
);
if
(
dst
&&
(
dst
->
flags
&
DST_HOST
))
{
if
(
dst
&&
(
dst
->
flags
&
DST_HOST
))
{
...
...
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