From patchwork Tue Aug 30 09:16:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12958943 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FE79ECAAD4 for ; Tue, 30 Aug 2022 09:16:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbiH3JQ0 (ORCPT ); Tue, 30 Aug 2022 05:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiH3JQZ (ORCPT ); Tue, 30 Aug 2022 05:16:25 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC8ED2E82; Tue, 30 Aug 2022 02:16:24 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id u9-20020a17090a1f0900b001fde6477464so4162554pja.4; Tue, 30 Aug 2022 02:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=AwpPxJmpuD6vSXIYZsaR+0dhj1Xu9wkEAUjPZWS3YK8=; b=PVnmqVceveJBufyKnU/McUDwsQlCD76O7dwZf6FM9YAi1n3XqoPQwquTaqrBFdMwu1 n3HinEu/VJi4GsgAngyHuqJUKDqYQvxNS4++CL8ufG1ajIcRF60Tar1yUF6OtizXsvSH xg8gtYB/lm3v9qmE99lD/PJr/LhlBN8KCEtwPPQWoFnHDaDh9y8oHinG9jyZOxoZGRZW kxiMxPuJQJmIKk4LEs1eqoKCDpBTcaexrXaHQysygYfb1dG4Ou9w8A1IYHrsD4kUe3fO Pw3nso5/otW7sdyb3mba6uO3aRlyMegc/YMY0SU8S0Rjra09A/ObTKULRZA7r0XNPyy7 VkwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=AwpPxJmpuD6vSXIYZsaR+0dhj1Xu9wkEAUjPZWS3YK8=; b=k7QLTXin4A0ZUnDxOIoMf993ScbA71Hg0M4Q0UBxa6YaRzwkrHQV005uT5RHJ+320u AcPZE61N/qyTxFlDbLWrwkQWSw0bV2Z9QYN7Borus0PZo6K5aVxYJ+94saJv2lCUmSmM hfuMjUTEyT0Qa687pZX1x+kTgtHLrbT8waOIZ8xT19Qwwj9tJHZDnverC81QG40YKMhy qMdPDnGJwQDJSGFiLjB4j9/ujtbs5U7oWill/t+GTGKEphcsbnOAZXv1uHd5e8eYTVLX y5+k5WfNyzyz1wDhJdkLpu76kLsZpKeqaXcx7QaDmIZLt5QlwW1OpUIa/B0hD5I68Iqw nLsA== X-Gm-Message-State: ACgBeo2pnjREdLsbD68gUZIOJaBmsVxiUUxFXk1Bw/Hi7JmIa+6sQ2GJ 7adtBFa177JkzE/e2OrVuuU= X-Google-Smtp-Source: AA6agR4JYxLezfwNX3QqbaVzew3oDXyUuBNOpytQrWOMZWoiE59WRbkw1yOXMGJxvsNJpq4v00T/SQ== X-Received: by 2002:a17:902:e94c:b0:171:3df0:c886 with SMTP id b12-20020a170902e94c00b001713df0c886mr21069633pll.39.1661850983724; Tue, 30 Aug 2022 02:16:23 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id s7-20020a17090a440700b001fa9e7b0c3esm7998294pjg.41.2022.08.30.02.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 02:16:23 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.xin16@zte.com.cn To: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v3 1/3] ipv4: Namespaceify route/error_cost knob Date: Tue, 30 Aug 2022 09:16:14 +0000 Message-Id: <20220830091614.286342-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220830091453.286285-1-xu.xin16@zte.com.cn> References: <20220830091453.286285-1-xu.xin16@zte.com.cn> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: xu xin Different netns has different requirement on the setting of error_cost sysctl which is used to limit the max frequency of sending ICMP_DEST_UNREACH packet together with error_burst. To put it simply, it refers to the minimum time interval between two consecutive ICMP_DEST_UNREACHABLE packets sent to the same peer when now is icmp-stable period not the burst case after a long calm time. Enable error_cost to be configured per network namespace. Signed-off-by: xu xin (CGEL ZTE) Reviewed-by: Yunkai Zhang (CGEL ZTE) --- include/net/netns/ipv4.h | 1 + net/ipv4/route.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index c7320ef356d9..319395bbad3c 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -85,6 +85,7 @@ struct netns_ipv4 { u32 ip_rt_min_pmtu; int ip_rt_mtu_expires; int ip_rt_min_advmss; + int ip_rt_error_cost; struct local_ports ip_local_ports; diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 795cbe1de912..209539c201c2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -118,7 +118,6 @@ static int ip_rt_max_size; static int ip_rt_redirect_number __read_mostly = 9; static int ip_rt_redirect_load __read_mostly = HZ / 50; static int ip_rt_redirect_silence __read_mostly = ((HZ / 50) << (9 + 1)); -static int ip_rt_error_cost __read_mostly = HZ; static int ip_rt_error_burst __read_mostly = 5 * HZ; static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; @@ -1000,6 +999,8 @@ static int ip_error(struct sk_buff *skb) send = true; if (peer) { + int ip_rt_error_cost = READ_ONCE(net->ipv4.ip_rt_error_cost); + now = jiffies; peer->rate_tokens += now - peer->rate_last; if (peer->rate_tokens > ip_rt_error_burst) @@ -3535,13 +3536,6 @@ static struct ctl_table ipv4_route_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, - { - .procname = "error_cost", - .data = &ip_rt_error_cost, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec, - }, { .procname = "error_burst", .data = &ip_rt_error_burst, @@ -3590,6 +3584,13 @@ static struct ctl_table ipv4_route_netns_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, + { + .procname = "error_cost", + .data = &init_net.ipv4.ip_rt_error_cost, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec, + }, { }, }; @@ -3653,6 +3654,7 @@ static __net_init int netns_ip_rt_init(struct net *net) net->ipv4.ip_rt_min_pmtu = DEFAULT_MIN_PMTU; net->ipv4.ip_rt_mtu_expires = DEFAULT_MTU_EXPIRES; net->ipv4.ip_rt_min_advmss = DEFAULT_MIN_ADVMSS; + net->ipv4.ip_rt_error_cost = HZ; return 0; } From patchwork Tue Aug 30 09:16:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12958945 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37303ECAAA1 for ; Tue, 30 Aug 2022 09:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230193AbiH3JRI (ORCPT ); Tue, 30 Aug 2022 05:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiH3JRG (ORCPT ); Tue, 30 Aug 2022 05:17:06 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB8DD2EB0; Tue, 30 Aug 2022 02:17:05 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id 145so10385653pfw.4; Tue, 30 Aug 2022 02:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=HSIgRfOrSPDJb/X5S53DyHalzzKyLtpCJJH7LjGnj5I=; b=c4HJG4dUuEPntFjcys0mnlZVjQzSqR0wR+PYGc1wjQOJ/GyrcBk2klcpX7gwbghQEI jsNHe70AAVKbkiK6c+VJm6CgMdkIpp266fALujvZ4MC2rXO+TPN1SH3Q4pD8D5NgIkz5 6FLJP8vLeTXuesu0cI3iMdvqL1RoLcG4DUZVBn5OzsCT85GlQJUYVTrkMRk93rN2tVN4 dB5NRqw8JjJRiNWDNz8CBy7EeB4mP3jZ+cJYqYvPLonuZ4o1IXbIoSsH3xpBN2MulNZt pJIWwg05MIvRWhpqAc/N4/ecZG2vrGd3fqnJhh0Z/UjBD0Tgobfpl9tdcxuR0eCR6scX +lAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=HSIgRfOrSPDJb/X5S53DyHalzzKyLtpCJJH7LjGnj5I=; b=2ZOEZ3APKFXbMJ68UPHAZK2n04fJrIWt7x5bFo3oW0WrKQ17IXPF8vWemWbP/ZbqS0 iwwpiUknvrn5Ib78YrZVrksSPgTPm1zihNMWtptRiVigWeWes+UEUZx2+0sxOJirhoik dv+mh9jcR5x1KKa/MMKDuVhOga2a1CGA0EZWjaxhaOnOf0NBMSMQRkqtg9eC/0i18OAM qW2ZqK5v4yLSKz+LC2C4fLGcSkQRKorf84r8i6YjuA3/CN1AHyQ83es0HvY/YIsvTRgp TUh+WZFSme9Oi3UYh/+fuY5aTyFh2Lja4+184D4eTKWW1I5E+n2P5Q532IdRS8V5zloB mpbQ== X-Gm-Message-State: ACgBeo1YBDAK1uICT2nCYFDvhYae78JF2gqRyrAKz3e0bnVQ+N9UBDlR wTBiHOIcP9foIJztfBw5z7o= X-Google-Smtp-Source: AA6agR7U6ZrD1KdTPgQf2Tzvf+CrSS+Bl8W8vVwe3LWXmQLp/kpzn5aBsFTWY+mL7kKBrloQkF4i6g== X-Received: by 2002:a05:6a00:88f:b0:52c:6962:274f with SMTP id q15-20020a056a00088f00b0052c6962274fmr21161017pfj.12.1661851024971; Tue, 30 Aug 2022 02:17:04 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id i63-20020a626d42000000b00537b8aa0a46sm8955406pfc.96.2022.08.30.02.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 02:17:04 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.xin16@zte.com.cn To: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v3 2/3] ipv4: Namespaceify route/error_burst knob Date: Tue, 30 Aug 2022 09:16:57 +0000 Message-Id: <20220830091657.286396-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220830091453.286285-1-xu.xin16@zte.com.cn> References: <20220830091453.286285-1-xu.xin16@zte.com.cn> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: xu xin Different netns has different requirement on the setting of error_burst sysctl which is used to limit the frequency of sending ICMP_DEST_UNREACH packet together with error_cost. To put it simply, if the rate of error_burst over error_cost is larger, then allowd burstly-sent ICMP_DEST_UNREACH packets after a long calm time (no dest-unreachable icmp packets) is more. Enable error_burst to be configured per network namespace. Signed-off-by: xu xin (CGEL ZTE) Reviewed-by: Yunkai Zhang (CGEL ZTE) --- include/net/netns/ipv4.h | 1 + net/ipv4/route.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 319395bbad3c..03d16cf32508 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -86,6 +86,7 @@ struct netns_ipv4 { int ip_rt_mtu_expires; int ip_rt_min_advmss; int ip_rt_error_cost; + int ip_rt_error_burst; struct local_ports ip_local_ports; diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 209539c201c2..4745a4085de5 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -114,11 +114,11 @@ #define DEFAULT_MIN_PMTU (512 + 20 + 20) #define DEFAULT_MTU_EXPIRES (10 * 60 * HZ) #define DEFAULT_MIN_ADVMSS 256 +#define DEFAULT_ERROR_BURST (5 * HZ) static int ip_rt_max_size; static int ip_rt_redirect_number __read_mostly = 9; static int ip_rt_redirect_load __read_mostly = HZ / 50; static int ip_rt_redirect_silence __read_mostly = ((HZ / 50) << (9 + 1)); -static int ip_rt_error_burst __read_mostly = 5 * HZ; static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; @@ -1000,6 +1000,7 @@ static int ip_error(struct sk_buff *skb) send = true; if (peer) { int ip_rt_error_cost = READ_ONCE(net->ipv4.ip_rt_error_cost); + int ip_rt_error_burst = READ_ONCE(net->ipv4.ip_rt_error_burst); now = jiffies; peer->rate_tokens += now - peer->rate_last; @@ -3536,13 +3537,6 @@ static struct ctl_table ipv4_route_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, - { - .procname = "error_burst", - .data = &ip_rt_error_burst, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec, - }, { .procname = "gc_elasticity", .data = &ip_rt_gc_elasticity, @@ -3591,6 +3585,13 @@ static struct ctl_table ipv4_route_netns_table[] = { .mode = 0644, .proc_handler = proc_dointvec, }, + { + .procname = "error_burst", + .data = &init_net.ipv4.ip_rt_error_burst, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec, + }, { }, }; @@ -3655,6 +3656,7 @@ static __net_init int netns_ip_rt_init(struct net *net) net->ipv4.ip_rt_mtu_expires = DEFAULT_MTU_EXPIRES; net->ipv4.ip_rt_min_advmss = DEFAULT_MIN_ADVMSS; net->ipv4.ip_rt_error_cost = HZ; + net->ipv4.ip_rt_error_burst = DEFAULT_ERROR_BURST; return 0; } From patchwork Tue Aug 30 09:17:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12958946 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86AACECAAD4 for ; Tue, 30 Aug 2022 09:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231221AbiH3JR3 (ORCPT ); Tue, 30 Aug 2022 05:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiH3JR1 (ORCPT ); Tue, 30 Aug 2022 05:17:27 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C62A2D2E95; Tue, 30 Aug 2022 02:17:26 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id v5so4301014plo.9; Tue, 30 Aug 2022 02:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=z0jGwIZNk8TLu9n677sjLmPSpOtIptc1LacJkvrgElA=; b=NzFNslmJiCMzU+pz9gBs301wZcRFS8yhsdzOifJK49tFI09UD3OV7aoZDED0pfkrxS qOfhAKU1lE/V9jprDsAUId+NZyOiYAjoq2RBV7UziKE+9lTK9jcB3qx7ntwMnXFCe+Cq 5xzzTKD2YCj4UYltCHOCdH6MgJUhs9nFeJOGmj/gpkOCVBPgZtulvEWiyOlonX4R8KzT b+VmaUUKPIGjt4gkcQcZHePhT1MeY34UTAjTX3wmOqLeSr8poM7yWsFBTeVVE5DqdRSL LmBj0qTo1XGP1xHIECmp3cjBe4imLRWV/ql0KBrmc1fP5ekt0xOpK8oOJKVpQGarPb2z vOzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=z0jGwIZNk8TLu9n677sjLmPSpOtIptc1LacJkvrgElA=; b=Q0qK2nHp69Mc87Kh2kDiGzPz4suxKn1H1K+5rFRt6nuHxnipXi5nXIS/OXmQm1/Dvo 3vSV9S37vW3CxV8X38iDl0BZW7BM3WSf1RTCv7xaNulO7qEQVBdJYeaEc/m0nFbLmM8j +ulQeAq5Z0+aJCWL+2uoAq1p+SyFi069pB0GKd6CdVN5V0CsLJnoUW3wrbKTxry4tbLx m98q/Eg8zC9Hvtd1VGwKnXWOQIdzen7ir3l0+BGUgsZrQGdiBh/BXenZ97qrJdE6x8es gObFtrzvurrT4almQRUuVXeIzpAqTdEPQUwDiPQPlrsEveb4ZBj4BMHDcn2aGafD5m6Y yvlQ== X-Gm-Message-State: ACgBeo3bq1TTDpgzgAHGONUuWU8XKz9GiwWAuk4K6rZnVkeomEcF2kCw s4u1z4U8d8K0d7wwwEm8bkk= X-Google-Smtp-Source: AA6agR59tLWXuj9EZY0lhnw5QOQ7LD0VviMav4BPIhsAEorDIWJNaBTAawU6xsxliwm/F0XPT4m8zg== X-Received: by 2002:a17:902:ebc9:b0:172:951d:fc9c with SMTP id p9-20020a170902ebc900b00172951dfc9cmr20474898plg.97.1661851046339; Tue, 30 Aug 2022 02:17:26 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id i11-20020a170902c94b00b0016dc6243bb2sm9177749pla.143.2022.08.30.02.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 02:17:26 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.xin16@zte.com.cn To: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v3 3/3] ipv4: add documentation of two sysctls about icmp Date: Tue, 30 Aug 2022 09:17:18 +0000 Message-Id: <20220830091718.286452-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220830091453.286285-1-xu.xin16@zte.com.cn> References: <20220830091453.286285-1-xu.xin16@zte.com.cn> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: xu xin Add the descriptions of the sysctls of error_cost and error_burst in Documentation/networking/ip-sysctl.rst. Signed-off-by: xu xin (CGEL ZTE) Reviewed-by: Yunkai Zhang (CGEL ZTE) --- Documentation/networking/ip-sysctl.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index 56cd4ea059b2..c113a34a4115 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -156,6 +156,23 @@ route/max_size - INTEGER From linux kernel 3.6 onwards, this is deprecated for ipv4 as route cache is no longer used. +route/error_cost - INTEGER + The minimum time interval between two consecutive ICMP-DEST- + UNREACHABLE packets allowed sent to the same peer in the stable + period. Basically, The higher its value is, the lower the general + frequency of sending ICMP DEST-UNREACHABLE packets. + + Default: HZ (one second) + +route/error_burst - INTEGER + Together with error_cost, it controls the max number of burstly + sent ICMP DEST-UNREACHABLE packets after a long calm time (no + sending ICMP DEST-UNREACHABLE). Basically, the higher the rate + of error_burst over error_cost is, the more allowed burstly sent + ICMP DEST-UNREACHABLE packets after a long calm time. + + Default: 5 * HZ + neigh/default/gc_thresh1 - INTEGER Minimum number of entries to keep. Garbage collector will not purge entries if there are fewer than this number.