2 * Copyright (c) 2014 Nicira, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef OFPROTO_DPIF_RID_H
18 #define OFPROTO_DPIF_RID_H
23 struct recirc_id_pool;
26 * Recirculation ID pool.
27 * ======================
29 * Recirculation ID needs to be unique for each datapath. Recirculation
30 * ID pool keeps track recirculation ids.
32 * Typically, there is one recirculation ID pool for each backer.
34 * In theory, Recirculation ID can be any uint32_t value, except 0.
35 * The implementation usually limits it to a smaller range to ease
41 * All APIs are thread safe.
44 struct recirc_id_pool *recirc_id_pool_create(void);
45 void recirc_id_pool_destroy(struct recirc_id_pool *pool);
46 uint32_t recirc_id_alloc(struct recirc_id_pool *pool);
47 void recirc_id_free(struct recirc_id_pool *pool, uint32_t recirc_id);