mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
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>
This commit is contained in:
parent
bdd1f9edac
commit
64f40ff5bb
7 changed files with 46 additions and 34 deletions
|
|
@ -804,6 +804,8 @@ enum tcp_ca_ack_event_flags {
|
|||
/* Requires ECN/ECT set on all packets */
|
||||
#define TCP_CONG_NEEDS_ECN 0x2
|
||||
|
||||
union tcp_cc_info;
|
||||
|
||||
struct tcp_congestion_ops {
|
||||
struct list_head list;
|
||||
u32 key;
|
||||
|
|
@ -829,7 +831,8 @@ struct tcp_congestion_ops {
|
|||
/* hook for packet ack accounting (optional) */
|
||||
void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
|
||||
/* get info for inet_diag (optional) */
|
||||
int (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb);
|
||||
size_t (*get_info)(struct sock *sk, u32 ext, int *attr,
|
||||
union tcp_cc_info *info);
|
||||
|
||||
char name[TCP_CA_NAME_MAX];
|
||||
struct module *owner;
|
||||
|
|
|
|||
Loading…
Reference in a new issue