From patchwork Thu Nov 19 13:57:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 328979 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, 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 4787BC63798 for ; Thu, 19 Nov 2020 13:57:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 036C2246E0 for ; Thu, 19 Nov 2020 13:57:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727337AbgKSN5w (ORCPT ); Thu, 19 Nov 2020 08:57:52 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:37601 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727153AbgKSN5v (ORCPT ); Thu, 19 Nov 2020 08:57:51 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D7F45CF6; Thu, 19 Nov 2020 08:57:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 19 Nov 2020 08:57:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=YR6YbOZY4IqLLoT/63dZxuEVbr9wewwTRhSgWQexwYU=; b=dJSdHiYu 4+QxDPqEsTdZUDJpLURTmQ0ypA3qvuEjSZM/4+4tJQslYoaFBhXZzwaonRfCeB2m tOoBShZWUGvbc4FAaxHOtVZ09S6xf0XP0sNcjRLB35BsoDPUwEtvfvGVuvV3bdBL Ju5s4pis3A0240QhVgCfKKJe+O2t7adZ1W7+Q4vlRZmlkJ2dma15osWkQnuZj1SK kGHd0g0DmTIdJ7bkuAWGRKst/ZmipGJkClJrqoBjzYTweGmr0KtbfxXqF4LV7vei 8V59M1X/x0w6/GnEU0t7+anyWFe+g+bdaMkKl2o8Hm6EfEQ5UWOzl94CAVEKmi4a hehgVjRUE85s6w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudefjedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiugho shgthhdrohhrgheqnecuggftrfgrthhtvghrnhepudetieevffffveelkeeljeffkefhke ehgfdtffethfelvdejgffghefgveejkefhnecukfhppeekgedrvddvledrudehgedrudeg jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg 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 0C8CA3280063; Thu, 19 Nov 2020 08:57:48 -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 1/2] ip route: Print "trap" nexthop indication Date: Thu, 19 Nov 2020 15:57:30 +0200 Message-Id: <20201119135731.410986-2-idosch@idosch.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201119135731.410986-1-idosch@idosch.org> References: <20201119135731.410986-1-idosch@idosch.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel The kernel can now signal that a nexthop is trapping packets instead of forwarding them. Print the flag to help users understand the offload state of each nexthop. Signed-off-by: Ido Schimmel --- ip/iproute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ip/iproute.c b/ip/iproute.c index 05ec2c296579..ebb5f160fc44 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -362,6 +362,8 @@ void print_rt_flags(FILE *fp, unsigned int flags) print_string(PRINT_ANY, NULL, "%s ", "pervasive"); if (flags & RTNH_F_OFFLOAD) print_string(PRINT_ANY, NULL, "%s ", "offload"); + if (flags & RTNH_F_TRAP) + print_string(PRINT_ANY, NULL, "%s ", "trap"); if (flags & RTM_F_NOTIFY) print_string(PRINT_ANY, NULL, "%s ", "notify"); if (flags & RTNH_F_LINKDOWN)