提交 f8f4bef3 编写于 作者: O Or Gerlitz 提交者: David S. Miller

net : sched: cls_api: deal with egdev path only if needed

When dealing with ingress rule on a netdev, if we did fine through the
conventional path, there's no need to continue into the egdev route,
and we can stop right there.

Not doing so may cause a 2nd rule to be added by the cls api layer
with the ingress being the egdev.

For example, under sriov switchdev scheme, a user rule of VFR A --> VFR B
will end up with two HW rules (1) VF A --> VF B and (2) uplink --> VF B

Fixes: 208c0f4b ('net: sched: use tc_setup_cb_call to call per-block callbacks')
Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1b15ad68
...@@ -1588,7 +1588,7 @@ int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts, ...@@ -1588,7 +1588,7 @@ int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts,
return ret; return ret;
ok_count = ret; ok_count = ret;
if (!exts) if (!exts || ok_count)
return ok_count; return ok_count;
ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop); ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册