diff options
author | Pedro Tammela <pctammela@mojatatu.com> | 2023-12-11 15:18:07 -0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-12-13 17:53:59 -0800 |
commit | 1dd7f18fc0ed75dad4d5f2ecc84f69c6b62b6a81 (patch) | |
tree | 3bcb7f6743ab4f3148203d01aa9bc4d02f48110a /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 4b55e86736d5b492cf689125da2600f59c7d2c39 (diff) |
net/sched: act_api: skip idr replace on bound actions
tcf_idr_insert_many will replace the allocated -EBUSY pointer in
tcf_idr_check_alloc with the real action pointer, exposing it
to all operations. This operation is only needed when the action pointer
is created (ACT_P_CREATED). For actions which are bound to (returned 0),
the pointer already resides in the idr making such operation a nop.
Even though it's a nop, it's still not a cheap operation as internally
the idr code walks the idr and then does a replace on the appropriate slot.
So if the action was bound, better skip the idr replace entirely.
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Link: https://lore.kernel.org/r/20231211181807.96028-3-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions