summaryrefslogtreecommitdiff
path: root/include/net/act_api.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2022-09-09 10:24:43 +0300
committerDavid S. Miller <davem@davemloft.net>2022-09-09 10:24:43 +0300
commit34df6a8a50aa72c4ac4fd65033a2798fc321adf8 (patch)
tree0d488fb3dfe110208028de199280cd09c9c91667 /include/net/act_api.h
parentdd14043af7b86238a4dc3280acf635eb43ea9851 (diff)
parent6d13a65d2a674c1cf4e70863394c01e4d07372e8 (diff)
downloadlinux-34df6a8a50aa72c4ac4fd65033a2798fc321adf8.tar.xz
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>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r--include/net/act_api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 9cf6870b526e..61f2ceb3939e 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -111,6 +111,7 @@ struct tc_action_ops {
struct list_head head;
char kind[IFNAMSIZ];
enum tca_id id; /* identifier should match kind */
+ unsigned int net_id;
size_t size;
struct module *owner;
int (*act)(struct sk_buff *, const struct tc_action *,