]> git.proxmox.com Git - ovs.git/blame - ovn/controller/lflow.h
ofproto: Consider datapath_type when looking for internal ports.
[ovs.git] / ovn / controller / lflow.h
CommitLineData
bce7cf45 1/* Copyright (c) 2015, 2016 Nicira, Inc.
678729a2
BP
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
48605550
BP
16#ifndef OVN_LFLOW_H
17#define OVN_LFLOW_H 1
678729a2 18
667e2b0b
BP
19#include "ovn/lib/logical-fields.h"
20
48605550
BP
21/* Logical_Flow table translation to OpenFlow
22 * ==========================================
e71ac5cd 23 *
48605550
BP
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
29 * ports).
e71ac5cd
BP
30 *
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.
34 */
35
36#include <stdint.h>
37
678729a2 38struct controller_ctx;
467085fd 39struct group_table;
761fd08f 40struct hmap;
bce7cf45
BP
41struct lport_index;
42struct mcgroup_index;
78aab811 43struct simap;
e71ac5cd 44struct uuid;
678729a2 45
5868eb24
BP
46/* OpenFlow table numbers.
47 *
48 * These are heavily documented in ovn-architecture(7), please update it if
49 * you make any changes. */
50#define OFTABLE_PHY_TO_LOG 0
51#define OFTABLE_LOG_INGRESS_PIPELINE 16 /* First of LOG_PIPELINE_LEN tables. */
52#define OFTABLE_REMOTE_OUTPUT 32
53#define OFTABLE_LOCAL_OUTPUT 33
bf143492 54#define OFTABLE_CHECK_LOOPBACK 34
5868eb24 55#define OFTABLE_LOG_EGRESS_PIPELINE 48 /* First of LOG_PIPELINE_LEN tables. */
bf143492
JP
56#define OFTABLE_SAVE_INPORT 64
57#define OFTABLE_LOG_TO_PHY 65
58#define OFTABLE_MAC_BINDING 66
5868eb24
BP
59
60/* The number of tables for the ingress and egress pipelines. */
61#define LOG_PIPELINE_LEN 16
62
48605550 63void lflow_init(void);
bce7cf45
BP
64void lflow_run(struct controller_ctx *, const struct lport_index *,
65 const struct mcgroup_index *,
c4f32696
HZ
66 const struct hmap *local_datapaths,
67 const struct hmap *patched_datapaths,
467085fd 68 struct group_table *group_table,
fdbdb595 69 const struct simap *ct_zones);
48605550 70void lflow_destroy(void);
70c7cfef 71void lflow_reset_processing(void);
678729a2 72
48605550 73#endif /* ovn/lflow.h */