diff options
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f50f29faf76f..135b70c9a734 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -787,6 +787,8 @@ enum tcp_ca_ack_event_flags { | |||
787 | #define TCP_CA_MAX 128 | 787 | #define TCP_CA_MAX 128 |
788 | #define TCP_CA_BUF_MAX (TCP_CA_NAME_MAX*TCP_CA_MAX) | 788 | #define TCP_CA_BUF_MAX (TCP_CA_NAME_MAX*TCP_CA_MAX) |
789 | 789 | ||
790 | #define TCP_CA_UNSPEC 0 | ||
791 | |||
790 | /* Algorithm can be set on socket without CAP_NET_ADMIN privileges */ | 792 | /* Algorithm can be set on socket without CAP_NET_ADMIN privileges */ |
791 | #define TCP_CONG_NON_RESTRICTED 0x1 | 793 | #define TCP_CONG_NON_RESTRICTED 0x1 |
792 | /* Requires ECN/ECT set on all packets */ | 794 | /* Requires ECN/ECT set on all packets */ |
@@ -794,7 +796,8 @@ enum tcp_ca_ack_event_flags { | |||
794 | 796 | ||
795 | struct tcp_congestion_ops { | 797 | struct tcp_congestion_ops { |
796 | struct list_head list; | 798 | struct list_head list; |
797 | unsigned long flags; | 799 | u32 key; |
800 | u32 flags; | ||
798 | 801 | ||
799 | /* initialize private data (optional) */ | 802 | /* initialize private data (optional) */ |
800 | void (*init)(struct sock *sk); | 803 | void (*init)(struct sock *sk); |
@@ -841,6 +844,10 @@ u32 tcp_reno_ssthresh(struct sock *sk); | |||
841 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked); | 844 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked); |
842 | extern struct tcp_congestion_ops tcp_reno; | 845 | extern struct tcp_congestion_ops tcp_reno; |
843 | 846 | ||
847 | struct tcp_congestion_ops *tcp_ca_find_key(u32 key); | ||
848 | u32 tcp_ca_get_key_by_name(const char *name); | ||
849 | char *tcp_ca_get_name_by_key(u32 key, char *buffer); | ||
850 | |||
844 | static inline bool tcp_ca_needs_ecn(const struct sock *sk) | 851 | static inline bool tcp_ca_needs_ecn(const struct sock *sk) |
845 | { | 852 | { |
846 | const struct inet_connection_sock *icsk = inet_csk(sk); | 853 | const struct inet_connection_sock *icsk = inet_csk(sk); |