From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 4D061C433E0 for ; Sat, 6 Feb 2021 14:59:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10BD264EC5 for ; Sat, 6 Feb 2021 14:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230244AbhBFO7D (ORCPT ); Sat, 6 Feb 2021 09:59:03 -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: netdev@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.