diff mbox series

[ovs-dev,4/4] northd: Make bfd_connections static in build_parsed_routes.

Message ID 0f6f079f3770b21df77854e85b00a49f9a729c96.1724157801.git.lorenzo.bianconi@redhat.com
State Accepted
Headers show
Series Optimize lookup in bfd_is_port_running | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Lorenzo Bianconi Aug. 20, 2024, 1:36 p.m. UTC
Make hamp bfd_connections pointer static in build_parsed_routes and
parsed_routes_add routines since it is used just as input.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
 northd/northd.c | 4 ++--
 northd/northd.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/northd/northd.c b/northd/northd.c
index c7bf09ad6..1f71e07dc 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -11113,7 +11113,7 @@  parsed_route_lookup(struct hmap *routes, size_t hash,
 static void
 parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
                   const struct nbrec_logical_router_static_route *route,
-                  struct hmap *bfd_connections,
+                  const struct hmap *bfd_connections,
                   struct hmap *routes, struct simap *route_tables,
                   struct hmap *bfd_active_connections)
 {
@@ -11226,7 +11226,7 @@  parsed_routes_add(struct ovn_datapath *od, const struct hmap *lr_ports,
 
 void
 build_parsed_routes(struct ovn_datapath *od, const struct hmap *lr_ports,
-                    struct hmap *bfd_connections, struct hmap *routes,
+                    const struct hmap *bfd_connections, struct hmap *routes,
                     struct simap *route_tables,
                     struct hmap *bfd_active_connections)
 {
diff --git a/northd/northd.h b/northd/northd.h
index 62e22edc1..a4971e336 100644
--- a/northd/northd.h
+++ b/northd/northd.h
@@ -738,7 +738,7 @@  void northd_indices_create(struct northd_data *data,
 void route_policies_init(struct route_policies_data *);
 void route_policies_destroy(struct route_policies_data *);
 void build_parsed_routes(struct ovn_datapath *, const struct hmap *,
-                         struct hmap *, struct hmap *, struct simap *,
+                         const struct hmap *, struct hmap *, struct simap *,
                          struct hmap *);
 uint32_t get_route_table_id(struct simap *, const char *);
 void static_routes_init(struct static_routes_data *);