Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp401502pxb; Thu, 21 Jan 2021 09:41:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyX1h4agbk9ZeFqDTAyqIY2iTT0015bV5QwwnZblrcyK9Kxv7HigU1Ix4EXNfNS28Wfj5N4 X-Received: by 2002:a17:907:9604:: with SMTP id gb4mr418291ejc.474.1611250913790; Thu, 21 Jan 2021 09:41:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611250913; cv=none; d=google.com; s=arc-20160816; b=rHZrhf9nJ1kTGrkBI/bQtVVqdk1r4f/ADMLdu1qJXnUiwhOvODUA2MTNgqIARFy8FD 0O4U31lSsIjEPfuWk/N8krIZq4iceLuhv4YZCwhXwcJQEH1TF/Webk7jDR5yTr7bn4Cd zbH8ixdfmHMa9jVUwrRPtOP2Z0fLeXW7Ygour5wIAr4/AEWz3RyqQuwKO5JqLPqkTL66 m6pYKdiqiKOhMNQGmbR91UKgV38Nd8Ek/pUbZGVpyUjD3eltwyCXrfZAjmS1POkvzfnU YD8Tr86T9mm0czVZW2gbh4buJZJZ4b72VdWFf9+6BXD3ZkjR5o2K9nvuTUwnxMDrAW1/ 3c4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wJEXK299hhRx61nrGehX6boCIjbPsFtX3TAvUVGWfeQ=; b=zDff1MZ9YHrfaKEEqpU5nqMR4fJPkGwKqfaVe9YEKm+Fk7gnS/nOf46oyXNKWaN49A axTrBF5MDeoLBJ4q/etKi4aUe8+WqW79FWKMbfmE2sg1q9F7rrJgaBGTR/CHsObWKxZM AfKgQSABZIRd+zF+AwPOw6+TvDeUNSWAUZsCTD2MXqBPTNNjS6zlYG2ZT8ahSS7XfjBS 0+nKBBbh6HpkvQgPSl97H2tqKIWFyrrVviOf9t4yCENX1MKi2ldM0SWLbXURYkP2G5d6 U1118TCOq6UTBuP0Yp0PcWQlGgU9UeDH0Kmkac5//hnPy0UuTw9hNUFvd2YLxqOvys2Y L8ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hKkYQgi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e26si2454893edr.100.2021.01.21.09.41.28; Thu, 21 Jan 2021 09:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hKkYQgi1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733205AbhAURif (ORCPT + 99 others); Thu, 21 Jan 2021 12:38:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:50472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388679AbhAURgr (ORCPT ); Thu, 21 Jan 2021 12:36:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57BCA2054F; Thu, 21 Jan 2021 17:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611250566; bh=SUbWJDdhLU+zgtx+i13XPDuCNeODLoi77HPQQbQIw88=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hKkYQgi1CgxRQUDimf1IvLf9etZnXlzqVJpbk5gaWg9WYkq2deS4zy+VA9/0Gmlt7 hJtl1Qop9Oy8h+zDcmLbFbH/uUzryaDBs1uDi01WAfPc2f+sXJte7UzHnTDojIHgO2 IPzWgPrv4S6MZoPBnQCKDKIlpWZYQINzQE6MlvJ2rtGLRusxEodGhBdNkbNaW+6SPq o4tS2ECBH2rtA65CfmDwe/w4U4/YpdegXQLesMcjorUaZ1Ba8ps0dHCRUSj2l+rriN 8/LDsbOIW9UgQUVSGKT0hDsEPekC2Xq8Yz3J/NUm4QMQNSxwkLutEqv9HGMPXm7LL9 X2o7P/Cq2yHTg== Date: Thu, 21 Jan 2021 09:36:05 -0800 From: Jakub Kicinski To: Ido Schimmel Cc: Oleksandr Mazur , netdev@vger.kernel.org, jiri@nvidia.com, davem@davemloft.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: core: devlink: add new trap action HARD_DROP Message-ID: <20210121093605.49ba26ba@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210121122152.GA2647590@shredder.lan> References: <20210121112937.30989-1-oleksandr.mazur@plvision.eu> <20210121122152.GA2647590@shredder.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2021 14:21:52 +0200 Ido Schimmel wrote: > On Thu, Jan 21, 2021 at 01:29:37PM +0200, Oleksandr Mazur wrote: > > Add new trap action HARD_DROP, which can be used by the > > drivers to register traps, where it's impossible to get > > packet reported to the devlink subsystem by the device > > driver, because it's impossible to retrieve dropped packet > > from the device itself. > > In order to use this action, driver must also register > > additional devlink operation - callback that is used > > to retrieve number of packets that have been dropped by > > the device. > > Are these global statistics about number of packets the hardware dropped > for a specific reason or are these per-port statistics? > > It's a creative use of devlink-trap interface, but I think it makes > sense. Better to re-use an existing interface than creating yet another > one. Not sure if I agree, if we can't trap why is it a trap? It's just a counter.