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.0 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 715AEC04AB6 for ; Tue, 28 May 2019 12:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4597B208C3 for ; Tue, 28 May 2019 12:31:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SurLkd+g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727171AbfE1MbY (ORCPT ); Tue, 28 May 2019 08:31:24 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:52569 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727149AbfE1MbW (ORCPT ); Tue, 28 May 2019 08:31:22 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 03A2A2279; Tue, 28 May 2019 08:22:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 28 May 2019 08:22:49 -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= fm2; bh=LHpeJf9QYfFsy9Af/wWimyB89KQ3jUvyzNv+udin13Q=; b=SurLkd+g tYBRF3KmlGMDhPrFQW/smKBzqxd/tRYb87hmwJjWfIdoILXaM5/REFVhptxqRqZ3 4JMzdz+y9k1he+WLCF4v+wwCwvr8iWoXw+YDg5NtbhDkch43gQAWXA6BEEs74JuA SOg9iKoPaqjleBk7mr4MWooq3BmmQBu6wePQKhQ+q99oPTgvHeijE/V2yF/zvzxV B9sa2O8Ng3iW44s99HbsqttEO4UTqfos5iqBdf5BUP6Rq9HbryAEU0R95VWtzc1J 8JY62LLfWbdvNufmPCDg0rY1BSKgL9VJAHQo6p+qkxZJhSy9X+n9WcQhD2JUQpbx 91YA2aD3e3B3Vw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvhedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiugho shgthhdrohhrgheqnecukfhppeduleefrdegjedrudeihedrvdehudenucfrrghrrghmpe hmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrghenucevlhhushhtvghr ufhiiigvpeeg X-ME-Proxy: Received: from splinter.mtl.com (unknown [193.47.165.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 544BB38008A; Tue, 28 May 2019 08:22:46 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, jiri@mellanox.com, mlxsw@mellanox.com, dsahern@gmail.com, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, andy@greyhouse.net, pablo@netfilter.org, jakub.kicinski@netronome.com, pieter.jansenvanvuuren@netronome.com, andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@savoirfairelinux.com, Ido Schimmel Subject: [RFC PATCH net-next 06/12] Documentation: Add description of netdevsim traps Date: Tue, 28 May 2019 15:21:30 +0300 Message-Id: <20190528122136.30476-7-idosch@idosch.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528122136.30476-1-idosch@idosch.org> References: <20190528122136.30476-1-idosch@idosch.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ido Schimmel Signed-off-by: Ido Schimmel --- .../networking/devlink-trap-netdevsim.rst | 20 +++++++++++++++++++ Documentation/networking/devlink-trap.rst | 11 ++++++++++ Documentation/networking/index.rst | 1 + drivers/net/netdevsim/dev.c | 3 +++ 4 files changed, 35 insertions(+) create mode 100644 Documentation/networking/devlink-trap-netdevsim.rst diff --git a/Documentation/networking/devlink-trap-netdevsim.rst b/Documentation/networking/devlink-trap-netdevsim.rst new file mode 100644 index 000000000000..06bb93caa22d --- /dev/null +++ b/Documentation/networking/devlink-trap-netdevsim.rst @@ -0,0 +1,20 @@ +.. SPDX-License-Identifier: GPL-2.0 + +====================== +Devlink Trap netdevsim +====================== + +Driver-specific Traps +===================== + +.. list-table:: List of Driver-specific Traps Registered by ``netdevsim`` + :widths: 5 5 90 + + * - Name + - Type + - Description + * - ``fid_miss_exception`` + - ``exception`` + - When a packet enters the device it is classified to a filtering + indentifier (FID) based on the ingress port and VLAN. This trap is used + to trap packets for which a FID could not be found diff --git a/Documentation/networking/devlink-trap.rst b/Documentation/networking/devlink-trap.rst index 4b3045bc76d1..a015f82421b8 100644 --- a/Documentation/networking/devlink-trap.rst +++ b/Documentation/networking/devlink-trap.rst @@ -163,6 +163,17 @@ be added to the following table: Random Early Detection (RED) queueing discipline to earlydrop the packet +Driver-specific Packet Traps +============================ + +Device drivers can register driver-specific packet traps, but these must be +clearly documented. Such traps can correspond to device-specific exceptions and +help debug packet drops caused by these exceptions. The following list includes +links to the description of driver-specific traps registered by various device +drivers: + + * :doc:`/devlink-trap-netdevsim` + Generic Packet Trap Groups ========================== diff --git a/Documentation/networking/index.rst b/Documentation/networking/index.rst index c09bf85ec050..50fe7f9346ab 100644 --- a/Documentation/networking/index.rst +++ b/Documentation/networking/index.rst @@ -27,6 +27,7 @@ Contents: dsa/index devlink-info-versions devlink-trap + devlink-trap-netdevsim ieee802154 kapi z8530book diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index 0115a1ef1ca3..952764d1f6e6 100644 --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -216,6 +216,9 @@ struct nsim_trap_data { spinlock_t trap_lock; /* Protects trap_items_arr */ }; +/* All driver-specific traps must be documented in + * Documentation/networking/devlink-trap-netdevsim.rst + */ enum { NSIM_TRAP_ID_BASE = DEVLINK_TRAP_GENERIC_ID_MAX, NSIM_TRAP_ID_FID_MISS_EXCEPTION, -- 2.20.1