diff options
author | Florian Westphal <fw@strlen.de> | 2014-09-29 07:08:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-29 14:41:22 -0400 |
commit | 735d383117e113403442d971b23e7cfa2f876c7c (patch) | |
tree | 9040f467826429d05c7d5f4070d18141d652e259 /net/ipv4/tcp_output.c | |
parent | d82bd1229885d550d03926cfa937703f6caa3cc0 (diff) |
tcp: change TCP_ECN prefixes to lower case
Suggested by Stephen. Also drop inline keyword and let compiler decide.
gcc 4.7.3 decides to no longer inline tcp_ecn_check_ce, so split it up.
The actual evaluation is not inlined anymore while the ECN_OK test is.
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 86a0216fcaa1..ee567e9e98c3 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -318,7 +318,7 @@ static u16 tcp_select_window(struct sock *sk) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | /* Packet ECN state for a SYN-ACK */ | 320 | /* Packet ECN state for a SYN-ACK */ |
321 | static inline void TCP_ECN_send_synack(struct sock *sk, struct sk_buff *skb) | 321 | static void tcp_ecn_send_synack(struct sock *sk, struct sk_buff *skb) |
322 | { | 322 | { |
323 | const struct tcp_sock *tp = tcp_sk(sk); | 323 | const struct tcp_sock *tp = tcp_sk(sk); |
324 | 324 | ||
@@ -330,7 +330,7 @@ static inline void TCP_ECN_send_synack(struct sock *sk, struct sk_buff *skb) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | /* Packet ECN state for a SYN. */ | 332 | /* Packet ECN state for a SYN. */ |
333 | static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb) | 333 | static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) |
334 | { | 334 | { |
335 | struct tcp_sock *tp = tcp_sk(sk); | 335 | struct tcp_sock *tp = tcp_sk(sk); |
336 | 336 | ||
@@ -344,8 +344,8 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb) | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | static __inline__ void | 347 | static void |
348 | TCP_ECN_make_synack(const struct request_sock *req, struct tcphdr *th, | 348 | tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th, |
349 | struct sock *sk) | 349 | struct sock *sk) |
350 | { | 350 | { |
351 | if (inet_rsk(req)->ecn_ok) { | 351 | if (inet_rsk(req)->ecn_ok) { |
@@ -358,7 +358,7 @@ TCP_ECN_make_synack(const struct request_sock *req, struct tcphdr *th, | |||
358 | /* Set up ECN state for a packet on a ESTABLISHED socket that is about to | 358 | /* Set up ECN state for a packet on a ESTABLISHED socket that is about to |
359 | * be sent. | 359 | * be sent. |
360 | */ | 360 | */ |
361 | static inline void TCP_ECN_send(struct sock *sk, struct sk_buff *skb, | 361 | static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb, |
362 | int tcp_header_len) | 362 | int tcp_header_len) |
363 | { | 363 | { |
364 | struct tcp_sock *tp = tcp_sk(sk); | 364 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -960,7 +960,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
960 | 960 | ||
961 | tcp_options_write((__be32 *)(th + 1), tp, &opts); | 961 | tcp_options_write((__be32 *)(th + 1), tp, &opts); |
962 | if (likely((tcb->tcp_flags & TCPHDR_SYN) == 0)) | 962 | if (likely((tcb->tcp_flags & TCPHDR_SYN) == 0)) |
963 | TCP_ECN_send(sk, skb, tcp_header_size); | 963 | tcp_ecn_send(sk, skb, tcp_header_size); |
964 | 964 | ||
965 | #ifdef CONFIG_TCP_MD5SIG | 965 | #ifdef CONFIG_TCP_MD5SIG |
966 | /* Calculate the MD5 hash, as we have all we need now */ | 966 | /* Calculate the MD5 hash, as we have all we need now */ |
@@ -2800,7 +2800,7 @@ int tcp_send_synack(struct sock *sk) | |||
2800 | } | 2800 | } |
2801 | 2801 | ||
2802 | TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ACK; | 2802 | TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ACK; |
2803 | TCP_ECN_send_synack(sk, skb); | 2803 | tcp_ecn_send_synack(sk, skb); |
2804 | } | 2804 | } |
2805 | return tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC); | 2805 | return tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC); |
2806 | } | 2806 | } |
@@ -2859,7 +2859,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
2859 | memset(th, 0, sizeof(struct tcphdr)); | 2859 | memset(th, 0, sizeof(struct tcphdr)); |
2860 | th->syn = 1; | 2860 | th->syn = 1; |
2861 | th->ack = 1; | 2861 | th->ack = 1; |
2862 | TCP_ECN_make_synack(req, th, sk); | 2862 | tcp_ecn_make_synack(req, th, sk); |
2863 | th->source = htons(ireq->ir_num); | 2863 | th->source = htons(ireq->ir_num); |
2864 | th->dest = ireq->ir_rmt_port; | 2864 | th->dest = ireq->ir_rmt_port; |
2865 | /* Setting of flags are superfluous here for callers (and ECE is | 2865 | /* Setting of flags are superfluous here for callers (and ECE is |
@@ -3098,7 +3098,7 @@ int tcp_connect(struct sock *sk) | |||
3098 | tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN); | 3098 | tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN); |
3099 | tp->retrans_stamp = tcp_time_stamp; | 3099 | tp->retrans_stamp = tcp_time_stamp; |
3100 | tcp_connect_queue_skb(sk, buff); | 3100 | tcp_connect_queue_skb(sk, buff); |
3101 | TCP_ECN_send_syn(sk, buff); | 3101 | tcp_ecn_send_syn(sk, buff); |
3102 | 3102 | ||
3103 | /* Send off SYN; include data in Fast Open. */ | 3103 | /* Send off SYN; include data in Fast Open. */ |
3104 | err = tp->fastopen_req ? tcp_send_syn_data(sk, buff) : | 3104 | err = tp->fastopen_req ? tcp_send_syn_data(sk, buff) : |