7d33341af378b133fa3ea4bfbf185f55993981bb
[cascardo/ovs.git] / ovn / controller / pipeline.h
1 /* Copyright (c) 2015 Nicira, Inc.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16
17 #ifndef OVN_PIPELINE_H
18 #define OVN_PIPELINE_H 1
19
20 /* Pipeline table translation to OpenFlow
21  * ======================================
22  *
23  * The Pipeline table obtained from the OVN_Southbound database works in terms
24  * of logical entities, that is, logical flows among logical datapaths and
25  * logical ports.  This code translates these logical flows into OpenFlow flows
26  * that, again, work in terms of logical entities implemented through OpenFlow
27  * extensions (e.g. registers represent the logical input and output ports).
28  *
29  * Physical-to-logical and logical-to-physical translation are implemented in
30  * physical.[ch] as separate OpenFlow tables that run before and after,
31  * respectively, the logical pipeline OpenFlow tables.
32  */
33
34 #include <stdint.h>
35
36 struct controller_ctx;
37 struct hmap;
38 struct uuid;
39
40 /* Logical ports. */
41 #define MFF_LOG_INPORT  MFF_REG6 /* Logical input port. */
42 #define MFF_LOG_OUTPORT MFF_REG7 /* Logical output port. */
43
44 void pipeline_init(void);
45 void pipeline_run(struct controller_ctx *, struct hmap *flow_table);
46 void pipeline_destroy(void);
47
48 uint32_t ldp_to_integer(const struct uuid *logical_datapath);
49
50 #endif /* ovn/pipeline.h */