diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-26 01:00:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-26 05:23:08 +0300 |
commit | 9ab88e83fd1e07f18990dc12b8960638a64c02ef (patch) | |
tree | 7967c0198c76d50083b909bd7d88c019ecb98d31 /drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | |
parent | 2a84bbafc0310cba96dcac172cd87c4f46c5b1e3 (diff) | |
download | linux-9ab88e83fd1e07f18990dc12b8960638a64c02ef.tar.xz |
mlx5: use tc_cls_can_offload_and_chain0()
Make use of tc_cls_can_offload_and_chain0() to set extack msg in case
ethtool tc offload flag is not set or chain unsupported.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rep.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 10fa6a18fcf9..363d8dcb7f17 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -719,9 +719,6 @@ static int mlx5e_rep_setup_tc_cls_flower(struct mlx5e_priv *priv, struct tc_cls_flower_offload *cls_flower) { - if (cls_flower->common.chain_index) - return -EOPNOTSUPP; - switch (cls_flower->command) { case TC_CLSFLOWER_REPLACE: return mlx5e_configure_flower(priv, cls_flower); @@ -739,7 +736,7 @@ static int mlx5e_rep_setup_tc_cb(enum tc_setup_type type, void *type_data, { struct mlx5e_priv *priv = cb_priv; - if (!tc_can_offload(priv->netdev)) + if (!tc_cls_can_offload_and_chain0(priv->netdev, type_data)) return -EOPNOTSUPP; switch (type) { |