mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
tcp: Remove redundant checks when setting eff_sacks
Remove redundant checks when setting eff_sacks and make the number of SACKs a compile time constant. Now that the options code knows how many SACK blocks can fit in the header, we don't need to have the SACK code guessing at it. Signed-off-by: Adam Langley <agl@imperialviolet.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
33ad798c92
commit
4389dded77
2 changed files with 16 additions and 15 deletions
|
@ -224,6 +224,12 @@ struct tcp_options_received {
|
|||
u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
|
||||
};
|
||||
|
||||
/* This is the max number of SACKS that we'll generate and process. It's safe
|
||||
* to increse this, although since:
|
||||
* size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
|
||||
* only four options will fit in a standard TCP header */
|
||||
#define TCP_NUM_SACKS 4
|
||||
|
||||
struct tcp_request_sock {
|
||||
struct inet_request_sock req;
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue