diff options
author | Eric Dumazet <edumazet@google.com> | 2015-04-28 19:23:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-29 17:10:38 -0400 |
commit | 64f40ff5bbdb1b679fb3c4dbc8230d6517d2b8dc (patch) | |
tree | 4767b2030e5099a7a63c05c42a7d30c309d62474 /include/net | |
parent | bdd1f9edacb5f5835d1e6276571bbbe5b88ded48 (diff) |
tcp: prepare CC get_info() access from getsockopt()
We would like that optional info provided by Congestion Control
modules using netlink can also be read using getsockopt()
This patch changes get_info() to put this information in a buffer,
instead of skb, like tcp_get_info(), so that following patch
can reuse this common infrastructure.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tcp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index dd7b4ea6a10c..6d204f3f9df8 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags { | |||
804 | /* Requires ECN/ECT set on all packets */ | 804 | /* Requires ECN/ECT set on all packets */ |
805 | #define TCP_CONG_NEEDS_ECN 0x2 | 805 | #define TCP_CONG_NEEDS_ECN 0x2 |
806 | 806 | ||
807 | union tcp_cc_info; | ||
808 | |||
807 | struct tcp_congestion_ops { | 809 | struct tcp_congestion_ops { |
808 | struct list_head list; | 810 | struct list_head list; |
809 | u32 key; | 811 | u32 key; |
@@ -829,7 +831,8 @@ struct tcp_congestion_ops { | |||
829 | /* hook for packet ack accounting (optional) */ | 831 | /* hook for packet ack accounting (optional) */ |
830 | void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); | 832 | void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); |
831 | /* get info for inet_diag (optional) */ | 833 | /* get info for inet_diag (optional) */ |
832 | int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); | 834 | size_t (*get_info)(struct sock *sk, u32 ext, int *attr, |
835 | union tcp_cc_info *info); | ||
833 | 836 | ||
834 | char name[TCP_CA_NAME_MAX]; | 837 | char name[TCP_CA_NAME_MAX]; |
835 | struct module *owner; | 838 | struct module *owner; |