aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r--net/dccp/ccids/lib/loss_interval.h8
-rw-r--r--net/dccp/ccids/lib/packet_history.h25
-rw-r--r--net/dccp/ccids/lib/tfrc.h22
3 files changed, 26 insertions, 29 deletions
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h
index d1d2f5383b7d..57f631a86ccd 100644
--- a/net/dccp/ccids/lib/loss_interval.h
+++ b/net/dccp/ccids/lib/loss_interval.h
@@ -65,9 +65,9 @@ static inline u8 tfrc_lh_length(struct tfrc_loss_hist *lh)
65 65
66struct tfrc_rx_hist; 66struct tfrc_rx_hist;
67 67
68extern int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, 68int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *,
69 u32 (*first_li)(struct sock *), struct sock *); 69 u32 (*first_li)(struct sock *), struct sock *);
70extern u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); 70u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *);
71extern void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); 71void tfrc_lh_cleanup(struct tfrc_loss_hist *lh);
72 72
73#endif /* _DCCP_LI_HIST_ */ 73#endif /* _DCCP_LI_HIST_ */
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index 7ee4a9d9d335..ee362b0b630d 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -60,8 +60,8 @@ static inline struct tfrc_tx_hist_entry *
60 return head; 60 return head;
61} 61}
62 62
63extern int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); 63int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno);
64extern void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); 64void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp);
65 65
66/* Subtraction a-b modulo-16, respects circular wrap-around */ 66/* Subtraction a-b modulo-16, respects circular wrap-around */
67#define SUB16(a, b) (((a) + 16 - (b)) & 0xF) 67#define SUB16(a, b) (((a) + 16 - (b)) & 0xF)
@@ -139,20 +139,17 @@ static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h)
139 return h->loss_count > 0; 139 return h->loss_count > 0;
140} 140}
141 141
142extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, 142void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, const struct sk_buff *skb,
143 const struct sk_buff *skb, const u64 ndp); 143 const u64 ndp);
144 144
145extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); 145int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb);
146 146
147struct tfrc_loss_hist; 147struct tfrc_loss_hist;
148extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, 148int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, struct tfrc_loss_hist *lh,
149 struct tfrc_loss_hist *lh, 149 struct sk_buff *skb, const u64 ndp,
150 struct sk_buff *skb, const u64 ndp, 150 u32 (*first_li)(struct sock *sk), struct sock *sk);
151 u32 (*first_li)(struct sock *sk), 151u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb);
152 struct sock *sk); 152int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h);
153extern u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, 153void tfrc_rx_hist_purge(struct tfrc_rx_hist *h);
154 const struct sk_buff *skb);
155extern int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h);
156extern void tfrc_rx_hist_purge(struct tfrc_rx_hist *h);
157 154
158#endif /* _DCCP_PKT_HIST_ */ 155#endif /* _DCCP_PKT_HIST_ */
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h
index ed698c42a5fb..40ee7d62b652 100644
--- a/net/dccp/ccids/lib/tfrc.h
+++ b/net/dccp/ccids/lib/tfrc.h
@@ -55,21 +55,21 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight)
55 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; 55 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval;
56} 56}
57 57
58extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); 58u32 tfrc_calc_x(u16 s, u32 R, u32 p);
59extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); 59u32 tfrc_calc_x_reverse_lookup(u32 fvalue);
60extern u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); 60u32 tfrc_invert_loss_event_rate(u32 loss_event_rate);
61 61
62extern int tfrc_tx_packet_history_init(void); 62int tfrc_tx_packet_history_init(void);
63extern void tfrc_tx_packet_history_exit(void); 63void tfrc_tx_packet_history_exit(void);
64extern int tfrc_rx_packet_history_init(void); 64int tfrc_rx_packet_history_init(void);
65extern void tfrc_rx_packet_history_exit(void); 65void tfrc_rx_packet_history_exit(void);
66 66
67extern int tfrc_li_init(void); 67int tfrc_li_init(void);
68extern void tfrc_li_exit(void); 68void tfrc_li_exit(void);
69 69
70#ifdef CONFIG_IP_DCCP_TFRC_LIB 70#ifdef CONFIG_IP_DCCP_TFRC_LIB
71extern int tfrc_lib_init(void); 71int tfrc_lib_init(void);
72extern void tfrc_lib_exit(void); 72void tfrc_lib_exit(void);
73#else 73#else
74#define tfrc_lib_init() (0) 74#define tfrc_lib_init() (0)
75#define tfrc_lib_exit() 75#define tfrc_lib_exit()