aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorLawrence Brakmo <brakmo@fb.com>2016-05-11 10:02:13 -0700
committerDavid S. Miller <davem@davemloft.net>2016-05-11 14:43:19 -0400
commit756ee1729b2feb3a45767da29e338f70f2086ba3 (patch)
tree9329409e197d2912d3fba7e247a57239996c99e9 /include/net/tcp.h
parentMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge (diff)
downloadlinux-dev-756ee1729b2feb3a45767da29e338f70f2086ba3.tar.xz
linux-dev-756ee1729b2feb3a45767da29e338f70f2086ba3.zip
tcp: replace cnt & rtt with struct in pkts_acked()
Replace 2 arguments (cnt and rtt) in the congestion control modules' pkts_acked() function with a struct. This will allow adding more information without having to modify existing congestion control modules (tcp_nv in particular needs bytes in flight when packet was sent). As proposed by Neal Cardwell in his comments to the tcp_nv patch. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 4775a1bba7f7..c9ab561387c4 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -854,6 +854,11 @@ enum tcp_ca_ack_event_flags {
union tcp_cc_info;
+struct ack_sample {
+ u32 pkts_acked;
+ s32 rtt_us;
+};
+
struct tcp_congestion_ops {
struct list_head list;
u32 key;
@@ -877,7 +882,7 @@ struct tcp_congestion_ops {
/* new value of cwnd after loss (optional) */
u32 (*undo_cwnd)(struct sock *sk);
/* hook for packet ack accounting (optional) */
- void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
+ void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample);
/* get info for inet_diag (optional) */
size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
union tcp_cc_info *info);