netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Petr Machata <petrm@nvidia.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next v3 1/3] netdevsim: Introduce support for L3 offload xstats
Date: Mon, 14 Mar 2022 16:37:29 +0200	[thread overview]
Message-ID: <Yi9TKbmuhj0xtyuT@shredder> (raw)
In-Reply-To: <fa28d4ff7f55fec4928990850dc1abf8fac3eb45.1647265833.git.petrm@nvidia.com>

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 <petrm@nvidia.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  reply	other threads:[~2022-03-14 14:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 14:01 [PATCH net-next v3 0/3] netdevsim: Support for L3 HW stats Petr Machata
2022-03-14 14:01 ` [PATCH net-next v3 1/3] netdevsim: Introduce support for L3 offload xstats Petr Machata
2022-03-14 14:37   ` Ido Schimmel [this message]
2022-03-15  5:31   ` Jakub Kicinski
2022-03-14 14:01 ` [PATCH net-next v3 2/3] selftests: netdevsim: hw_stats_l3: Add a new test Petr Machata
2022-03-14 14:01 ` [PATCH net-next v3 3/3] selftests: mlxsw: " Petr Machata
2022-03-15 14:50 ` [PATCH net-next v3 0/3] netdevsim: Support for L3 HW stats patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yi9TKbmuhj0xtyuT@shredder \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).