From patchwork Sun Feb 28 14:26:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12108207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCB24C433E0 for ; Sun, 28 Feb 2021 14:28:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EE9A64D99 for ; Sun, 28 Feb 2021 14:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbhB1O2O (ORCPT ); Sun, 28 Feb 2021 09:28:14 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53237 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbhB1O2N (ORCPT ); Sun, 28 Feb 2021 09:28:13 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E276D5C00D5; Sun, 28 Feb 2021 09:27:27 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 28 Feb 2021 09:27:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6rhtoj4jE6ms6ente rRzquM4Zn7AtjtustgyHbybfJs=; b=hTzLf+1JsyDc1AhCWqSgNFqH+8Rb0gDcj f9OMsS51K428nI0EwHD7khMlCwV+/idJe2VwKTJLdUo5TXJ+qphrmCJBAWwvKYpp 4bgd0QZCruhwM/Hx1glOO9oFC/LCUPslJ53DwxDMDDWln81Q+gEf6VLOa3b9mMtC k5+eEUQEWZXo3raKmXjqKOjClv6zhQDvXW7V09f+G6TGyQivGtS8NaNMG92BSPuu 4rGmyJQeyivb5Wfz5r8ieSBndMu4htAHnywk9LDiEPiEkjICaVCxC6GTryWrsPQ6 l3E5OewHxmey0u/J5+Fz727odH4Tt0NT0iKukSDf4jKdOoolQmvPQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleeigdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghh rdhorhhgqeenucggtffrrghtthgvrhhnpeetveeghfevgffgffekueffuedvhfeuheehte ffieekgeehveefvdegledvffduhfenucfkphepkeegrddvvdelrdduheefrdeggeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthh esihguohhstghhrdhorhhg X-ME-Proxy: Received: from shredder.lan (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 5BF031080054; Sun, 28 Feb 2021 09:27:25 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, dsahern@gmail.com, roopa@nvidia.com, sharpd@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [RFC PATCH net 0/2] nexthop: Do not flush blackhole nexthops when loopback goes down Date: Sun, 28 Feb 2021 16:26:11 +0200 Message-Id: <20210228142613.1642938-1-idosch@idosch.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC From: Ido Schimmel Patch #1 prevents blackhole nexthops from being flushed when the loopback device goes down given that as far as user space is concerned, these nexthops do not have a nexthop device. Patch #2 adds a test case. This is a user visible change, so sending as RFC. Personally, I think it is worth making the change. The flow is quite obscure and therefore unlikely to result in any regressions, especially when the nexthop API is quite new compared to the legacy API. In addition, the current behavior is very puzzling to those not familiar with the inner workings of the nexthop code. Regardless, there are no regressions in fib_nexthops.sh with this change: # ./fib_nexthops.sh ... Tests passed: 165 Tests failed: 0 Ido Schimmel (2): nexthop: Do not flush blackhole nexthops when loopback goes down selftests: fib_nexthops: Test blackhole nexthops when loopback goes down net/ipv4/nexthop.c | 10 +++++++--- tools/testing/selftests/net/fib_nexthops.sh | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-)