diff options
author | Eric Dumazet <edumazet@google.com> | 2016-12-03 14:14:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-05 13:32:22 -0500 |
commit | 40fc3423b983b864bf70b03199191260ae9b2ea6 (patch) | |
tree | adf126a23c070912b3a8ab1be52ca1ecd289f652 /include/linux/tcp.h | |
parent | f83e83037c7ae3fffaa20e597c3b87752b87b305 (diff) |
tcp: tsq: add tsq_flags / tsq_enum
This is a cleanup, to ease code review of following patches.
Old 'enum tsq_flags' is renamed, and a new enumeration is added
with the flags used in cmpxchg() operations as opposed to
single bit operations.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r-- | include/linux/tcp.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 734bab4c3bef..d8be083ab0b0 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -364,7 +364,7 @@ struct tcp_sock { | |||
364 | u32 *saved_syn; | 364 | u32 *saved_syn; |
365 | }; | 365 | }; |
366 | 366 | ||
367 | enum tsq_flags { | 367 | enum tsq_enum { |
368 | TSQ_THROTTLED, | 368 | TSQ_THROTTLED, |
369 | TSQ_QUEUED, | 369 | TSQ_QUEUED, |
370 | TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */ | 370 | TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */ |
@@ -375,6 +375,15 @@ enum tsq_flags { | |||
375 | */ | 375 | */ |
376 | }; | 376 | }; |
377 | 377 | ||
378 | enum tsq_flags { | ||
379 | TSQF_THROTTLED = (1UL << TSQ_THROTTLED), | ||
380 | TSQF_QUEUED = (1UL << TSQ_QUEUED), | ||
381 | TCPF_TSQ_DEFERRED = (1UL << TCP_TSQ_DEFERRED), | ||
382 | TCPF_WRITE_TIMER_DEFERRED = (1UL << TCP_WRITE_TIMER_DEFERRED), | ||
383 | TCPF_DELACK_TIMER_DEFERRED = (1UL << TCP_DELACK_TIMER_DEFERRED), | ||
384 | TCPF_MTU_REDUCED_DEFERRED = (1UL << TCP_MTU_REDUCED_DEFERRED), | ||
385 | }; | ||
386 | |||
378 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 387 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
379 | { | 388 | { |
380 | return (struct tcp_sock *)sk; | 389 | return (struct tcp_sock *)sk; |