Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2041959pxb; Fri, 29 Jan 2021 11:25:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAFNIxKwwZ5HjZpAggXzoOdTnavXZTfwk2YVNqiNFYwaZ7haIvBzvxIipXcO6Vqy9TS95o X-Received: by 2002:a50:c8c3:: with SMTP id k3mr6945671edh.302.1611948308503; Fri, 29 Jan 2021 11:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611948308; cv=none; d=google.com; s=arc-20160816; b=m3iNoxE4fZlRavp3FZktE5rtsEf+At+Jc7Eu9whEvn+ZAVLoIq7YcgXLrymoYmMRbh GmE1z7vpAQvnXcqPW2eYF70dcH5RNvIRrRhKSYixjWlGMOzU7IJWZF6N9Q2Tr+bY6uAh fqTTD8KdXgzd4md4Ac24ctrhvt8COwnA2fwbyYzwZncty0k9M1gpJpSL/MS2Vkuk064J TkpIxigzeTm33U09Af/t+tk11lQMi+ihOajzd0ej+WEGfoHwN/mJaPhxyuXyZBsNVsNs HsnTfOlk+UNYYfEBZ/laOOmz8Pr6i2W20jS1j92AtwuLvzZYB90qX56oBKigsvm9ohm6 IQuw== 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=O/4/5xStTVhB09dZzUPATm/iYIQK7aJRN7BiQy4vu54=; b=eGGtpPhY0Dc+9phoZIPkvbhP+esa4BR36eFcDTlBn32oeyfpAaKG7A76dDMmm/hfpR 1JrLAg8yMaNlrlRkPNNxu5mPuHK4MXFwo8TUdWPO36fm9rJlf+HSGoj+6SOl05CkgzKD oubXrnuKDHQoOTrGsyFNmo0fUGtczzzrGNrskUOHExrA1lhJnwfaiCqwnE8EIXUPzU/r nSSUTsJbax+VqxEqy5C6z0WrX5Kj4bnVRHli4PXOv8mE6m1hRTFpIzjfk2BoljJZvF8+ NmEeGXuDW07hQqk1dJV2A8fvxH5K9JKDS/XIm/JeTPV68V1Ynuu6YzRNgUwADSJdE+YS IULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MJj609qn; 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 i4si5687808edq.149.2021.01.29.11.24.43; Fri, 29 Jan 2021 11:25:08 -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=MJj609qn; 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 S232949AbhA2TWl (ORCPT + 99 others); Fri, 29 Jan 2021 14:22:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:52518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233100AbhA2TUT (ORCPT ); Fri, 29 Jan 2021 14:20:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2022164DE3; Fri, 29 Jan 2021 19:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611947978; bh=Iei5nYM93WgnIp3b94zKZr/0qgpe3BbzHPtZ0tL13gY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MJj609qnUJkMZd09J6FxiAwBYUTpQ2gUT2+sp04RzhSEXb5IuR83ELVBz0LBZx76u iJ0ZHR3qqGDS3xcaqSr8DjO+oDySL1EO0JiRAd8HH/iaqazYCXKJvO1t2cCetAc/LH DHkxTAHIJl7zJKPD5HRwnIMWQThxeZkkZ4a0ViFvCnpFkw416BH79z77LY9Lc3LQJQ AFlPoa0lt98V4Vpf8D+5rPxFFnE0/tQBjJ0yEY/hv4eqtNUFfnfro+KKEgiBM9T5ko VpCrJ2gBLuwqFRZtGRTtwWtbek6fvZXCUGm1OGOQsBPLz9iTbZ73grOOsOfO43xJyC JCZmE4+jRXPNQ== Date: Fri, 29 Jan 2021 11:19:37 -0800 From: Jakub Kicinski To: Oleksandr Mazur Cc: "netdev@vger.kernel.org" , "jiri@nvidia.com" , "davem@davemloft.net" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action Message-ID: <20210129111937.4e7e17d0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20210125123856.1746-1-oleksandr.mazur@plvision.eu> <20210125132317.418a4e35@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> 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 Fri, 29 Jan 2021 11:15:43 +0000 Oleksandr Mazur wrote: > > Thinking about it again - if the action can be changed wouldn't it > > be best for the user to actually get a "HW condition hit" counter, > > which would increment regardless of SW config (incl. policers)? > > > Otherwise if admin logs onto the box and temporarily enables a trap > > for debug this count would disappear. > > But still this counter makes sense only for 'drop' action. Okay, well, "dropped while trap was disabled" seems a lot less useful of a definition than "number of times this trap would trigger" but if that's all the HW can provide then it is what it is. Does the HW also count packets dropped because of overload / overflow or some other event, or purely dropped because disabled?