Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3992239rwe; Tue, 30 Aug 2022 02:37:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hFrK0QRIUe2WjLSr6seV1hAuTk4q2g+adQLHIWompwLN010crks10NTilO7crUjrFI5xV X-Received: by 2002:a05:6402:449a:b0:442:c81c:b938 with SMTP id er26-20020a056402449a00b00442c81cb938mr19698678edb.289.1661852245743; Tue, 30 Aug 2022 02:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661852245; cv=none; d=google.com; s=arc-20160816; b=mWt7c+Y2IVysyxgYj64MtbkLiuM55iXR6jkPbeHwfO3kbwpURdRI5tTP5FBvneZKwe FEhhPs9XadFdTmgl/UtArKoaRW9h4N+pykkKQPjoBLUh20MNUC8FQ8QqDKuDQaynB58T Afck6tJTgx4iYojzCid+U/sf+6Fr2Iu03FGpjAhXMN/IMAlP01X8CFD7mcLZO33pnMlu EeBG86jl6LE9zOB42PwlzWjhnKt2zecSDEgLtnn8alnFigAyh/8hRUNCqaRJfCCAlQr8 AOEOVCzuOQKQf1X6cVFdHWRLifGiv+sEmyD2z0ykVy/GSH/tjxQtCtrSrclWFvobTYN+ IxcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1YatiKId/nj4drK3e2iwJNfEimcD7UODu6LflTCrDfg=; b=b9GFuGXX3sw1/FNCorVqZbZ7p9HuT2NGXhjmfqiI8XgOi4Aw56C2Lsme1sui2aAivc km2PSR4g8x8SeQ7jlN6ntrE+SdbDn6yuFty1bneMVrpILTXQ6kk8B68YMNrrv0nc1M86 u5oUYmzt2Uz/i+aXxAR+pGG5CfAf7pmoTQa1LijmorVphawlXG6Cg5oaPMLo9XhSYmNX fUC2cZ5iMfejbBk/WRoyTiOlMLEqKkIhAvCU3lV9ZEMmvPST+dFPnawCHHjKPos0ea9h Y1NGMcmhaeCbQ9Vaw2j2g9NRshU/cYH+BHw6pi/bRkhQnRVSEePC5umMf33uk2lBf9BA LoQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jg5fvjMe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a50e60a000000b00446b76abb29si7091113edm.540.2022.08.30.02.36.47; Tue, 30 Aug 2022 02:37:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jg5fvjMe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbiH3JPS (ORCPT + 99 others); Tue, 30 Aug 2022 05:15:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbiH3JPO (ORCPT ); Tue, 30 Aug 2022 05:15:14 -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 D40CA5D12C; Tue, 30 Aug 2022 02:15:12 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id 199so10683437pfz.2; Tue, 30 Aug 2022 02:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=1YatiKId/nj4drK3e2iwJNfEimcD7UODu6LflTCrDfg=; b=jg5fvjMeAC+3jPEplPKkRHxF3l0F+HtE/sYbQqaGwsosPYAV8azEAQtPUJLDUJXrT4 JQ1gqXqT0iJUHwV6Fk/fCRttHUmz0p5Hj+Wt3nJYV/Yvy9bb1Nh9U1gcVsLr0SSGG9Si PkNOzj9tZuIQ9VZ/c8rnagnB8hFgS5CZR51hZ1MTNDEYzqZ1D43XkMToM8xkCrlbZX+u Nu5oW0v0JJPEzemlV8JQQfNu9CehEEW+dseJgvea4sWQQqU0U4h4bW5a/3vUaCwdYufE pWipZUP9CWhoEVt4ea4gBVEbU/bmzyxm/c0yJi7U0YihXt4Xgnh7OmodU87bRlZ0KdQP APOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=1YatiKId/nj4drK3e2iwJNfEimcD7UODu6LflTCrDfg=; b=NNPfS29D9MoPOZbv4RsqQnM5Hn5PJNsQdCfTzEpJI4AErVNNcYYXAWQ6o8oXgKq+Fs LL7NEaNibXeuCIeocKQTlXFnd6ZrPw+IBNepdNCYjtn0aI9nJr7syF9R++W+lIJggYOO SturP5lGkWyV17NBQ7G27oXJiT+hPkTt2Ft4dHIdRNs9iQ6BryqVW31Q4EHFG2ftYVlT RdK6uXUclfCVaIws78XbC+m51T7FyJft6cmm0FMOrz35H/jsoHT6QI8tdVDYCKlOik+c yhH3n5EUnhzWY+QCP4odLOUj4KV56LhC6lMFKNVdM9GPFMzj+VyuMoLJr7kOsbd3YTNP dB+g== X-Gm-Message-State: ACgBeo1P4IoaRp4B/vxFwpY2v+PCnF5VgaEyGvvuprQvDJQrp5S9VJ0J zZQLr7gtwHjdjTrrKXVeu1KWUKMwUtw= X-Received: by 2002:a63:2603:0:b0:42c:f0a1:aed7 with SMTP id m3-20020a632603000000b0042cf0a1aed7mr2709935pgm.82.1661850912219; Tue, 30 Aug 2022 02:15:12 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id k6-20020a170902ce0600b0015e8d4eb1dbsm9107543plg.37.2022.08.30.02.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 02:15:11 -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 Subject: [PATCH v3 0/3] Namespaceify two sysctls related with route Date: Tue, 30 Aug 2022 09:14:53 +0000 Message-Id: <20220830091453.286285-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: xu xin With the rise of cloud native, more and more container applications are deployed. The network namespace is one of the foundations of the container. The sysctls of error_cost and error_burst are important knobs to control the sending frequency of ICMP_DEST_UNREACH packet for ipv4. When different containers has requirements on the tuning of error_cost and error_burst, for host's security, the sysctls should exist per network namespace. Different netns has different requirements on the setting of error_cost and error_burst, which are related with limiting the frequency of sending ICMP_DEST_UNREACH packets. Enable them to be configured per netns. xu xin (3): ipv4: Namespaceify route/error_cost knob ipv4: Namespaceify route/error_burst knob ipv4: add documentation of two sysctls about icmp Documentation/networking/ip-sysctl.rst | 17 ++++++++++++ include/net/netns/ipv4.h | 2 ++ net/ipv4/route.c | 36 ++++++++++++++------------ 3 files changed, 39 insertions(+), 16 deletions(-) -- 2.25.1