aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid2.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/dccp/ccids/ccid2.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'net/dccp/ccids/ccid2.h')
-rw-r--r--net/dccp/ccids/ccid2.h42
1 files changed, 32 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h
index 1ec6a30103bb..e9985dafc2c7 100644
--- a/net/dccp/ccids/ccid2.h
+++ b/net/dccp/ccids/ccid2.h
@@ -18,18 +18,23 @@
18#ifndef _DCCP_CCID2_H_ 18#ifndef _DCCP_CCID2_H_
19#define _DCCP_CCID2_H_ 19#define _DCCP_CCID2_H_
20 20
21#include <linux/dccp.h>
22#include <linux/timer.h> 21#include <linux/timer.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include "../ccid.h" 23#include "../ccid.h"
24#include "../dccp.h"
25
26/*
27 * CCID-2 timestamping faces the same issues as TCP timestamping.
28 * Hence we reuse/share as much of the code as possible.
29 */
30#define ccid2_time_stamp tcp_time_stamp
31
25/* NUMDUPACK parameter from RFC 4341, p. 6 */ 32/* NUMDUPACK parameter from RFC 4341, p. 6 */
26#define NUMDUPACK 3 33#define NUMDUPACK 3
27 34
28struct sock;
29
30struct ccid2_seq { 35struct ccid2_seq {
31 u64 ccid2s_seq; 36 u64 ccid2s_seq;
32 unsigned long ccid2s_sent; 37 u32 ccid2s_sent;
33 int ccid2s_acked; 38 int ccid2s_acked;
34 struct ccid2_seq *ccid2s_prev; 39 struct ccid2_seq *ccid2s_prev;
35 struct ccid2_seq *ccid2s_next; 40 struct ccid2_seq *ccid2s_next;
@@ -42,9 +47,15 @@ struct ccid2_seq {
42 * struct ccid2_hc_tx_sock - CCID2 TX half connection 47 * struct ccid2_hc_tx_sock - CCID2 TX half connection
43 * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 48 * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5
44 * @tx_packets_acked: Ack counter for deriving cwnd growth (RFC 3465) 49 * @tx_packets_acked: Ack counter for deriving cwnd growth (RFC 3465)
45 * @tx_lastrtt: time RTT was last measured 50 * @tx_srtt: smoothed RTT estimate, scaled by 2^3
51 * @tx_mdev: smoothed RTT variation, scaled by 2^2
52 * @tx_mdev_max: maximum of @mdev during one flight
53 * @tx_rttvar: moving average/maximum of @mdev_max
54 * @tx_rto: RTO value deriving from SRTT and RTTVAR (RFC 2988)
55 * @tx_rtt_seq: to decay RTTVAR at most once per flight
46 * @tx_rpseq: last consecutive seqno 56 * @tx_rpseq: last consecutive seqno
47 * @tx_rpdupack: dupacks since rpseq 57 * @tx_rpdupack: dupacks since rpseq
58 * @tx_av_chunks: list of Ack Vectors received on current skb
48 */ 59 */
49struct ccid2_hc_tx_sock { 60struct ccid2_hc_tx_sock {
50 u32 tx_cwnd; 61 u32 tx_cwnd;
@@ -55,17 +66,28 @@ struct ccid2_hc_tx_sock {
55 int tx_seqbufc; 66 int tx_seqbufc;
56 struct ccid2_seq *tx_seqh; 67 struct ccid2_seq *tx_seqh;
57 struct ccid2_seq *tx_seqt; 68 struct ccid2_seq *tx_seqt;
58 long tx_rto; 69
59 long tx_srtt; 70 /* RTT measurement: variables/principles are the same as in TCP */
60 long tx_rttvar; 71 u32 tx_srtt,
61 unsigned long tx_lastrtt; 72 tx_mdev,
73 tx_mdev_max,
74 tx_rttvar,
75 tx_rto;
76 u64 tx_rtt_seq:48;
62 struct timer_list tx_rtotimer; 77 struct timer_list tx_rtotimer;
78
63 u64 tx_rpseq; 79 u64 tx_rpseq;
64 int tx_rpdupack; 80 int tx_rpdupack;
65 unsigned long tx_last_cong; 81 u32 tx_last_cong;
66 u64 tx_high_ack; 82 u64 tx_high_ack;
83 struct list_head tx_av_chunks;
67}; 84};
68 85
86static inline bool ccid2_cwnd_network_limited(struct ccid2_hc_tx_sock *hc)
87{
88 return hc->tx_pipe >= hc->tx_cwnd;
89}
90
69struct ccid2_hc_rx_sock { 91struct ccid2_hc_rx_sock {
70 int rx_data; 92 int rx_data;
71}; 93};