Lines Matching refs:actions
96 /* XXX: For standalone actions, we don't need a RCU grace period either, because
97 * actions are always connected to filters and filters are already destroyed in
98 * RCU callbacks, so after a RCU grace period actions are already disconnected
337 NL_SET_ERR_MSG(extack, "Unable to flush all TC actions");
487 /* Set cpustats according to actions flags. */
506 /* Check if action with specified index exists. If actions is found, increments
508 * error pointer (to prevent concurrent users from inserting actions with same
675 int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions,
679 u32 jmp_ttl = TCA_ACT_MAX_PRIO; /*matches actions per filter */
688 const struct tc_action *a = actions[i];
736 int tcf_action_destroy(struct tc_action *actions[], int bind)
742 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
743 a = actions[i];
744 actions[i] = NULL;
760 /* Put all actions in this array, skip those NULL's. */
761 static void tcf_action_put_many(struct tc_action *actions[])
766 struct tc_action *a = actions[i];
851 int tcf_action_dump(struct sk_buff *skb, struct tc_action *actions[],
858 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
859 a = actions[i];
919 void tcf_idr_insert_many(struct tc_action *actions[])
924 struct tc_action *a = actions[i];
1058 /* Returns numbers of initialized actions or negative error. */
1062 struct tc_action *actions[], int init_res[], size_t *attr_size,
1098 actions[i - 1] = act;
1104 tcf_idr_insert_many(actions);
1111 tcf_action_destroy(actions, bind);
1187 static int tca_get_fill(struct sk_buff *skb, struct tc_action *actions[],
1208 if (tcf_action_dump(skb, actions, bind, ref, false) < 0)
1223 struct tc_action *actions[], int event,
1231 if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, event,
1266 if (!ops) { /* could happen in batch of actions */
1363 static int tcf_action_delete(struct net *net, struct tc_action *actions[])
1367 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
1368 struct tc_action *a = actions[i];
1376 actions[i] = NULL;
1393 tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
1404 if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, RTM_DELACTION,
1412 ret = tcf_action_delete(net, actions);
1434 struct tc_action *actions[TCA_ACT_MAX_PRIO] = {};
1456 actions[i - 1] = act;
1462 ret = tcf_get_notify(net, portid, n, actions, event, extack);
1464 ret = tcf_del_notify(net, n, actions, portid, attr_size, extack);
1470 tcf_action_put_many(actions);
1475 tcf_add_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
1486 if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, n->nlmsg_flags,
1506 struct tc_action *actions[TCA_ACT_MAX_PRIO] = {};
1511 actions, init_res, &attr_size, true, extack);
1518 ret = tcf_add_notify(net, n, actions, portid, attr_size, extack);
1520 /* only put existing actions */
1523 actions[i] = NULL;
1524 tcf_action_put_many(actions);