]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mlxsw: spectrum: qdiscs: Create a generic replace function
authorNogah Frankel <nogahf@mellanox.com>
Wed, 10 Jan 2018 14:00:06 +0000 (15:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jan 2018 21:07:41 +0000 (16:07 -0500)
commit9cf6c9c7585446f1a532d218ae9be8653f4d7a82
tree39671714b74a8475a0b41621efb09412501669c7
parent9a37a59f715256cea75cbdbcacd21e9e9dd4b72f
mlxsw: spectrum: qdiscs: Create a generic replace function

Create a generic qdisc replace function.
For that goal, add three functions to the qdisc ops struct:
* check_params: Checks if the given parameters are offloadable.
* replace: Offload the given parameters.
* clean_stats: clean the qdisc stats for the offloaded qdisc.
integrate RED offloading into using the new internal replace API.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c