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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10D42C433F5 for ; Mon, 14 Mar 2022 14:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238929AbiCNOip (ORCPT ); Mon, 14 Mar 2022 10:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbiCNOio (ORCPT ); Mon, 14 Mar 2022 10:38:44 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03453C72E for ; Mon, 14 Mar 2022 07:37:34 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 4D6313201F88; Mon, 14 Mar 2022 10:37:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 14 Mar 2022 10:37:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+GFG3cE3D/a0UsXuZ kCeLugMB13nfXbEphP6aX9s3z8=; b=DQjc7YxRUPovuTv7A+xYYvMBMP9nHyowI SX/U4E7soQ0xDUev0xp4kopZiI1UUYfBaLS8BOTnYOdj5p/lVk1QT1BzTwPyfmx8 NJDCpkmA2vVysjLgDKGoRzn5RqjmkkmlpAOYlN0QcRxsdwsqO7kPLoXEyTL+bqKR xy2yKEiKtSKMpOSp2jHUiZKxiG27vKilsCDFzb6cQV5y3sKzM0Djzeqhks7i00jf K6pblB72gpySKVIzGRBgTz/+gQupGwn/OGhTPIMnwnJ1eUM3ikFwwG9LxopP/Pqg Qb2aYU0ME42TYtvAo+JCcxsqTwzdIKkJY4svhLd73XIdCmfPXf1qQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddvkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Mar 2022 10:37:31 -0400 (EDT) Date: Mon, 14 Mar 2022 16:37:29 +0200 From: Ido Schimmel To: Petr Machata Cc: netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Ido Schimmel Subject: Re: [PATCH net-next v3 1/3] netdevsim: Introduce support for L3 offload xstats Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Mar 14, 2022 at 03:01:15PM +0100, Petr Machata wrote: > Add support for testing of HW stats support that was added recently, namely > the L3 stats support. L3 stats are provided for devices for which the L3 > stats have been turned on, and that were enabled for netdevsim through a > debugfs toggle: > > # echo $ifindex > /sys/kernel/debug/netdevsim/$DEV/hwstats/l3/enable_ifindex > > For fully enabled netdevices, netdevsim counts 10pps of ingress traffic and > 20pps of egress traffic. Similarly, L3 stats can be disabled for a given > device, and netdevsim ceases pretending there is any HW traffic going on: > > # echo $ifindex > /sys/kernel/debug/netdevsim/$DEV/hwstats/l3/disable_ifindex > > Besides this, there is a third toggle to mark a device for future failure: > > # echo $ifindex > /sys/kernel/debug/netdevsim/$DEV/hwstats/l3/fail_next_enable > > A future request to enable L3 stats on such netdevice will be bounced by > netdevsim: > > # ip -j l sh dev d | jq '.[].ifindex' > 66 > # echo 66 > /sys/kernel/debug/netdevsim/netdevsim10/hwstats/l3/enable_ifindex > # echo 66 > /sys/kernel/debug/netdevsim/netdevsim10/hwstats/l3/fail_next_enable > # ip stats set dev d l3_stats on > Error: netdevsim: Stats enablement set to fail. > > Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel