Lines Matching refs:index
189 fl_action->index = act->tcfa_index;
510 int err = 0, index = -1, s_i = 0, n_i = 0;
524 index++;
525 if (index < s_i)
539 index--;
546 index--;
557 if (index >= 0)
558 cb->args[0] = index + 1;
654 int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index)
660 p = idr_find(&idrinfo->action_idr, index);
690 struct tc_action **a, u32 index)
695 return ops->lookup(net, a, index);
697 return tcf_idr_search(tn, a, index);
700 static int tcf_idr_delete_index(struct tcf_idrinfo *idrinfo, u32 index)
706 p = idr_find(&idrinfo->action_idr, index);
733 int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
761 p->tcfa_index = index;
791 int tcf_idr_create_from_flags(struct tc_action_net *tn, u32 index,
797 return tcf_idr_create(tn, index, est, a, ops, bind,
802 /* Cleanup idr index that was allocated but not initialized. */
804 void tcf_idr_cleanup(struct tc_action_net *tn, u32 index)
810 WARN_ON(!IS_ERR(idr_remove(&idrinfo->action_idr, index)));
815 /* Check if action with specified index exists. If actions is found, increments
818 * index) and return 0.
821 int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
830 if (*index) {
831 p = idr_find(&idrinfo->action_idr, *index);
834 * index but did not assign the pointer yet.
848 ret = idr_alloc_u32(&idrinfo->action_idr, NULL, index,
849 *index, GFP_KERNEL);
852 ERR_PTR(-EBUSY), *index);
855 *index = 1;
857 ret = idr_alloc_u32(&idrinfo->action_idr, NULL, index,
861 *index);
1466 /* Start from index 0 */
1641 int index;
1651 nla_len(tb[TCA_ACT_INDEX]) < sizeof(index)) {
1652 NL_SET_ERR_MSG(extack, "Invalid TC action index value");
1655 index = nla_get_u32(tb[TCA_ACT_INDEX]);
1664 if (__tcf_idr_search(net, ops, &a, index) == 0) {
1665 NL_SET_ERR_MSG(extack, "TC action with specified index not found");