diff options
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r-- | net/ipv4/tcp_cong.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 67bab75f441f..272a84593c85 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org> | 6 | * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define pr_fmt(fmt) "TCP: " fmt | ||
10 | |||
9 | #include <linux/module.h> | 11 | #include <linux/module.h> |
10 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
11 | #include <linux/types.h> | 13 | #include <linux/types.h> |
@@ -41,17 +43,17 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca) | |||
41 | 43 | ||
42 | /* all algorithms must implement ssthresh and cong_avoid ops */ | 44 | /* all algorithms must implement ssthresh and cong_avoid ops */ |
43 | if (!ca->ssthresh || !ca->cong_avoid) { | 45 | if (!ca->ssthresh || !ca->cong_avoid) { |
44 | pr_err("TCP %s does not implement required ops\n", ca->name); | 46 | pr_err("%s does not implement required ops\n", ca->name); |
45 | return -EINVAL; | 47 | return -EINVAL; |
46 | } | 48 | } |
47 | 49 | ||
48 | spin_lock(&tcp_cong_list_lock); | 50 | spin_lock(&tcp_cong_list_lock); |
49 | if (tcp_ca_find(ca->name)) { | 51 | if (tcp_ca_find(ca->name)) { |
50 | pr_notice("TCP %s already registered\n", ca->name); | 52 | pr_notice("%s already registered\n", ca->name); |
51 | ret = -EEXIST; | 53 | ret = -EEXIST; |
52 | } else { | 54 | } else { |
53 | list_add_tail_rcu(&ca->list, &tcp_cong_list); | 55 | list_add_tail_rcu(&ca->list, &tcp_cong_list); |
54 | pr_info("TCP %s registered\n", ca->name); | 56 | pr_info("%s registered\n", ca->name); |
55 | } | 57 | } |
56 | spin_unlock(&tcp_cong_list_lock); | 58 | spin_unlock(&tcp_cong_list_lock); |
57 | 59 | ||