Make internal function is_standard_table_id() public to be used by the
next patches in the series.

Signed-off-by: Dima Chumak <dchu...@nvidia.com>
---
 lib/route-table-bsd.c  | 6 ++++++
 lib/route-table-stub.c | 6 ++++++
 lib/route-table.c      | 6 +++---
 lib/route-table.h      | 1 +
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/lib/route-table-bsd.c b/lib/route-table-bsd.c
index 34d42cfab73b..a4eccb913916 100644
--- a/lib/route-table-bsd.c
+++ b/lib/route-table-bsd.c
@@ -43,6 +43,12 @@ VLOG_DEFINE_THIS_MODULE(route_table_bsd);
 #define RT_ROUNDUP(l) ((l) > 0 ? ROUND_UP((l), sizeof(long)) : sizeof(long))
 #endif
 
+bool
+route_table_is_standard_id(uint32_t table_id)
+{
+    return !table_id;
+}
+
 bool
 route_table_fallback_lookup(const struct in6_addr *ip6_dst, char name[],
                             struct in6_addr *gw6)
diff --git a/lib/route-table-stub.c b/lib/route-table-stub.c
index dd0b096d4998..75e5bf37e3b5 100644
--- a/lib/route-table-stub.c
+++ b/lib/route-table-stub.c
@@ -18,6 +18,12 @@
 #include "ovs-router.h"
 #include "route-table.h"
 
+bool
+route_table_is_standard_id(uint32_t table_id)
+{
+    return !table_id;
+}
+
 bool
 route_table_fallback_lookup(const struct in6_addr *ip6_dst OVS_UNUSED,
                             char name[] OVS_UNUSED,
diff --git a/lib/route-table.c b/lib/route-table.c
index 2bbb51c08f7e..4b93339c93c9 100644
--- a/lib/route-table.c
+++ b/lib/route-table.c
@@ -519,8 +519,8 @@ route_table_parse(struct ofpbuf *buf, void *change)
                                nlmsg, rtm, NULL, change);
 }
 
-static bool
-is_standard_table_id(uint32_t table_id)
+bool
+route_table_is_standard_id(uint32_t table_id)
 {
     return !table_id
            || table_id == RT_TABLE_DEFAULT
@@ -533,7 +533,7 @@ route_table_change(struct route_table_msg *change, void 
*aux OVS_UNUSED)
 {
     if (!change
         || (change->relevant
-            && is_standard_table_id(change->rd.rta_table_id))) {
+            && route_table_is_standard_id(change->rd.rta_table_id))) {
         route_table_valid = false;
     }
     if (change) {
diff --git a/lib/route-table.h b/lib/route-table.h
index b805e84dd64c..5e060581fd25 100644
--- a/lib/route-table.h
+++ b/lib/route-table.h
@@ -162,6 +162,7 @@ bool route_table_fallback_lookup(const struct in6_addr 
*ip6_dst,
 typedef void route_table_handle_msg_callback(const struct route_table_msg *,
                                              void *aux);
 
+bool route_table_is_standard_id(uint32_t table_id);
 bool route_table_dump_one_table(uint32_t id,
                                 route_table_handle_msg_callback *,
                                 void *aux);
-- 
2.50.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to