projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0d8637
)
mlxsw: use tc_cls_can_offload_and_chain0()
author
Jakub Kicinski
<
[email protected]
>
Thu, 25 Jan 2018 22:00:51 +0000
(14:00 -0800)
committer
David S. Miller
<
[email protected]
>
Fri, 26 Jan 2018 02:23:09 +0000
(21:23 -0500)
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 <
[email protected]
>
Reviewed-by: Simon Horman <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 833cd0a96fd9d20581175a4d01f88fa43a5f9cc1..3dcc58d615067e5c61a4d646870205e6386eec76 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@
-1738,9
+1738,6
@@
static int mlxsw_sp_setup_tc_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
struct tc_cls_matchall_offload *f,
bool ingress)
{
- if (f->common.chain_index)
- return -EOPNOTSUPP;
-
switch (f->command) {
case TC_CLSMATCHALL_REPLACE:
return mlxsw_sp_port_add_cls_matchall(mlxsw_sp_port, f,
@@
-1780,7
+1777,8
@@
static int mlxsw_sp_setup_tc_block_cb_matchall(enum tc_setup_type type,
switch (type) {
case TC_SETUP_CLSMATCHALL:
- if (!tc_can_offload(mlxsw_sp_port->dev))
+ if (!tc_cls_can_offload_and_chain0(mlxsw_sp_port->dev,
+ type_data))
return -EOPNOTSUPP;
return mlxsw_sp_setup_tc_cls_matchall(mlxsw_sp_port, type_data,