|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
From f781f1bdb099c0bfc45e6bf732940f076f28c026 Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
From: Dumitru Ceara <dceara@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Date: Thu, 12 Sep 2019 16:14:20 +0200
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Subject: [PATCH 2/4] ovn-controller: Minimize SB DB port_binding lookups.
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Instead of storing only peer_ports in struct local_datapath, store both
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
local-remote mappings for patch ports. Also, it's useful to directly
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
store sbrec_port_binding pointers for all datapath ports as we avoid
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
doing costly sbrec_port_binding index lookups by port name.
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Change-Id: Id8df886cab6bb4a81cd105d2ac52dd7e9aa03326
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Acked-by: Mark Michelson <mmichels@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Acked-by: Han Zhou <hzhou8@ebay.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Signed-off-by: Numan Siddique <nusiddiq@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
(cherry-picked from upstream commit 89f5048f960c67e9dac3d45c6a9b25fa260e1a46)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
---
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ovn/controller/binding.c | 19 +++++++++---
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ovn/controller/ovn-controller.h | 11 ++++++-
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ovn/controller/physical.c | 17 ++++++-----
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ovn/controller/pinctrl.c | 53 ++++++++-------------------------
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
4 files changed, 48 insertions(+), 52 deletions(-)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
index c71731a1e..1380a3e6e 100644
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--- a/ovn/controller/binding.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+++ b/ovn/controller/binding.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -161,13 +161,24 @@ add_local_datapath__(struct ovsdb_idl_index *sbrec_datapath_binding_by_key,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
peer->datapath, false,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
depth + 1, local_datapaths);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ld->n_peer_ports++;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- ld->peer_ports = xrealloc(ld->peer_ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- ld->n_peer_ports *
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sizeof *ld->peer_ports);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- ld->peer_ports[ld->n_peer_ports - 1] = peer;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ if (ld->n_peer_ports > ld->n_allocated_peer_ports) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ x2nrealloc(ld->peer_ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ &ld->n_allocated_peer_ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ sizeof *ld->peer_ports);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports[ld->n_peer_ports - 1].local = pb;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports[ld->n_peer_ports - 1].remote = peer;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->n_ports++;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ if (ld->n_ports > ld->n_allocated_ports) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->ports = x2nrealloc(ld->ports, &ld->n_allocated_ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ sizeof *ld->ports);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->ports[ld->n_ports - 1] = pb;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sbrec_port_binding_index_destroy_row(target);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
diff --git a/ovn/controller/ovn-controller.h b/ovn/controller/ovn-controller.h
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
index 078c9eabe..09ef4b632 100644
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--- a/ovn/controller/ovn-controller.h
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+++ b/ovn/controller/ovn-controller.h
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -60,8 +60,17 @@ struct local_datapath {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
* hypervisor. */
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
bool has_local_l3gateway;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding **peer_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding **ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ size_t n_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ size_t n_allocated_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ struct {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *local;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *remote;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ } *peer_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
size_t n_peer_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ size_t n_allocated_peer_ports;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
};
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct local_datapath *get_local_datapath(const struct hmap *,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
index 95cbaba49..b439a4852 100644
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--- a/ovn/controller/physical.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+++ b/ovn/controller/physical.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -259,11 +259,12 @@ put_remote_port_redirect_bridged(const struct
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
uint32_t ls_dp_key = 0;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
for (int i = 0; i < ld->n_peer_ports; i++) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding *sport_binding = ld->peer_ports[i];
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const char *sport_peer_name = smap_get(&sport_binding->options,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- "peer");
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const char *distributed_port = smap_get(&binding->options,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- "distributed-port");
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *sport_binding =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports[i].remote;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const char *sport_peer_name =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ smap_get(&sport_binding->options, "peer");
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const char *distributed_port =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ smap_get(&binding->options, "distributed-port");
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
if (!strcmp(sport_peer_name, distributed_port)) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ls_dp_key = sport_binding->datapath->tunnel_key;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -525,7 +526,8 @@ put_replace_chassis_mac_flows(const struct simap *ct_zones,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct zone_ids zone_ids = get_zone_ids(localnet_port, ct_zones);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
for (int i = 0; i < ld->n_peer_ports; i++) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding *rport_binding = ld->peer_ports[i];
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *rport_binding =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports[i].remote;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct eth_addr router_port_mac;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
char *err_str = NULL;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct match match;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -632,7 +634,8 @@ put_replace_router_port_mac_flows(struct ovsdb_idl_index
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
for (int i = 0; i < ld->n_peer_ports; i++) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding *rport_binding = ld->peer_ports[i];
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *rport_binding =
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ld->peer_ports[i].remote;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct eth_addr router_port_mac;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct match match;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct ofpact_mac *replace_mac;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
index 8bc99df4e..5636fc1e0 100644
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--- a/ovn/controller/pinctrl.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+++ b/ovn/controller/pinctrl.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -175,8 +175,7 @@ static struct pinctrl pinctrl;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void init_buffered_packets_map(void);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void destroy_buffered_packets_map(void);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-run_buffered_binding(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+run_buffered_binding(struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
OVS_REQUIRES(pinctrl_mutex);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -240,10 +239,7 @@ static void wait_controller_event(struct ovsdb_idl_txn *ovnsb_idl_txn);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void init_ipv6_ras(void);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void destroy_ipv6_ras(void);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void ipv6_ra_wait(long long int send_ipv6_ra_time);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-static void prepare_ipv6_ras(
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovsdb_idl_index *sbrec_port_binding_by_name,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+static void prepare_ipv6_ras(const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
OVS_REQUIRES(pinctrl_mutex);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void send_ipv6_ras(struct rconn *swconn,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
long long int *send_ipv6_ra_time)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2216,8 +2212,7 @@ pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
send_garp_prepare(sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sbrec_port_binding_by_name, br_int, chassis,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
local_datapaths, active_tunnels);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- prepare_ipv6_ras(sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_by_name, local_datapaths);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ prepare_ipv6_ras(local_datapaths);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sync_dns_cache(dns_table);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
controller_event_run(ovnsb_idl_txn, ce_table, chassis);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ip_mcast_sync(ovnsb_idl_txn, chassis, local_datapaths,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2225,8 +2220,7 @@ pinctrl_run(struct ovsdb_idl_txn *ovnsb_idl_txn,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sbrec_port_binding_by_key,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sbrec_igmp_groups,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sbrec_ip_multicast_opts);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- run_buffered_binding(sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ run_buffered_binding(sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
local_datapaths);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
sync_svc_monitors(ovnsb_idl_txn, svc_mon_table, sbrec_port_binding_by_name,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
chassis);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2669,9 +2663,7 @@ send_ipv6_ras(struct rconn *swconn, long long int *send_ipv6_ra_time)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
/* Called by pinctrl_run(). Runs with in the main ovn-controller
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
* thread context. */
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-prepare_ipv6_ras(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovsdb_idl_index *sbrec_port_binding_by_name,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+prepare_ipv6_ras(const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
OVS_REQUIRES(pinctrl_mutex)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
{
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct shash_node *iter, *iter_next;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2684,25 +2676,12 @@ prepare_ipv6_ras(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
bool changed = false;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
const struct local_datapath *ld;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
HMAP_FOR_EACH (ld, hmap_node, local_datapaths) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct sbrec_port_binding *target = sbrec_port_binding_index_init_row(
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_by_datapath);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_index_set_datapath(target, ld->datapath);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct sbrec_port_binding *pb;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- SBREC_PORT_BINDING_FOR_EACH_EQUAL (pb, target,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_by_datapath) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- if (!smap_get_bool(&pb->options, "ipv6_ra_send_periodic", false)) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- continue;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- }
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ for (size_t i = 0; i < ld->n_peer_ports; i++) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *peer = ld->peer_ports[i].remote;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *pb = ld->peer_ports[i].local;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const char *peer_s = smap_get(&pb->options, "peer");
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- if (!peer_s) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- continue;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- }
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding *peer
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- = lport_lookup_by_name(sbrec_port_binding_by_name, peer_s);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- if (!peer) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ if (!smap_get_bool(&pb->options, "ipv6_ra_send_periodic", false)) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
continue;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2741,7 +2720,6 @@ prepare_ipv6_ras(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
/* pinctrl_handler thread will send the IPv6 RAs. */
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_index_destroy_row(target);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
/* Remove those that are no longer in the SB database */
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2987,8 +2965,7 @@ run_put_mac_bindings(struct ovsdb_idl_txn *ovnsb_idl_txn,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
static void
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-run_buffered_binding(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+run_buffered_binding(struct ovsdb_idl_index *sbrec_mac_binding_by_lport_ip,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
const struct hmap *local_datapaths)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
OVS_REQUIRES(pinctrl_mutex)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
{
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -2996,13 +2973,10 @@ run_buffered_binding(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
bool notify = false;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
HMAP_FOR_EACH (ld, hmap_node, local_datapaths) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct sbrec_port_binding *target = sbrec_port_binding_index_init_row(
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_by_datapath);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_index_set_datapath(target, ld->datapath);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- const struct sbrec_port_binding *pb;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- SBREC_PORT_BINDING_FOR_EACH_EQUAL (pb, target,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_by_datapath) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ for (size_t i = 0; i < ld->n_ports; i++) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ const struct sbrec_port_binding *pb = ld->ports[i];
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
struct buffered_packets *cur_qp, *next_qp;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
HMAP_FOR_EACH_SAFE (cur_qp, next_qp, hmap_node,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
&buffered_packets_map) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -3020,7 +2994,6 @@ run_buffered_binding(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ds_destroy(&ip_s);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- sbrec_port_binding_index_destroy_row(target);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
buffered_packets_map_gc();
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
2.26.2
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|