Lines Matching defs:handle
45 u32 handle;
71 u32 handle;
254 static struct tc_u_hnode *u32_lookup_ht(struct tc_u_common *tp_c, u32 handle)
261 if (ht->handle == handle)
267 static struct tc_u_knode *u32_lookup_key(struct tc_u_hnode *ht, u32 handle)
272 sel = TC_U32_HASH(handle);
279 if (n->handle == handle)
286 static void *u32_get(struct tcf_proto *tp, u32 handle)
291 if (TC_U32_HTID(handle) == TC_U32_ROOT)
294 ht = u32_lookup_ht(tp_c, TC_U32_HTID(handle));
299 if (TC_U32_KEY(handle) == 0)
302 return u32_lookup_key(ht, handle);
361 root_ht->handle = tp_c ? gen_new_htid(tp_c, root_ht) : 0x80000000;
456 kp = &ht->ht[TC_U32_HASH(key->handle)];
464 idr_remove(&ht->handle_idr, key->handle);
484 cls_u32.hnode.handle = h->handle;
502 cls_u32.hnode.handle = h->handle;
527 cls_u32.knode.handle = n->handle;
544 cls_u32.knode.handle = n->handle;
557 cls_u32.knode.link_handle = ht->handle;
586 idr_remove(&ht->handle_idr, n->handle);
613 idr_remove(&tp_c->handle_idr, ht->handle);
664 if (TC_U32_KEY(ht->handle)) {
732 u32 handle = nla_get_u32(tb[TCA_U32_LINK]);
735 if (TC_U32_KEY(handle)) {
736 NL_SET_ERR_MSG_MOD(extack, "u32 Link handle must be a hash table");
740 if (handle) {
741 ht_down = u32_lookup_ht(tp->data, handle);
778 if (TC_U32_HTID(n->handle) == TC_U32_ROOT)
781 ht = u32_lookup_ht(tp_c, TC_U32_HTID(n->handle));
783 ins = &ht->ht[TC_U32_HASH(n->handle)];
790 if (pins->handle == n->handle)
793 idr_replace(&ht->handle_idr, n, n->handle);
810 new->handle = n->handle;
847 struct tcf_proto *tp, unsigned long base, u32 handle,
862 if (handle) {
863 NL_SET_ERR_MSG_MOD(extack, "Filter handle requires options");
887 if (TC_U32_KEY(n->handle) == 0) {
937 if (TC_U32_KEY(handle)) {
944 if (handle == 0) {
945 handle = gen_new_htid(tp->data, ht);
946 if (handle == 0) {
951 err = idr_alloc_u32(&tp_c->handle_idr, ht, &handle,
952 handle, GFP_KERNEL);
960 ht->handle = handle;
967 idr_remove(&tp_c->handle_idr, handle);
983 htid = ht->handle;
993 htid = ht->handle;
1001 /* At this point, we need to derive the new handle that will be used to
1017 * We may also have a handle, if the user passed one. The handle also
1019 * Rule: the bucketid on the handle is ignored even if one was passed;
1022 if (handle) {
1023 /* Rule: The htid from handle and tableid from htid must match */
1024 if (TC_U32_HTID(handle) && TC_U32_HTID(handle ^ htid)) {
1033 * Rule: The nodeid can only be derived from the handle (and not
1035 * Rule: if the handle specified zero for the node id example
1039 * handle such as 0x60000123), then we use it generate our final
1040 * handle which is used to uniquely identify the match entry.
1042 if (!TC_U32_NODE(handle)) {
1043 handle = gen_new_kid(ht, htid);
1045 handle = htid | TC_U32_NODE(handle);
1046 err = idr_alloc_u32(&ht->handle_idr, NULL, &handle,
1047 handle, GFP_KERNEL);
1052 /* The user did not give us a handle; lets just generate one
1055 handle = gen_new_kid(ht, htid);
1088 n->handle = handle;
1125 ins = &ht->ht[TC_U32_HASH(handle)];
1128 if (TC_U32_NODE(handle) < TC_U32_NODE(pins->handle))
1151 idr_remove(&ht->handle_idr, handle);
1206 cls_u32.hnode.handle = ht->handle;
1228 cls_u32.knode.handle = n->handle;
1243 cls_u32.knode.link_handle = ht->handle;
1325 t->tcm_handle = n->handle;
1331 if (TC_U32_KEY(n->handle) == 0) {
1349 u32 htid = n->handle & 0xFFFFF000;
1359 nla_put_u32(skb, TCA_U32_LINK, ht_down->handle))
1418 if (TC_U32_KEY(n->handle))