diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-08-09 08:14:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:00 -0400 |
commit | e60402d0a909ca2e6e2fbdf9ed004ef0fae36d33 (patch) | |
tree | b40a00b801cf44f81bebd7dadddb19c0086b145c /net/ipv4/tcp.c | |
parent | b9c4595bc4947faa236a849324fe3492e388d949 (diff) |
[TCP]: Move sack_ok access to obviously named funcs & cleanup
Previously code had IsReno/IsFack defined as macros that were
local to tcp_input.c though sack_ok field has user elsewhere too
for the same purpose. This changes them to static inlines as
preferred according the current coding style and unifies the
access to sack_ok across multiple files. Magic bitops of sack_ok
for FACK and DSACK are also abstracted to functions with
appropriate names.
Note:
- One sack_ok = 1 remains but that's self explanary, i.e., it
enables sack
- Couple of !IsReno cases are changed to tcp_is_sack
- There were no users for IsDSack => I dropped it
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 7e740112b238..aff31427f525 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2014,7 +2014,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) | |||
2014 | 2014 | ||
2015 | if (tp->rx_opt.tstamp_ok) | 2015 | if (tp->rx_opt.tstamp_ok) |
2016 | info->tcpi_options |= TCPI_OPT_TIMESTAMPS; | 2016 | info->tcpi_options |= TCPI_OPT_TIMESTAMPS; |
2017 | if (tp->rx_opt.sack_ok) | 2017 | if (tcp_is_sack(tp)) |
2018 | info->tcpi_options |= TCPI_OPT_SACK; | 2018 | info->tcpi_options |= TCPI_OPT_SACK; |
2019 | if (tp->rx_opt.wscale_ok) { | 2019 | if (tp->rx_opt.wscale_ok) { |
2020 | info->tcpi_options |= TCPI_OPT_WSCALE; | 2020 | info->tcpi_options |= TCPI_OPT_WSCALE; |