[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0P190MB07380476D3B89CDB50BA4151E4BC0@AM0P190MB0738.EURP190.PROD.OUTLOOK.COM>
Date: Tue, 26 Jan 2021 10:10:06 +0000
From: Oleksandr Mazur <oleksandr.mazur@...ision.eu>
To: Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"jiri@...dia.com" <jiri@...dia.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field
for DROP trap action
On Mon, 25 Jan 2021 14:38:56 +0200 Oleksandr Mazur wrote:
> + if (trap_item->action == DEVLINK_TRAP_ACTION_DROP &&
> + devlink->ops->trap_drop_counter_get) {
> + err = devlink->ops->trap_drop_counter_get(devlink,
> + trap_item->trap,
> + &drops);
> + if (err)
> + return err;
> + }
> Why only report this counter when action is set to drop?
> 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.
Okay, so should it become like generic HW counter - trap_hw_counter_get?
Powered by blists - more mailing lists