summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
diff options
context:
space:
mode:
authorNogah Frankel <nogahf@mellanox.com>2017-11-06 07:23:45 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-08 12:23:38 +0900
commit96f17e0776c285b7373bdccbfc7300dbeac3878c (patch)
tree8d63f100438042f5e8f2115334f626dd4d0a0722 /drivers/net/ethernet/mellanox/mlxsw/spectrum.c
parentad53fa06c126d2d739563802cc412cdcc9c32e63 (diff)
downloadlwn-96f17e0776c285b7373bdccbfc7300dbeac3878c.tar.gz
lwn-96f17e0776c285b7373bdccbfc7300dbeac3878c.zip
mlxsw: spectrum: Support RED qdisc offload
Add support for ndo_setup_tc with enum tc_setup_type value of TC_SETUP_RED. This call sets RED qdisc on a traffic class. This patch supports RED qdisc only as a root qdisc and set in on the default tclass. It can be set with or without ECN. Signed-off-by: Yuval Mintz <yuvalm@mellanox.com> Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 63e50877796b..e42b3e7bd588 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -1797,6 +1797,8 @@ static int mlxsw_sp_setup_tc(struct net_device *dev, enum tc_setup_type type,
switch (type) {
case TC_SETUP_BLOCK:
return mlxsw_sp_setup_tc_block(mlxsw_sp_port, type_data);
+ case TC_SETUP_QDISC_RED:
+ return mlxsw_sp_setup_tc_red(mlxsw_sp_port, type_data);
default:
return -EOPNOTSUPP;
}