From patchwork Thu Nov 19 13:57:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 11917487 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 C4EA0C63697 for ; Thu, 19 Nov 2020 13:57:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 747D5246E0 for ; Thu, 19 Nov 2020 13:57:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727312AbgKSN5u (ORCPT ); Thu, 19 Nov 2020 08:57:50 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:49105 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727153AbgKSN5u (ORCPT ); Thu, 19 Nov 2020 08:57:50 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6251BD92; Thu, 19 Nov 2020 08:57:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 19 Nov 2020 08:57:49 -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=fm1; bh=kK3k/kivX3hPB93hu LGDjTpt/V8delhwB0uYB+CUX5c=; b=HOVKyEQ4bUSlgUJrq9Dp+LdgNmmZEsXZI Hhrhp481SJdNZQGQwB5Dq+l3bNBBY8P1zjwwrrxl7NxmhMD+SPwomdrUPPqHXGNd dQv9e2GWnJ8mP3mDPhaJRywHE/W2n7SAEK2+c0FfLhoQG7F0+W4Zdv57NyO61BM8 2/icxzWiHkyMElG6AlloaZRbGJxy1rAYkfhTbhmQPflsi131cRbd7lTIEPCxz0FO SIm5EF9nQZwb0uZOgJpIODc9BuH/nA63FFiFbTwuH8dB18lAXqaO40B8oCljMa7q mhWduujCb7DIXcAJeW6YMQfnOthojv3G4LOeeQsGoOAjc9cHtnJNQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudefjedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecukfhppeekgedrvddvledrudehgedrudegjeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiughosh gthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from shredder.lan (igld-84-229-154-147.inter.net.il [84.229.154.147]) by mail.messagingengine.com (Postfix) with ESMTPA id 5BCD7328005A; Thu, 19 Nov 2020 08:57:47 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: dsahern@gmail.com, roopa@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH iproute2-next 0/2] ip: Nexthop flags extensions Date: Thu, 19 Nov 2020 15:57:29 +0200 Message-Id: <20201119135731.410986-1-idosch@idosch.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com From: Ido Schimmel Patch #1 prints the recently added 'RTNH_F_TRAP' flag. Patch #2 makes sure that nexthop flags are always printed for nexthop objects. Even when the nexthop does not have a device, such as a blackhole nexthop or a group. Example output with netdevsim: # ip nexthop id 1 via 192.0.2.2 dev eth0 scope link trap id 2 blackhole trap id 3 group 2 trap Example output with mlxsw: # ip nexthop id 1 via 192.0.2.2 dev swp3 scope link offload id 2 blackhole offload id 3 group 2 offload Tested with fib_nexthops.sh that uses "ip nexthop" output: Tests passed: 164 Tests failed: 0 Ido Schimmel (2): ip route: Print "trap" nexthop indication nexthop: Always print nexthop flags ip/ipnexthop.c | 3 +-- ip/iproute.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-)