Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2763901pxb; Sat, 6 Feb 2021 07:03:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjwiBgrutCEN9m5pmr2Ay2vyxyhUvPbJK/MZcNziihUozxKwv+7dQ7UuderZ4xYU4MQWT2 X-Received: by 2002:a17:906:30cd:: with SMTP id b13mr9183247ejb.336.1612623802732; Sat, 06 Feb 2021 07:03:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612623802; cv=none; d=google.com; s=arc-20160816; b=aPr5Nf2iHHFRGj3YACc1Qww9gb2MoVEc44s4tgWKYO3CE84G0ZBbuISRvYOUQdlrV/ JSLwxZ+g2z7L6yNjgYi+XZGTXLj2yvxasOM0PJ7Qp5l5Zjtvu9dnR+jl8q6xgYd/luyt m9lw5H9AVbc8/XIoK/i7uHBcF30C67Fonm1veCGCbL1m/aB510yCFxiLDQw8TY1R38CY tontvcNovby+dmU6VWAAV2E1sJGt/fwYW4cCNx5Kaq6W4A0zdFGiBu56tD8zuoZsFRxR kUVvN6riA9Jivz9rX4FolEnjmAmcNYdZWj1NMr/bHZwKGebVpui3EGlYjtvMaxOJqYF+ YInQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=URCcobkKqLQS8W4sYgpUBzUkJgYtByBgc9tcfcd07v0=; b=emctjlbJLDv+Nmd3QPdyctrRyUr2sBxIWx2k6ihygHx8r6Cr52hhZFVrhGSfYBlOOm Lp/EDajmNWe/NUPqdGCHTfn6ZNb9Zyv0IT3CUpczRttKIMu03oqLnZ2XHEQaeD9f64Gw l+Fddikh3en2/w4G77k+AahZm28XZCXoUBSJkyPhqQwW/h5Irmvmx5wZ4PbX6vTRRNzg rI65uJ3ywtSQ72CFQFvBPFdvvQ2Iz/7sUCGXRCq34UVxBLlLI6o+YKWYyy8KuX/bNv1A aWf0GW/AhDR49KHof9F2Io7fnDh+xpLYE8dHbKiADmalOVqlTOD188hVDGiRQawgp80k 2P5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TIKzHWC1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si1133516edr.426.2021.02.06.07.02.57; Sat, 06 Feb 2021 07:03:22 -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=@messagingengine.com header.s=fm2 header.b=TIKzHWC1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbhBFO7C (ORCPT + 99 others); Sat, 6 Feb 2021 09:59:02 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41211 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbhBFO64 (ORCPT ); Sat, 6 Feb 2021 09:58:56 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 602635C00F7; Sat, 6 Feb 2021 09:58:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 06 Feb 2021 09:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type: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=URCcob kKqLQS8W4sYgpUBzUkJgYtByBgc9tcfcd07v0=; b=TIKzHWC1Ab6ufIkjz0yP2d JCyooGGwVBylTDyRcOXLCOBilLXmb+WeelKPOYnDwaeoQKXDCiHW1s9Y8bCi97YE Hl7uPSHttRWGQ9yOwb4RhwDHeoPwxFIj7YB7Z4JOZmitM961S3cL4+3DozVJMpy9 5Dm9pRcb6LcfOnPNMgI/yfv/5Uk+l6UQ+x3PBQgtLkxeXLosDEbgThodzCLce629 QySe9gVF9XT93dqzjDEbW53gvt359xAMgNma4gf67XxNJ1zFC4ygoozk2JgiT4FO W6QcO3sILcoRZ/GQs4kvTkvl5bZvxEEguEya5SQoMK3WNPfm4D4Hn8zl7JWct/oA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeekgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcuufgt hhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrthhtvg hrnheptdffkeekfeduffevgeeujeffjefhtefgueeugfevtdeiheduueeukefhudehleet necukfhppeekgedrvddvledrudehfedrgeegnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from localhost (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id DA4C11080057; Sat, 6 Feb 2021 09:58:07 -0500 (EST) Date: Sat, 6 Feb 2021 16:58:04 +0200 From: Ido Schimmel To: Oleksandr Mazur Cc: netdev@vger.kernel.org, jiri@nvidia.com, davem@davemloft.net, linux-kernel@vger.kernel.org, kuba@kernel.org Subject: Re: [RFC v5 net-next] net: core: devlink: add 'dropped' stats field for traps Message-ID: <20210206145804.GA3847855@shredder.lan> References: <20210204114122.32644-1-oleksandr.mazur@plvision.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210204114122.32644-1-oleksandr.mazur@plvision.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 01:41:22PM +0200, Oleksandr Mazur wrote: > Whenever query statistics is issued for trap, devlink subsystem > would also fill-in statistics 'dropped' field. This field indicates > the number of packets HW dropped and failed to report to the device driver, > and thus - to the devlink subsystem itself. > In case if device driver didn't register callback for hard drop > statistics querying, 'dropped' field will be omitted and not filled. > Add trap_drop_counter_get callback implementation to the netdevsim. > Add new test cases for netdevsim, to test both the callback > functionality, as well as drop statistics alteration check. > > Signed-off-by: Oleksandr Mazur Code looks fine to me, but for non-RFC submission (with actual hw implementation), you probably want to split it into three patches: devlink, netdevsim, selftest.