]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'tc_action_ops-refactor'
authorDavid S. Miller <davem@davemloft.net>
Fri, 9 Sep 2022 07:24:43 +0000 (08:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Sep 2022 07:24:43 +0000 (08:24 +0100)
commit5c887c100132425c41d58523266858e56a3b3972
tree0d488fb3dfe110208028de199280cd09c9c91667
parent4070896c7080e9ef9f6f3ccb91a163023240efa0
parent033c2a73e222fb184b8fd21157079651d33d1849
Merge branch 'tc_action_ops-refactor'

Zhengchao Shao says:

====================
net: refactor the walk and lookup hook functions in tc_action_ops

The implementation logic of the walk/lookup hook function in each action
module is the same. Therefore, the two functions can be reconstructed.
When registering tc_action_ops of each action module, the corresponding
net_id is saved to tc_action_ops. In this way, the net_id of the
corresponding module can be directly obtained in act_api without executing
the specific walk and lookup hook functions. Then, generic functions can
be added to replace the walk and lookup hook functions of each action
module. Last, modify each action module in alphabetical order.

Reserve the walk and lookup interfaces and delete them when they are no
longer used.

This patchset has been tested by using TDC, and I will add selftest in
other patchset.

Last, thanks to Jamal Hadi Salim and Cong Wang for their advice.
---
v3: remove hole from the structure tc_action_ops
v2: save the net_id of each TC action module to the tc_action_ops structure
====================

Signed-off-by: David S. Miller <davem@davemloft.net>