[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200330161648.4fb4eb9c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 30 Mar 2020 16:16:48 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ido Schimmel <idosch@...sch.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, jiri@...lanox.com,
roopa@...ulusnetworks.com, nikolay@...ulusnetworks.com,
andrew@...n.ch, f.fainelli@...il.com, vivien.didelot@...il.com,
mlxsw@...lanox.com, Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net-next v3 01/15] devlink: Add packet trap policers
support
On Mon, 30 Mar 2020 22:38:18 +0300 Ido Schimmel wrote:
> From: Ido Schimmel <idosch@...lanox.com>
>
> Devices capable of offloading the kernel's datapath and perform
> functions such as bridging and routing must also be able to send (trap)
> specific packets to the kernel (i.e., the CPU) for processing.
>
> For example, a device acting as a multicast-aware bridge must be able to
> trap IGMP membership reports to the kernel for processing by the bridge
> module.
>
> In most cases, the underlying device is capable of handling packet rates
> that are several orders of magnitude higher compared to those that can
> be handled by the CPU.
>
> Therefore, in order to prevent the underlying device from overwhelming
> the CPU, devices usually include packet trap policers that are able to
> police the trapped packets to rates that can be handled by the CPU.
>
> This patch allows capable device drivers to register their supported
> packet trap policers with devlink. User space can then tune the
> parameters of these policer (currently, rate and burst size) and read
> from the device the number of packets that were dropped by the policer,
> if supported.
>
> Subsequent patches in the series will allow device drivers to create
> default binding between these policers and packet trap groups and allow
> user space to change the binding.
>
> v2:
> * Add 'strict_start_type' in devlink policy
> * Have device drivers provide max/min rate/burst size for each policer.
> Use them to check validity of user provided parameters
>
> Signed-off-by: Ido Schimmel <idosch@...lanox.com>
> Reviewed-by: Jiri Pirko <jiri@...lanox.com>
Reviewed-by: Jakub Kicinski <kuba@...nel.org>
Powered by blists - more mailing lists