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: 1304658 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=idosch.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=AZGomvwW; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49fqWV1VYlz9sRh for ; Sun, 7 Jun 2020 18:37:26 +1000 (AEST) 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 ""; }