diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2018-05-23 12:24:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-24 22:12:22 -0400 |
commit | f8f4bef322e4600c5856911c7a632c0e3da920d6 (patch) | |
tree | e732d0ffc941623cfde00b250bc40b99be25ec5d /net | |
parent | 1b15ad683ab42a203f98b67045b40720e99d0e9a (diff) |
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: 208c0f4b5237 ('net: sched: use tc_setup_cb_call to call per-block callbacks')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/cls_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 963e4bf0aab8..a57e112d9b3e 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -1588,7 +1588,7 @@ int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts, | |||
1588 | return ret; | 1588 | return ret; |
1589 | ok_count = ret; | 1589 | ok_count = ret; |
1590 | 1590 | ||
1591 | if (!exts) | 1591 | if (!exts || ok_count) |
1592 | return ok_count; | 1592 | return ok_count; |
1593 | ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop); | 1593 | ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop); |
1594 | if (ret < 0) | 1594 | if (ret < 0) |