From patchwork Wed Aug 24 02:03:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12952802 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 50CFDC32793 for ; Wed, 24 Aug 2022 02:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232694AbiHXCD6 (ORCPT ); Tue, 23 Aug 2022 22:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229899AbiHXCD5 (ORCPT ); Tue, 23 Aug 2022 22:03:57 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B6586711; Tue, 23 Aug 2022 19:03:56 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id p185so671110pfb.13; Tue, 23 Aug 2022 19:03:56 -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=7ofU2lgCpYY1MTlNsVIVEv5dtOBTMdU8c432THIlWs4=; b=aQdeP9pDunfS9FujeAzgmCY7t/dHVok+GvEkdZH0xXjkZ4X+InIGuKT4f3d4SNOToE 27IEVWaU7bC0iL8mzukT27Id01uFCD/l3DMGS1Ip8y9vrFwxqVdRG/Vro0OJ40ntin5Z DQhO5zxF4LmkYUroZP+GtbpPnYrY+PO2h2lh/6qyTvkkedxdFJEG5QZAW/b5EFsX1bw7 q0X6Jv7CB575yCkTJRxchK3mLzyDhGcvY19zoTqQzjBvIiN3W10IZybpBjJ5babyV/ln 7Bt3QcCVi2sRbLy2sBFqKVxxoHGnOBqaH72jTEpe0Po/1/NOzDcvJvm2gLMcN7WwTPyN 5q/w== 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=7ofU2lgCpYY1MTlNsVIVEv5dtOBTMdU8c432THIlWs4=; b=itY6zfC52N4DfxSoDU99u5jUB91P6DixzTWVt9HGHkks1u6EVqH8KP/rG5+9noi70h KFVG0NiXT2rjxpiQWODPRiBVIRKAPMsqFh479hYd8AdkafAgkojvrOnME0IENytx/UcX zEjuVASQRbk5mrEXhezEskvKGS1a/WsSexgsvUm0edNfrcygIJhc9dXf4tmFYXZSP8LX M7LU1PPFGTGpFKHzBhIYho53luWUNtPA7/5uKJWkiTaj9nOEV4gkogbq32f+qiubY8y2 5U+3OZdU+OnIk3dQ0BS1CIJNTVCXHTnzfWL9PDWloKtc9QdG/6Wph32ZLmWygclEDx2Z Z9Tw== X-Gm-Message-State: ACgBeo370QE/tzOOoG7OEyEVOao4bzGZmF6PfVm2koK4p6vtej1+IIMy Fy9CVYHB+DHmFAea/aYXJQ0= X-Google-Smtp-Source: AA6agR75nPxUcgL7iz/D6O3wwvcyYXf0MYELMcTN3cgefHDPFD1KLUoBqk4rIhPFzvs3z4Ot37yc7Q== X-Received: by 2002:a63:170d:0:b0:415:f76d:45e1 with SMTP id x13-20020a63170d000000b00415f76d45e1mr22758662pgl.171.1661306636313; Tue, 23 Aug 2022 19:03:56 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id y3-20020aa79e03000000b0052e78582aa2sm8762157pfq.181.2022.08.23.19.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 19:03:56 -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, linl@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v2 1/3] ipv4: Namespaceify route/error_cost knob Date: Wed, 24 Aug 2022 02:03:43 +0000 Message-Id: <20220824020343.213715-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220824020051.213658-1-xu.xin16@zte.com.cn> References: <20220824020051.213658-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 | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 10 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..b022ae749640 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; @@ -949,6 +948,7 @@ static int ip_error(struct sk_buff *skb) SKB_DR(reason); bool send; int code; + int error_cost; if (netif_is_l3_master(skb->dev)) { dev = __dev_get_by_index(dev_net(skb->dev), IPCB(skb)->iif); @@ -1002,11 +1002,13 @@ static int ip_error(struct sk_buff *skb) if (peer) { now = jiffies; peer->rate_tokens += now - peer->rate_last; + error_cost = READ_ONCE(net->ipv4.ip_rt_error_cost); + if (peer->rate_tokens > ip_rt_error_burst) peer->rate_tokens = ip_rt_error_burst; peer->rate_last = now; - if (peer->rate_tokens >= ip_rt_error_cost) - peer->rate_tokens -= ip_rt_error_cost; + if (peer->rate_tokens >= error_cost) + peer->rate_tokens -= error_cost; else send = false; inet_putpeer(peer); @@ -3535,13 +3537,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 +3585,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 +3655,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 Wed Aug 24 02:04:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12952803 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 4A189C32793 for ; Wed, 24 Aug 2022 02:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232550AbiHXCEY (ORCPT ); Tue, 23 Aug 2022 22:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbiHXCEX (ORCPT ); Tue, 23 Aug 2022 22:04:23 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 996F3868A3; Tue, 23 Aug 2022 19:04:22 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id c13-20020a17090a4d0d00b001fb6921b42aso117524pjg.2; Tue, 23 Aug 2022 19:04:22 -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=yQJDlMHUJFrwemGaRL3nn+/DlN8fFYrWml/BqHE75vg=; b=ICj+k/77AyOnQFdDH9ULlcYh/RFKVzOKM00+zNX9ihnsz/+nYW4ZoI4rxJkdcYSSMJ MoSbJyCISLdwGTOkiOmhTTNQlDDmZXmlvzF1CGifx0ifR1vwznhsJ4pVZYVFbp2XuX4G 2AI7M+ZSxiPvLi3Cafbf8cF6mNPT6t+WZmalqcncOgL/xEaVDHyv/7dbrab+urWrJbFu sUnR6flrjB8IYSIc58av9dkrI35doOMLBT+/TrzncJ7mvsjXR0zQDDtY0bsM4pQu9bYU fXaWmdElV8Aw8i2q9MTkEV4dm74okMllsS9PsnkJLRNER49pWTjm7yNejydmGkIRolcK MMoA== 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=yQJDlMHUJFrwemGaRL3nn+/DlN8fFYrWml/BqHE75vg=; b=BbWpkv0+F0BS1piKLGZ2hWsPN3mjDBSCHzfXH+osomryFZX0Od/vsQWJfskjA32F/I 7YyZ2S/KD6HMU2vdzFRBhUGCT3afg6rXVVpMzbR5gSGaZB3iwqIcrULYlwyV1SvPcvt8 V5t5NLFfPSbmmkUobwbub+3bpSQVekiyo2gCNYIKd4Z5S4NaAq26M5PAe2CSXmbo4zS7 /q/1iOyCB6tSiK9wh65+6PMMkecrbwjf8SiuCsXPc1FCjj1tlCJIOfotZ9OllW3uNZYH lsxcuu6pA9eQRv4NaYK4i7ngFXudxwVzmIL4ySbpOBCTSIYeD0dumyDBxXwR7W4xMkWi mkGQ== X-Gm-Message-State: ACgBeo0+U7Y7GUsu201pVm/epbzhx0HVaEiHYmj5WkVt+c2z/BZ2G/mr sleZb/diYdFV2BTP7IjM4Yk= X-Google-Smtp-Source: AA6agR7lZLvWfZe1DhuwEoVz6AVeNjOhhpG7a/cq7b91Q0VY8PrOlzYAWa/8H/c2sDgMlbWScY66kQ== X-Received: by 2002:a17:90a:304a:b0:1fa:d832:5aca with SMTP id q10-20020a17090a304a00b001fad8325acamr5877403pjl.16.1661306662178; Tue, 23 Aug 2022 19:04:22 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id d188-20020a6236c5000000b0052d1275a570sm11349951pfa.64.2022.08.23.19.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 19:04:21 -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, linl@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v2 2/3] ipv4: Namespaceify route/error_burst knob Date: Wed, 24 Aug 2022 02:04:17 +0000 Message-Id: <20220824020417.213771-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220824020051.213658-1-xu.xin16@zte.com.cn> References: <20220824020051.213658-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 | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 11 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 b022ae749640..86fbb2b511c1 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; @@ -948,7 +948,7 @@ static int ip_error(struct sk_buff *skb) SKB_DR(reason); bool send; int code; - int error_cost; + int error_cost, error_burst; if (netif_is_l3_master(skb->dev)) { dev = __dev_get_by_index(dev_net(skb->dev), IPCB(skb)->iif); @@ -1003,9 +1003,10 @@ static int ip_error(struct sk_buff *skb) now = jiffies; peer->rate_tokens += now - peer->rate_last; error_cost = READ_ONCE(net->ipv4.ip_rt_error_cost); + error_burst = READ_ONCE(net->ipv4.ip_rt_error_burst); - if (peer->rate_tokens > ip_rt_error_burst) - peer->rate_tokens = ip_rt_error_burst; + if (peer->rate_tokens > error_burst) + peer->rate_tokens = error_burst; peer->rate_last = now; if (peer->rate_tokens >= error_cost) peer->rate_tokens -= error_cost; @@ -3537,13 +3538,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, @@ -3592,6 +3586,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, + }, { }, }; @@ -3656,6 +3657,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 Wed Aug 24 02:08:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12952804 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 E95DBC32793 for ; Wed, 24 Aug 2022 02:08:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232732AbiHXCIQ (ORCPT ); Tue, 23 Aug 2022 22:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbiHXCIP (ORCPT ); Tue, 23 Aug 2022 22:08:15 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A8A46EF34; Tue, 23 Aug 2022 19:08:15 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id y127so12180048pfy.5; Tue, 23 Aug 2022 19:08:15 -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=fBcCNRgv34fni4UMSA1TpneApR3uVzSyckorh5xf6DFohi8H50S/2kpkyKuYXgbMiy AbIleHIyGaspPzFkv3spYiErD7V2GJlxO9D72IOd0DnRDDSB6RDMGU5Q5FURtGgeAZ+s rC5Zpo4wJ+oSnc87BW4P+Qpre5Y1OVJBDWAuFzyG2gPxtnRBtAsaOWoDezswPATqkzj1 Ah7PbUzSXr57PQJMtvZ5wz6jb6tpttfZ3wdqLqyUauxZGzAK8HpgdfTDegzbFSwZGP9k 1wBT9B9SU4Y+O2kFQgBZFKsjG5zBK+6QYn458631LpmYmLDJjo52thfGw+dIztdqC447 xNfg== 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=FZ4ipOvB1HO5zV5RTjAZW++Rd4G7/Z+OQvgeOrLnU+7p8qAe/2ySSGTUhBt9CcMhAn ajk7oFHw1AzF2c4m3g6x0hLvMlMlRe1mPAEplinBoNNf6BeoHFG9JSnz0nAueoYBLyzH gJBGqcMs4BTn9tlLNF0bLNsrkwEmlh0bdJ9c08erWroGVSMHalnqJuwVyWZza/xHVIRy 3cvaO7e6j+as2oZ95zBM2qqBcUTsb5GLjdV4rVF2yC1N6qZpxiemn7ETemSFL678/MOD ic00T1Mwg2RdMzZbvvRd9a2kZ0hwWCXNp+q3W1CJ42IQAAcGafSNbng5UeMv8opAXJpd DLnA== X-Gm-Message-State: ACgBeo0q6yikDNFMyh6sgNZSpGHqTS8WVphUEcO5Pc3Fl2I0QkTYFVPA HtrMfBkx9BCgrXESr85ttbA= X-Google-Smtp-Source: AA6agR7dvo/rFRCR8xDHJp1GWGmQqmad561FXhHbtCeUj/Ik/nBjju8Y/tJE6H6TXizgbqK+OSH55A== X-Received: by 2002:a63:bd49:0:b0:41b:8a07:a6ed with SMTP id d9-20020a63bd49000000b0041b8a07a6edmr22133311pgp.124.1661306894838; Tue, 23 Aug 2022 19:08:14 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id l7-20020a170903120700b0016d692ff95esm11380107plh.133.2022.08.23.19.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 19:08:14 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: xu.xin16@zte.com.cn To: davem@davemloft.net, kuba@kernel.org, corbet@lwn.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org Cc: netdev@vger.kernel.org, linl@vger.kernel.org, xu.xin16@zte.com.cn, Yunkai Zhang Subject: [PATCH v2 3/3] ipv4: add documentation of two sysctls about icmp Date: Wed, 24 Aug 2022 02:08:08 +0000 Message-Id: <20220824020808.213837-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220824020051.213658-1-xu.xin16@zte.com.cn> References: <20220824020051.213658-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.