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

committed by
David S. Miller

parent
b9c4595bc4
commit
e60402d0a9
@@ -445,7 +445,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
|
||||
newtp->rx_opt.tstamp_ok = ireq->tstamp_ok;
|
||||
if ((newtp->rx_opt.sack_ok = ireq->sack_ok) != 0) {
|
||||
if (sysctl_tcp_fack)
|
||||
newtp->rx_opt.sack_ok |= 2;
|
||||
tcp_enable_fack(newtp);
|
||||
}
|
||||
newtp->window_clamp = req->window_clamp;
|
||||
newtp->rcv_ssthresh = req->rcv_wnd;
|
||||
|
Reference in New Issue
Block a user