ipv4: Namespecify TCP PMTU mechanism
Packetization Layer Path MTU Discovery works separately beside Path MTU Discovery at IP level, different net namespace has various requirements on which one to chose, e.g., a virutalized container instance would require TCP PMTU to probe an usable effective mtu for underlying tunnel, while the host would employ classical ICMP based PMTU to function. Hence making TCP PMTU mechanism per net namespace to decouple two functionality. Furthermore the probe base MSS should also be configured separately for each namespace. Signed-off-by: Fan Du <fan.du@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -59,9 +59,6 @@ int sysctl_tcp_limit_output_bytes __read_mostly = 131072;
|
||||
*/
|
||||
int sysctl_tcp_tso_win_divisor __read_mostly = 3;
|
||||
|
||||
int sysctl_tcp_mtu_probing __read_mostly = 0;
|
||||
int sysctl_tcp_base_mss __read_mostly = TCP_BASE_MSS;
|
||||
|
||||
/* By default, RFC2861 behavior. */
|
||||
int sysctl_tcp_slow_start_after_idle __read_mostly = 1;
|
||||
|
||||
@@ -1350,11 +1347,12 @@ void tcp_mtup_init(struct sock *sk)
|
||||
{
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
struct net *net = sock_net(sk);
|
||||
|
||||
icsk->icsk_mtup.enabled = sysctl_tcp_mtu_probing > 1;
|
||||
icsk->icsk_mtup.enabled = net->ipv4.sysctl_tcp_mtu_probing > 1;
|
||||
icsk->icsk_mtup.search_high = tp->rx_opt.mss_clamp + sizeof(struct tcphdr) +
|
||||
icsk->icsk_af_ops->net_header_len;
|
||||
icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, sysctl_tcp_base_mss);
|
||||
icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, net->ipv4.sysctl_tcp_base_mss);
|
||||
icsk->icsk_mtup.probe_size = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tcp_mtup_init);
|
||||
|
Reference in New Issue
Block a user