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.
19 #include "ovn/lib/logical-fields.h"
21 /* Logical_Flow table translation to OpenFlow
22 * ==========================================
24 * The Logical_Flow table obtained from the OVN_Southbound database works in
25 * terms of logical entities, that is, logical flows among logical datapaths
26 * and logical ports. This code translates these logical flows into OpenFlow
27 * flows that, again, work in terms of logical entities implemented through
28 * OpenFlow extensions (e.g. registers represent the logical input and output
31 * Physical-to-logical and logical-to-physical translation are implemented in
32 * physical.[ch] as separate OpenFlow tables that run before and after,
33 * respectively, the logical pipeline OpenFlow tables.
38 struct controller_ctx;
43 /* OpenFlow table numbers.
45 * These are heavily documented in ovn-architecture(7), please update it if
46 * you make any changes. */
47 #define OFTABLE_PHY_TO_LOG 0
48 #define OFTABLE_LOG_INGRESS_PIPELINE 16 /* First of LOG_PIPELINE_LEN tables. */
49 #define OFTABLE_REMOTE_OUTPUT 32
50 #define OFTABLE_LOCAL_OUTPUT 33
51 #define OFTABLE_DROP_LOOPBACK 34
52 #define OFTABLE_LOG_EGRESS_PIPELINE 48 /* First of LOG_PIPELINE_LEN tables. */
53 #define OFTABLE_LOG_TO_PHY 64
55 /* The number of tables for the ingress and egress pipelines. */
56 #define LOG_PIPELINE_LEN 16
58 void lflow_init(void);
59 void lflow_run(struct controller_ctx *, struct hmap *flow_table,
60 const struct simap *ct_zones);
61 void lflow_destroy(void);
63 #endif /* ovn/lflow.h */