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>
This commit is contained in:

committed by
David S. Miller

parent
d82bd12298
commit
735d383117
@@ -318,7 +318,7 @@ static u16 tcp_select_window(struct sock *sk)
|
||||
}
|
||||
|
||||
/* Packet ECN state for a SYN-ACK */
|
||||
static inline void TCP_ECN_send_synack(struct sock *sk, struct sk_buff *skb)
|
||||
static void tcp_ecn_send_synack(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
const struct tcp_sock *tp = tcp_sk(sk);
|
||||
|
||||
@@ -330,7 +330,7 @@ static inline void TCP_ECN_send_synack(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
/* Packet ECN state for a SYN. */
|
||||
static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb)
|
||||
static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
|
||||
@@ -344,8 +344,8 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
TCP_ECN_make_synack(const struct request_sock *req, struct tcphdr *th,
|
||||
static void
|
||||
tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th,
|
||||
struct sock *sk)
|
||||
{
|
||||
if (inet_rsk(req)->ecn_ok) {
|
||||
@@ -358,7 +358,7 @@ TCP_ECN_make_synack(const struct request_sock *req, struct tcphdr *th,
|
||||
/* Set up ECN state for a packet on a ESTABLISHED socket that is about to
|
||||
* be sent.
|
||||
*/
|
||||
static inline void TCP_ECN_send(struct sock *sk, struct sk_buff *skb,
|
||||
static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb,
|
||||
int tcp_header_len)
|
||||
{
|
||||
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,
|
||||
|
||||
tcp_options_write((__be32 *)(th + 1), tp, &opts);
|
||||
if (likely((tcb->tcp_flags & TCPHDR_SYN) == 0))
|
||||
TCP_ECN_send(sk, skb, tcp_header_size);
|
||||
tcp_ecn_send(sk, skb, tcp_header_size);
|
||||
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
/* Calculate the MD5 hash, as we have all we need now */
|
||||
@@ -2800,7 +2800,7 @@ int tcp_send_synack(struct sock *sk)
|
||||
}
|
||||
|
||||
TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_ACK;
|
||||
TCP_ECN_send_synack(sk, skb);
|
||||
tcp_ecn_send_synack(sk, skb);
|
||||
}
|
||||
return tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);
|
||||
}
|
||||
@@ -2859,7 +2859,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
|
||||
memset(th, 0, sizeof(struct tcphdr));
|
||||
th->syn = 1;
|
||||
th->ack = 1;
|
||||
TCP_ECN_make_synack(req, th, sk);
|
||||
tcp_ecn_make_synack(req, th, sk);
|
||||
th->source = htons(ireq->ir_num);
|
||||
th->dest = ireq->ir_rmt_port;
|
||||
/* Setting of flags are superfluous here for callers (and ECE is
|
||||
@@ -3098,7 +3098,7 @@ int tcp_connect(struct sock *sk)
|
||||
tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN);
|
||||
tp->retrans_stamp = tcp_time_stamp;
|
||||
tcp_connect_queue_skb(sk, buff);
|
||||
TCP_ECN_send_syn(sk, buff);
|
||||
tcp_ecn_send_syn(sk, buff);
|
||||
|
||||
/* Send off SYN; include data in Fast Open. */
|
||||
err = tp->fastopen_req ? tcp_send_syn_data(sk, buff) :
|
||||
|
Reference in New Issue
Block a user