Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
1d8674ed
Commit
1d8674ed
authored
Sep 09, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
parents
d99901d6
cb7b593c
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
557 additions
and
555 deletions
+557
-555
include/linux/dccp.h
include/linux/dccp.h
+3
-0
net/dccp/ccids/ccid3.c
net/dccp/ccids/ccid3.c
+89
-74
net/dccp/ccids/ccid3.h
net/dccp/ccids/ccid3.h
+9
-5
net/dccp/ccids/lib/packet_history.h
net/dccp/ccids/lib/packet_history.h
+2
-1
net/dccp/dccp.h
net/dccp/dccp.h
+4
-12
net/dccp/input.c
net/dccp/input.c
+2
-2
net/dccp/ipv4.c
net/dccp/ipv4.c
+1
-0
net/dccp/minisocks.c
net/dccp/minisocks.c
+1
-0
net/dccp/options.c
net/dccp/options.c
+61
-29
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+0
-13
net/ipv4/fib_trie.c
net/ipv4/fib_trie.c
+385
-419
No files found.
include/linux/dccp.h
View file @
1d8674ed
...
...
@@ -432,7 +432,10 @@ struct dccp_sock {
struct
ccid
*
dccps_hc_rx_ccid
;
struct
ccid
*
dccps_hc_tx_ccid
;
struct
dccp_options_received
dccps_options_received
;
struct
timeval
dccps_epoch
;
enum
dccp_role
dccps_role
:
2
;
__u8
dccps_hc_rx_insert_options
:
1
;
__u8
dccps_hc_tx_insert_options
:
1
;
};
static
inline
struct
dccp_sock
*
dccp_sk
(
const
struct
sock
*
sk
)
...
...
net/dccp/ccids/ccid3.c
View file @
1d8674ed
This diff is collapsed.
Click to expand it.
net/dccp/ccids/ccid3.h
View file @
1d8674ed
...
...
@@ -115,7 +115,7 @@ struct ccid3_hc_rx_sock {
u64
ccid3hcrx_seqno_last_counter
:
48
,
ccid3hcrx_state:
8
,
ccid3hcrx_last_counter:
4
;
u
nsigned
long
ccid3hcrx_rtt
;
u
32
ccid3hcrx_rtt
;
u32
ccid3hcrx_p
;
u32
ccid3hcrx_bytes_recv
;
struct
timeval
ccid3hcrx_tstamp_last_feedback
;
...
...
@@ -128,10 +128,14 @@ struct ccid3_hc_rx_sock {
u32
ccid3hcrx_x_recv
;
};
#define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \
((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field)
static
inline
struct
ccid3_hc_tx_sock
*
ccid3_hc_tx_sk
(
const
struct
sock
*
sk
)
{
return
dccp_sk
(
sk
)
->
dccps_hc_tx_ccid_private
;
}
#define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \
((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field)
static
inline
struct
ccid3_hc_rx_sock
*
ccid3_hc_rx_sk
(
const
struct
sock
*
sk
)
{
return
dccp_sk
(
sk
)
->
dccps_hc_rx_ccid_private
;
}
#endif
/* _DCCP_CCID3_H_ */
net/dccp/ccids/lib/packet_history.h
View file @
1d8674ed
...
...
@@ -134,6 +134,7 @@ static inline struct dccp_tx_hist_entry *
static
inline
struct
dccp_rx_hist_entry
*
dccp_rx_hist_entry_new
(
struct
dccp_rx_hist
*
hist
,
const
struct
sock
*
sk
,
const
u32
ndp
,
const
struct
sk_buff
*
skb
,
const
unsigned
int
__nocast
prio
)
...
...
@@ -148,7 +149,7 @@ static inline struct dccp_rx_hist_entry *
entry
->
dccphrx_ccval
=
dh
->
dccph_ccval
;
entry
->
dccphrx_type
=
dh
->
dccph_type
;
entry
->
dccphrx_ndp
=
ndp
;
d
o_gettimeofday
(
&
(
entry
->
dccphrx_tstamp
)
);
d
ccp_timestamp
(
sk
,
&
entry
->
dccphrx_tstamp
);
}
return
entry
;
...
...
net/dccp/dccp.h
View file @
1d8674ed
...
...
@@ -426,10 +426,13 @@ extern struct dccp_ackpkts *
dccp_ackpkts_alloc
(
unsigned
int
len
,
const
unsigned
int
__nocast
priority
);
extern
void
dccp_ackpkts_free
(
struct
dccp_ackpkts
*
ap
);
extern
int
dccp_ackpkts_add
(
struct
dccp_ackpkts
*
ap
,
u64
ackno
,
u8
state
);
extern
int
dccp_ackpkts_add
(
struct
dccp_ackpkts
*
ap
,
const
struct
sock
*
sk
,
u64
ackno
,
u8
state
);
extern
void
dccp_ackpkts_check_rcv_ackno
(
struct
dccp_ackpkts
*
ap
,
struct
sock
*
sk
,
u64
ackno
);
extern
void
dccp_timestamp
(
const
struct
sock
*
sk
,
struct
timeval
*
tv
);
static
inline
suseconds_t
timeval_usecs
(
const
struct
timeval
*
tv
)
{
return
tv
->
tv_sec
*
USEC_PER_SEC
+
tv
->
tv_usec
;
...
...
@@ -468,17 +471,6 @@ static inline void timeval_sub_usecs(struct timeval *tv,
}
}
/*
* Returns the difference in usecs between timeval
* passed in and current time
*/
static
inline
suseconds_t
timeval_now_delta
(
const
struct
timeval
*
tv
)
{
struct
timeval
now
;
do_gettimeofday
(
&
now
);
return
timeval_delta
(
&
now
,
tv
);
}
#ifdef CONFIG_IP_DCCP_DEBUG
extern
void
dccp_ackvector_print
(
const
u64
ackno
,
const
unsigned
char
*
vector
,
int
len
);
...
...
net/dccp/input.c
View file @
1d8674ed
...
...
@@ -170,7 +170,7 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
if
(
dp
->
dccps_options
.
dccpo_send_ack_vector
)
{
struct
dccp_ackpkts
*
ap
=
dp
->
dccps_hc_rx_ackpkts
;
if
(
dccp_ackpkts_add
(
dp
->
dccps_hc_rx_ackpkts
,
if
(
dccp_ackpkts_add
(
dp
->
dccps_hc_rx_ackpkts
,
sk
,
DCCP_SKB_CB
(
skb
)
->
dccpd_seq
,
DCCP_ACKPKTS_STATE_RECEIVED
))
{
LIMIT_NETDEBUG
(
KERN_WARNING
"DCCP: acknowledgeable "
...
...
@@ -498,7 +498,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
* DCCP_ACKPKTS_STATE_ECN_MARKED
*/
if
(
dp
->
dccps_options
.
dccpo_send_ack_vector
)
{
if
(
dccp_ackpkts_add
(
dp
->
dccps_hc_rx_ackpkts
,
if
(
dccp_ackpkts_add
(
dp
->
dccps_hc_rx_ackpkts
,
sk
,
DCCP_SKB_CB
(
skb
)
->
dccpd_seq
,
DCCP_ACKPKTS_STATE_RECEIVED
))
goto
discard
;
...
...
net/dccp/ipv4.c
View file @
1d8674ed
...
...
@@ -1243,6 +1243,7 @@ static int dccp_v4_init_sock(struct sock *sk)
static
int
dccp_ctl_socket_init
=
1
;
dccp_options_init
(
&
dp
->
dccps_options
);
do_gettimeofday
(
&
dp
->
dccps_epoch
);
if
(
dp
->
dccps_options
.
dccpo_send_ack_vector
)
{
dp
->
dccps_hc_rx_ackpkts
=
...
...
net/dccp/minisocks.c
View file @
1d8674ed
...
...
@@ -96,6 +96,7 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
newdp
->
dccps_hc_rx_ackpkts
=
NULL
;
newdp
->
dccps_role
=
DCCP_ROLE_SERVER
;
newicsk
->
icsk_rto
=
DCCP_TIMEOUT_INIT
;
do_gettimeofday
(
&
newdp
->
dccps_epoch
);
if
(
newdp
->
dccps_options
.
dccpo_send_ack_vector
)
{
newdp
->
dccps_hc_rx_ackpkts
=
...
...
net/dccp/options.c
View file @
1d8674ed
...
...
@@ -72,6 +72,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
struct
dccp_options_received
*
opt_recv
=
&
dp
->
dccps_options_received
;
unsigned
char
opt
,
len
;
unsigned
char
*
value
;
u32
elapsed_time
;
memset
(
opt_recv
,
0
,
sizeof
(
*
opt_recv
));
...
...
@@ -139,7 +140,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
opt_recv
->
dccpor_timestamp
=
ntohl
(
*
(
u32
*
)
value
);
dp
->
dccps_timestamp_echo
=
opt_recv
->
dccpor_timestamp
;
d
o_gettimeofday
(
&
dp
->
dccps_timestamp_time
);
d
ccp_timestamp
(
sk
,
&
dp
->
dccps_timestamp_time
);
dccp_pr_debug
(
"%sTIMESTAMP=%u, ackno=%llu
\n
"
,
debug_prefix
,
opt_recv
->
dccpor_timestamp
,
...
...
@@ -159,18 +160,18 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
(
unsigned
long
long
)
DCCP_SKB_CB
(
skb
)
->
dccpd_ack_seq
);
if
(
len
>
4
)
{
if
(
len
==
4
)
break
;
if
(
len
==
6
)
opt_recv
->
dccpor_elapsed_time
=
ntohs
(
*
(
u16
*
)(
value
+
4
));
elapsed_time
=
ntohs
(
*
(
u16
*
)(
value
+
4
));
else
opt_recv
->
dccpor_elapsed_time
=
ntohl
(
*
(
u32
*
)(
value
+
4
));
elapsed_time
=
ntohl
(
*
(
u32
*
)(
value
+
4
));
dccp_pr_debug
(
"%sTIMESTAMP_ECHO ELAPSED_TIME=%d
\n
"
,
debug_prefix
,
opt_recv
->
dccpor_elapsed_time
);
}
/* Give precedence to the biggest ELAPSED_TIME */
if
(
elapsed_time
>
opt_recv
->
dccpor_elapsed_time
)
opt_recv
->
dccpor_elapsed_time
=
elapsed_time
;
break
;
case
DCCPO_ELAPSED_TIME
:
if
(
len
!=
2
&&
len
!=
4
)
...
...
@@ -180,14 +181,15 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
continue
;
if
(
len
==
2
)
opt_recv
->
dccpor_elapsed_time
=
ntohs
(
*
(
u16
*
)
value
);
elapsed_time
=
ntohs
(
*
(
u16
*
)
value
);
else
opt_recv
->
dccpor_elapsed_time
=
ntohl
(
*
(
u32
*
)
value
);
elapsed_time
=
ntohl
(
*
(
u32
*
)
value
);
if
(
elapsed_time
>
opt_recv
->
dccpor_elapsed_time
)
opt_recv
->
dccpor_elapsed_time
=
elapsed_time
;
dccp_pr_debug
(
"%sELAPSED_TIME=%d
\n
"
,
debug_prefix
,
opt_recv
->
dccpor_
elapsed_time
);
elapsed_time
);
break
;
/*
* From draft-ietf-dccp-spec-11.txt:
...
...
@@ -359,9 +361,13 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb)
#endif
struct
dccp_ackpkts
*
ap
=
dp
->
dccps_hc_rx_ackpkts
;
int
len
=
ap
->
dccpap_buf_vector_len
+
2
;
const
u32
elapsed_time
=
timeval_now_delta
(
&
ap
->
dccpap_time
)
/
10
;
struct
timeval
now
;
u32
elapsed_time
;
unsigned
char
*
to
,
*
from
;
dccp_timestamp
(
sk
,
&
now
);
elapsed_time
=
timeval_delta
(
&
now
,
&
ap
->
dccpap_time
)
/
10
;
if
(
elapsed_time
!=
0
)
dccp_insert_option_elapsed_time
(
sk
,
skb
,
elapsed_time
);
...
...
@@ -426,13 +432,29 @@ static void dccp_insert_option_ack_vector(struct sock *sk, struct sk_buff *skb)
(
unsigned
long
long
)
ap
->
dccpap_ack_ackno
);
}
void
dccp_timestamp
(
const
struct
sock
*
sk
,
struct
timeval
*
tv
)
{
const
struct
dccp_sock
*
dp
=
dccp_sk
(
sk
);
do_gettimeofday
(
tv
);
tv
->
tv_sec
-=
dp
->
dccps_epoch
.
tv_sec
;
tv
->
tv_usec
-=
dp
->
dccps_epoch
.
tv_usec
;
while
(
tv
->
tv_usec
<
0
)
{
tv
->
tv_sec
--
;
tv
->
tv_usec
+=
USEC_PER_SEC
;
}
}
EXPORT_SYMBOL_GPL
(
dccp_timestamp
);
void
dccp_insert_option_timestamp
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
timeval
tv
;
u32
now
;
d
o_gettimeofday
(
&
tv
);
now
=
(
tv
.
tv_sec
*
USEC_PER_SEC
+
tv
.
tv_usec
)
/
10
;
d
ccp_timestamp
(
sk
,
&
tv
);
now
=
timeval_usecs
(
&
tv
)
/
10
;
/* yes this will overflow but that is the point as we want a
* 10 usec 32 bit timer which mean it wraps every 11.9 hours */
...
...
@@ -450,13 +472,17 @@ static void dccp_insert_option_timestamp_echo(struct sock *sk,
const
char
*
debug_prefix
=
dp
->
dccps_role
==
DCCP_ROLE_CLIENT
?
"CLIENT TX opt: "
:
"server TX opt: "
;
#endif
struct
timeval
now
;
u32
tstamp_echo
;
const
u32
elapsed_time
=
timeval_now_delta
(
&
dp
->
dccps_timestamp_time
)
/
10
;
const
int
elapsed_time_len
=
dccp_elapsed_time_len
(
elapsed_time
);
const
int
len
=
6
+
elapsed_time_len
;
u32
elapsed_time
;
int
len
,
elapsed_time_len
;
unsigned
char
*
to
;
dccp_timestamp
(
sk
,
&
now
);
elapsed_time
=
timeval_delta
(
&
now
,
&
dp
->
dccps_timestamp_time
)
/
10
;
elapsed_time_len
=
dccp_elapsed_time_len
(
elapsed_time
);
len
=
6
+
elapsed_time_len
;
if
(
DCCP_SKB_CB
(
skb
)
->
dccpd_opt_len
+
len
>
DCCP_MAX_OPT_LEN
)
{
LIMIT_NETDEBUG
(
KERN_INFO
"DCCP: packet too small to insert "
"timestamp echo!
\n
"
);
...
...
@@ -505,13 +531,18 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb)
(
dp
->
dccps_hc_rx_ackpkts
->
dccpap_buf_ackno
!=
DCCP_MAX_SEQNO
+
1
))
dccp_insert_option_ack_vector
(
sk
,
skb
);
if
(
dp
->
dccps_timestamp_echo
!=
0
)
dccp_insert_option_timestamp_echo
(
sk
,
skb
);
}
if
(
dp
->
dccps_hc_rx_insert_options
)
{
ccid_hc_rx_insert_options
(
dp
->
dccps_hc_rx_ccid
,
sk
,
skb
);
dp
->
dccps_hc_rx_insert_options
=
0
;
}
if
(
dp
->
dccps_hc_tx_insert_options
)
{
ccid_hc_tx_insert_options
(
dp
->
dccps_hc_tx_ccid
,
sk
,
skb
);
dp
->
dccps_hc_tx_insert_options
=
0
;
}
/* XXX: insert other options when appropriate */
...
...
@@ -616,7 +647,8 @@ static inline int dccp_ackpkts_set_buf_head_state(struct dccp_ackpkts *ap,
/*
* Implements the draft-ietf-dccp-spec-11.txt Appendix A
*/
int
dccp_ackpkts_add
(
struct
dccp_ackpkts
*
ap
,
u64
ackno
,
u8
state
)
int
dccp_ackpkts_add
(
struct
dccp_ackpkts
*
ap
,
const
struct
sock
*
sk
,
u64
ackno
,
u8
state
)
{
/*
* Check at the right places if the buffer is full, if it is, tell the
...
...
@@ -697,7 +729,7 @@ int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state)
}
ap
->
dccpap_buf_ackno
=
ackno
;
d
o_gettimeofday
(
&
ap
->
dccpap_time
);
d
ccp_timestamp
(
sk
,
&
ap
->
dccpap_time
);
out:
dccp_pr_debug
(
""
);
dccp_ackpkts_print
(
ap
);
...
...
net/ipv4/af_inet.c
View file @
1d8674ed
...
...
@@ -1248,11 +1248,6 @@ module_init(inet_init);
/* ------------------------------------------------------------------------ */
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_IP_FIB_TRIE
extern
int
fib_stat_proc_init
(
void
);
extern
void
fib_stat_proc_exit
(
void
);
#endif
static
int
__init
ipv4_proc_init
(
void
)
{
int
rc
=
0
;
...
...
@@ -1265,19 +1260,11 @@ static int __init ipv4_proc_init(void)
goto
out_udp
;
if
(
fib_proc_init
())
goto
out_fib
;
#ifdef CONFIG_IP_FIB_TRIE
if
(
fib_stat_proc_init
())
goto
out_fib_stat
;
#endif
if
(
ip_misc_proc_init
())
goto
out_misc
;
out:
return
rc
;
out_misc:
#ifdef CONFIG_IP_FIB_TRIE
fib_stat_proc_exit
();
out_fib_stat:
#endif
fib_proc_exit
();
out_fib:
udp4_proc_exit
();
...
...
net/ipv4/fib_trie.c
View file @
1d8674ed
This diff is collapsed.
Click to expand it.
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