From patchwork Sun Jun 7 08:36:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 217962 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 520D1C433DF for ; Sun, 7 Jun 2020 08:37:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C05920663 for ; Sun, 7 Jun 2020 08:37:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="AZGomvwW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgFGIhV (ORCPT ); Sun, 7 Jun 2020 04:37:21 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38137 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbgFGIhU (ORCPT ); Sun, 7 Jun 2020 04:37:20 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3C3D85C00A9; Sun, 7 Jun 2020 04:37:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sun, 07 Jun 2020 04:37:19 -0400 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= fm3; bh=MIs+5qkZvBWBhbhVfsQUMMCEM4REDFnZoBmJ5PoHGHE=; b=AZGomvwW 3NkKWyLCsav6UZQOY2ahVNqa8QahxYHrn6sKG7eKJ2AqVxaZSLkRNwxyB7Q3IxzA ffqRXVCLdV0HPMbd4fNbf/71KBfJepW11sDOl+Q+Coy/BGuMh9Ckw3xS3Ih681WT 2XLAxOWftnk1u6FGXSdqUgvEW+VW3YTj82+glEn7TugVngIxFzgxg6dCzJ0LlDeo rzSkXqCsPZX2IwLZE6sYoX7QYK7tub+1UQPEr/COXmYHtkF193BINpCgAbLgdoQL ccY7Ncw4FOyGDmP+1RhMDJ1ubkniv047ENW/rSfplZ8PDgAjgWYRYVxqE+VwKN7b iYBnTxpzWC2jVQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudegledgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiugho shgthhdrohhrgheqnecuggftrfgrthhtvghrnhepudetieevffffveelkeeljeffkefhke ehgfdtffethfelvdejgffghefgveejkefhnecukfhppeejledrudejkedrgeehrddvvdef necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguoh hstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from splinter.mtl.com (bzq-79-178-45-223.red.bezeqint.net [79.178.45.223]) by mail.messagingengine.com (Postfix) with ESMTPA id F172B3280059; Sun, 7 Jun 2020 04:37:17 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: stephen@networkplumber.org, dsahern@gmail.com, jiri@mellanox.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH iproute2 1/2] devlink: Add 'control' trap type Date: Sun, 7 Jun 2020 11:36:46 +0300 Message-Id: <20200607083647.2022510-2-idosch@idosch.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200607083647.2022510-1-idosch@idosch.org> References: <20200607083647.2022510-1-idosch@idosch.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel This type is used for traps that trap control packets such as ARP request and IGMP query to the CPU. Example: # devlink -jp trap show netdevsim/netdevsim10 trap igmp_v1_report { "trap": { "netdevsim/netdevsim10": [ { "name": "igmp_v1_report", "type": "control", "generic": true, "action": "trap", "group": "mc_snooping" } ] } } Signed-off-by: Ido Schimmel --- devlink/devlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devlink/devlink.c b/devlink/devlink.c index 507972c360a7..f06e7c2a0a29 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -7073,6 +7073,8 @@ static const char *trap_type_name(uint8_t type) return "drop"; case DEVLINK_TRAP_TYPE_EXCEPTION: return "exception"; + case DEVLINK_TRAP_TYPE_CONTROL: + return "control"; default: return ""; }