1 /* Copyright (c) 2015 Nicira, Inc.
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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef OVN_PIPELINE_H
18 #define OVN_PIPELINE_H 1
20 /* Pipeline table translation to OpenFlow
21 * ======================================
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).
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.
36 struct controller_ctx;
41 #define MFF_LOG_INPORT MFF_REG6 /* Logical input port. */
42 #define MFF_LOG_OUTPORT MFF_REG7 /* Logical output port. */
44 void pipeline_init(void);
45 void pipeline_run(struct controller_ctx *, struct hmap *flow_table);
46 void pipeline_destroy(void);
48 uint32_t ldp_to_integer(const struct uuid *logical_datapath);
50 #endif /* ovn/pipeline.h */