forked from Juniper/contrail-third-party
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openvswitch.diff
519 lines (477 loc) · 18 KB
/
openvswitch.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
diff --git a/openvswitch-2.3.0/lib/ovsdb-idl.c b/openvswitch-2.3.0/lib/ovsdb-idl.c
--- a/openvswitch-2.3.0/lib/ovsdb-idl.c
+++ b/openvswitch-2.3.0/lib/ovsdb-idl.c
@@ -90,6 +90,12 @@ struct ovsdb_idl {
/* Transaction support. */
struct ovsdb_idl_txn *txn;
struct hmap outstanding_txns;
+
+#ifdef OPEN_CONTRAIL_CLIENT
+ void *open_contrail_client;
+ idl_callback cb;
+ txn_ack_callback ack_cb;
+#endif
};
struct ovsdb_idl_txn {
@@ -192,7 +198,16 @@ ovsdb_idl_create(const char *remote, const struct ovsdb_idl_class *class,
idl = xzalloc(sizeof *idl);
idl->class = class;
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (remote != NULL) {
+#endif
idl->session = jsonrpc_session_open(remote, retry);
+#ifdef OPEN_CONTRAIL_CLIENT
+ } else {
+ idl->session = NULL;
+ }
+ idl->cb = NULL;
+#endif
shash_init(&idl->table_by_name);
idl->tables = xmalloc(class->n_tables * sizeof *idl->tables);
for (i = 0; i < class->n_tables; i++) {
@@ -229,6 +244,9 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl)
ovs_assert(!idl->txn);
ovsdb_idl_clear(idl);
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (idl->session != NULL)
+#endif
jsonrpc_session_close(idl->session);
for (i = 0; i < idl->class->n_tables; i++) {
@@ -283,6 +301,27 @@ ovsdb_idl_clear(struct ovsdb_idl *idl)
}
}
+#ifdef OPEN_CONTRAIL_CLIENT
+void
+ovsdb_idl_set_callback(struct ovsdb_idl *idl, void *idl_base, idl_callback i_cb,
+ txn_ack_callback ack_cb)
+{
+ idl->open_contrail_client = idl_base;
+ idl->cb = i_cb;
+ idl->ack_cb = ack_cb;
+}
+
+bool
+ovsdb_idl_is_txn_success(struct ovsdb_idl_txn *txn)
+{
+ return (txn->status == TXN_SUCCESS);
+}
+
+void ovsdb_idl_msg_process(struct ovsdb_idl *idl, struct jsonrpc_msg *msg);
+struct jsonrpc_msg *ovsdb_idl_encode_monitor_request(struct ovsdb_idl *idl);
+struct jsonrpc_msg *ovsdb_idl_txn_encode(struct ovsdb_idl_txn *txn);
+#endif
+
/* Processes a batch of messages from the database server on 'idl'. This may
* cause the IDL's contents to change. The client may check for that with
* ovsdb_idl_get_seqno(). */
@@ -313,6 +352,16 @@ ovsdb_idl_run(struct ovsdb_idl *idl)
break;
}
+#ifdef OPEN_CONTRAIL_CLIENT
+ ovsdb_idl_msg_process(idl, msg);
+ }
+}
+
+void
+ovsdb_idl_msg_process(struct ovsdb_idl *idl, struct jsonrpc_msg *msg)
+{
+#endif
+
if (msg->type == JSONRPC_NOTIFY
&& !strcmp(msg->method, "update")
&& msg->params->type == JSON_ARRAY
@@ -355,7 +404,9 @@ ovsdb_idl_run(struct ovsdb_idl *idl)
jsonrpc_msg_type_to_string(msg->type));
}
jsonrpc_msg_destroy(msg);
+#ifndef OPEN_CONTRAIL_CLIENT
}
+#endif
}
/* Arranges for poll_block() to wake up when ovsdb_idl_run() has something to
@@ -553,6 +604,14 @@ ovsdb_idl_omit(struct ovsdb_idl *idl, const struct ovsdb_idl_column *column)
static void
ovsdb_idl_send_monitor_request(struct ovsdb_idl *idl)
{
+#ifdef OPEN_CONTRAIL_CLIENT
+ jsonrpc_session_send(idl->session, ovsdb_idl_encode_monitor_request(idl));
+}
+
+struct jsonrpc_msg *
+ovsdb_idl_encode_monitor_request(struct ovsdb_idl *idl)
+#endif
+{
struct json *monitor_requests;
struct jsonrpc_msg *msg;
size_t i;
@@ -588,7 +647,11 @@ ovsdb_idl_send_monitor_request(struct ovsdb_idl *idl)
json_array_create_3(json_string_create(idl->class->database),
json_null_create(), monitor_requests),
&idl->monitor_request_id);
+#ifndef OPEN_CONTRAIL_CLIENT
jsonrpc_session_send(idl->session, msg);
+#else
+ return msg;
+#endif
}
static void
@@ -939,6 +1002,10 @@ ovsdb_idl_row_reparse_backrefs(struct ovsdb_idl_row *row)
ovsdb_idl_row_unparse(ref);
ovsdb_idl_row_clear_arcs(ref, false);
ovsdb_idl_row_parse(ref);
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (row->table->idl->cb)
+ row->table->idl->cb(ref->table->idl->open_contrail_client, 1, ref);
+#endif
}
}
@@ -987,12 +1054,20 @@ ovsdb_idl_insert_row(struct ovsdb_idl_row *row, const struct json *row_json)
ovsdb_idl_row_update(row, row_json);
ovsdb_idl_row_parse(row);
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (row->table->idl->cb)
+ row->table->idl->cb(row->table->idl->open_contrail_client, 1, row);
+#endif
ovsdb_idl_row_reparse_backrefs(row);
}
static void
ovsdb_idl_delete_row(struct ovsdb_idl_row *row)
{
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (row->table->idl->cb)
+ row->table->idl->cb(row->table->idl->open_contrail_client, 0, row);
+#endif
ovsdb_idl_row_unparse(row);
ovsdb_idl_row_clear_arcs(row, true);
ovsdb_idl_row_clear_old(row);
@@ -1015,6 +1090,10 @@ ovsdb_idl_modify_row(struct ovsdb_idl_row *row, const struct json *row_json)
changed = ovsdb_idl_row_update(row, row_json);
ovsdb_idl_row_parse(row);
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (row->table->idl->cb)
+ row->table->idl->cb(row->table->idl->open_contrail_client, 1, row);
+#endif
return changed;
}
@@ -1529,6 +1608,21 @@ ovsdb_idl_txn_disassemble(struct ovsdb_idl_txn *txn)
enum ovsdb_idl_txn_status
ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn)
{
+#ifdef OPEN_CONTRAIL_CLIENT
+ struct jsonrpc_msg *msg = ovsdb_idl_txn_encode(txn);
+ if (msg != NULL) {
+ if (jsonrpc_session_send(txn->idl->session, msg)) {
+ txn->status = TXN_TRY_AGAIN;
+ }
+ }
+ return txn->status;
+}
+
+struct jsonrpc_msg *
+ovsdb_idl_txn_encode(struct ovsdb_idl_txn *txn)
+{
+ struct jsonrpc_msg *msg = NULL;
+#endif
struct ovsdb_idl_row *row;
struct json *operations;
bool any_updates;
@@ -1713,6 +1807,7 @@ ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn)
if (!any_updates) {
txn->status = TXN_UNCHANGED;
json_destroy(operations);
+#ifndef OPEN_CONTRAIL_CLIENT
} else if (!jsonrpc_session_send(
txn->idl->session,
jsonrpc_create_request(
@@ -1722,6 +1817,14 @@ ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn)
txn->status = TXN_INCOMPLETE;
} else {
txn->status = TXN_TRY_AGAIN;
+#else
+ msg = NULL;
+ } else {
+ msg = jsonrpc_create_request("transact", operations, &txn->request_id);
+ hmap_insert(&txn->idl->outstanding_txns, &txn->hmap_node,
+ json_hash(txn->request_id, 0));
+ txn->status = TXN_INCOMPLETE;
+#endif
}
disassemble_out:
@@ -1738,7 +1841,11 @@ coverage_out:
case TXN_ERROR: COVERAGE_INC(txn_error); break;
}
+#ifndef OPEN_CONTRAIL_CLIENT
return txn->status;
+#else
+ return msg;
+#endif
}
/* Attempts to commit 'txn', blocking until the commit either succeeds or
@@ -1847,6 +1954,10 @@ ovsdb_idl_txn_complete(struct ovsdb_idl_txn *txn,
{
txn->status = status;
hmap_remove(&txn->idl->outstanding_txns, &txn->hmap_node);
+#ifdef OPEN_CONTRAIL_CLIENT
+ if (txn->idl->ack_cb)
+ txn->idl->ack_cb(txn->idl->open_contrail_client, txn);
+#endif
}
/* Writes 'datum' to the specified 'column' in 'row_'. Updates both 'row_'
diff --git a/openvswitch-2.3.0/lib/ovsdb-idl.h b/openvswitch-2.3.0/lib/ovsdb-idl.h
--- a/openvswitch-2.3.0/lib/ovsdb-idl.h
+++ b/openvswitch-2.3.0/lib/ovsdb-idl.h
@@ -41,6 +41,14 @@ struct ovsdb_idl_class;
struct ovsdb_idl_column;
struct ovsdb_idl_table_class;
struct uuid;
+#ifdef OPEN_CONTRAIL_CLIENT
+struct ovsdb_idl_row;
+struct ovsdb_idl_txn;
+
+typedef void (*idl_callback)(void *, int, struct ovsdb_idl_row *);
+typedef void (*txn_ack_callback)(void *, struct ovsdb_idl_txn *);
+bool ovsdb_idl_is_txn_success(struct ovsdb_idl_txn *);
+#endif
struct ovsdb_idl *ovsdb_idl_create(const char *remote,
const struct ovsdb_idl_class *,
diff --git a/openvswitch-2.3.0/lib/vtep-idl.c b/openvswitch-2.3.0/lib/vtep-idl.c
--- a/openvswitch-2.3.0/lib/vtep-idl.c
+++ b/openvswitch-2.3.0/lib/vtep-idl.c
@@ -3327,6 +3327,10 @@ vteprec_physical_locator_set_unparse_loc
ovs_assert(inited);
free(row->locators);
+#ifdef OPEN_CONTRAIL_CLIENT
+ row->locators = NULL;
+ row->n_locators = 0;
+#endif
}
static void
@@ -3636,7 +3640,9 @@ void
vteprec_physical_port_verify_port_fault_status(const struct vteprec_physical_port *row)
{
ovs_assert(inited);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS]);
+#endif
}
void
@@ -3719,7 +3725,11 @@ vteprec_physical_port_get_port_fault_sta
enum ovsdb_atomic_type key_type OVS_UNUSED)
{
ovs_assert(key_type == OVSDB_TYPE_STRING);
+#ifndef OPEN_CONTRAIL_CLIENT
return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_port_fault_status);
+#else
+ return NULL;
+#endif
}
/* Returns the vlan_bindings column's value in 'row' as a struct ovsdb_datum.
@@ -3816,7 +3826,9 @@ vteprec_physical_port_set_port_fault_sta
datum.keys[i].string = xstrdup(port_fault_status[i]);
}
ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_write(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS], &datum);
+#endif
}
void
@@ -3886,6 +3898,7 @@ vteprec_physical_port_columns_init(void)
c->parse = vteprec_physical_port_parse_name;
c->unparse = vteprec_physical_port_unparse_name;
+#ifndef OPEN_CONTRAIL_CLIENT
/* Initialize vteprec_physical_port_col_port_fault_status. */
c = &vteprec_physical_port_col_port_fault_status;
c->name = "port_fault_status";
@@ -3897,6 +3910,7 @@ vteprec_physical_port_columns_init(void)
c->mutable = true;
c->parse = vteprec_physical_port_parse_port_fault_status;
c->unparse = vteprec_physical_port_unparse_port_fault_status;
+#endif
/* Initialize vteprec_physical_port_col_vlan_bindings. */
c = &vteprec_physical_port_col_vlan_bindings;
@@ -4185,7 +4199,9 @@ void
vteprec_physical_switch_verify_switch_fault_status(const struct vteprec_physical_switch *row)
{
ovs_assert(inited);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS]);
+#endif
}
void
@@ -4199,7 +4215,9 @@ void
vteprec_physical_switch_verify_tunnels(const struct vteprec_physical_switch *row)
{
ovs_assert(inited);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS]);
+#endif
}
/* Returns the description column's value in 'row' as a struct ovsdb_datum.
@@ -4314,7 +4332,11 @@ vteprec_physical_switch_get_switch_fault
enum ovsdb_atomic_type key_type OVS_UNUSED)
{
ovs_assert(key_type == OVSDB_TYPE_STRING);
+#ifndef OPEN_CONTRAIL_CLIENT
return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_switch_fault_status);
+#else
+ return NULL;
+#endif
}
/* Returns the tunnel_ips column's value in 'row' as a struct ovsdb_datum.
@@ -4360,7 +4382,11 @@ vteprec_physical_switch_get_tunnels(cons
enum ovsdb_atomic_type key_type OVS_UNUSED)
{
ovs_assert(key_type == OVSDB_TYPE_UUID);
+#ifndef OPEN_CONTRAIL_CLIENT
return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_tunnels);
+#else
+ return NULL;
+#endif
}
void
@@ -4439,7 +4465,9 @@ vteprec_physical_switch_set_switch_fault
datum.keys[i].string = xstrdup(switch_fault_status[i]);
}
ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS], &datum);
+#endif
}
void
@@ -4473,7 +4501,9 @@ vteprec_physical_switch_set_tunnels(cons
datum.keys[i].uuid = tunnels[i]->header_.uuid;
}
ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
+#ifndef OPEN_CONTRAIL_CLIENT
ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS], &datum);
+#endif
}
struct ovsdb_idl_column vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_N_COLUMNS];
@@ -4532,6 +4562,7 @@ vteprec_physical_switch_columns_init(voi
c->parse = vteprec_physical_switch_parse_ports;
c->unparse = vteprec_physical_switch_unparse_ports;
+#ifndef OPEN_CONTRAIL_CLIENT
/* Initialize vteprec_physical_switch_col_switch_fault_status. */
c = &vteprec_physical_switch_col_switch_fault_status;
c->name = "switch_fault_status";
@@ -4543,6 +4574,7 @@ vteprec_physical_switch_columns_init(voi
c->mutable = true;
c->parse = vteprec_physical_switch_parse_switch_fault_status;
c->unparse = vteprec_physical_switch_unparse_switch_fault_status;
+#endif
/* Initialize vteprec_physical_switch_col_tunnel_ips. */
c = &vteprec_physical_switch_col_tunnel_ips;
@@ -4556,6 +4588,7 @@ vteprec_physical_switch_columns_init(voi
c->parse = vteprec_physical_switch_parse_tunnel_ips;
c->unparse = vteprec_physical_switch_unparse_tunnel_ips;
+#ifndef OPEN_CONTRAIL_CLIENT
/* Initialize vteprec_physical_switch_col_tunnels. */
c = &vteprec_physical_switch_col_tunnels;
c->name = "tunnels";
@@ -4568,6 +4601,7 @@ vteprec_physical_switch_columns_init(voi
c->mutable = true;
c->parse = vteprec_physical_switch_parse_tunnels;
c->unparse = vteprec_physical_switch_unparse_tunnels;
+#endif
}
/* Tunnel table. */
@@ -5890,12 +5924,14 @@ vteprec_ucast_macs_remote_columns_init(v
}
struct ovsdb_idl_table_class vteprec_table_classes[VTEPREC_N_TABLES] = {
+#ifndef OPEN_CONTRAIL_CLIENT
{"Arp_Sources_Local", true,
vteprec_arp_sources_local_columns, ARRAY_SIZE(vteprec_arp_sources_local_columns),
sizeof(struct vteprec_arp_sources_local), vteprec_arp_sources_local_init__},
{"Arp_Sources_Remote", true,
vteprec_arp_sources_remote_columns, ARRAY_SIZE(vteprec_arp_sources_remote_columns),
sizeof(struct vteprec_arp_sources_remote), vteprec_arp_sources_remote_init__},
+#endif
{"Global", true,
vteprec_global_columns, ARRAY_SIZE(vteprec_global_columns),
sizeof(struct vteprec_global), vteprec_global_init__},
@@ -5929,9 +5965,11 @@ struct ovsdb_idl_table_class vteprec_tab
{"Physical_Switch", false,
vteprec_physical_switch_columns, ARRAY_SIZE(vteprec_physical_switch_columns),
sizeof(struct vteprec_physical_switch), vteprec_physical_switch_init__},
+#ifndef OPEN_CONTRAIL_CLIENT
{"Tunnel", false,
vteprec_tunnel_columns, ARRAY_SIZE(vteprec_tunnel_columns),
sizeof(struct vteprec_tunnel), vteprec_tunnel_init__},
+#endif
{"Ucast_Macs_Local", true,
vteprec_ucast_macs_local_columns, ARRAY_SIZE(vteprec_ucast_macs_local_columns),
sizeof(struct vteprec_ucast_macs_local), vteprec_ucast_macs_local_init__},
diff --git a/openvswitch-2.3.0/lib/vtep-idl.h b/openvswitch-2.3.0/lib/vtep-idl.h
--- a/openvswitch-2.3.0/lib/vtep-idl.h
+++ b/openvswitch-2.3.0/lib/vtep-idl.h
@@ -704,14 +704,18 @@ struct vteprec_physical_port {
enum {
VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION,
VTEPREC_PHYSICAL_PORT_COL_NAME,
+#ifndef OPEN_CONTRAIL_CLIENT
VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS,
+#endif
VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS,
VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS,
VTEPREC_PHYSICAL_PORT_N_COLUMNS
};
#define vteprec_physical_port_col_name (vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_NAME])
+#ifndef OPEN_CONTRAIL_CLIENT
#define vteprec_physical_port_col_port_fault_status (vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS])
+#endif
#define vteprec_physical_port_col_vlan_bindings (vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS])
#define vteprec_physical_port_col_vlan_stats (vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS])
#define vteprec_physical_port_col_description (vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION])
@@ -792,18 +796,26 @@ enum {
VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS,
VTEPREC_PHYSICAL_SWITCH_COL_NAME,
VTEPREC_PHYSICAL_SWITCH_COL_PORTS,
+#ifndef OPEN_CONTRAIL_CLIENT
VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS,
+#endif
VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS,
+#ifndef OPEN_CONTRAIL_CLIENT
VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS,
+#endif
VTEPREC_PHYSICAL_SWITCH_N_COLUMNS
};
#define vteprec_physical_switch_col_management_ips (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS])
#define vteprec_physical_switch_col_description (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_DESCRIPTION])
#define vteprec_physical_switch_col_tunnel_ips (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS])
+#ifndef OPEN_CONTRAIL_CLIENT
#define vteprec_physical_switch_col_switch_fault_status (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS])
+#endif
#define vteprec_physical_switch_col_ports (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS])
+#ifndef OPEN_CONTRAIL_CLIENT
#define vteprec_physical_switch_col_tunnels (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS])
+#endif
#define vteprec_physical_switch_col_name (vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_NAME])
extern struct ovsdb_idl_column vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_N_COLUMNS];
@@ -1070,8 +1082,10 @@ void vteprec_ucast_macs_remote_set_logic
enum {
+#ifndef OPEN_CONTRAIL_CLIENT
VTEPREC_TABLE_ARP_SOURCES_LOCAL,
VTEPREC_TABLE_ARP_SOURCES_REMOTE,
+#endif
VTEPREC_TABLE_GLOBAL,
VTEPREC_TABLE_LOGICAL_BINDING_STATS,
VTEPREC_TABLE_LOGICAL_ROUTER,
@@ -1083,10 +1097,19 @@ enum {
VTEPREC_TABLE_PHYSICAL_LOCATOR_SET,
VTEPREC_TABLE_PHYSICAL_PORT,
VTEPREC_TABLE_PHYSICAL_SWITCH,
+#ifndef OPEN_CONTRAIL_CLIENT
VTEPREC_TABLE_TUNNEL,
+#endif
VTEPREC_TABLE_UCAST_MACS_LOCAL,
VTEPREC_TABLE_UCAST_MACS_REMOTE,
+#ifdef OPEN_CONTRAIL_CLIENT
+ VTEPREC_N_TABLES,
+ VTEPREC_TABLE_ARP_SOURCES_LOCAL,
+ VTEPREC_TABLE_ARP_SOURCES_REMOTE,
+ VTEPREC_TABLE_TUNNEL
+#else
VTEPREC_N_TABLES
+#endif
};
#define vteprec_table_mcast_macs_remote (vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE])