aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBin Zhou (bzhou2) <bzhou2@cisco.com>2021-06-21 11:09:30 -0400
committerDamjan Marion <dmarion@me.com>2021-07-13 17:16:54 +0000
commit8147559ff9ea9119b95718238713c8fbaa22e4ca (patch)
tree7de2e67d94e96706a6ce3165d640dcc81a772d9a /src
parente3ef3f6aea261c4b1a8d599cc1e76cbe8a4a670f (diff)
misc: fix init order to avoid startup warnings
Put plugin init order inside plugin instead of in vnet Type: improvement Signed-off-by: Bin Zhou (bzhou2) <bzhou2@cisco.com> Change-Id: Icbacdb3f1cb4ac9d74e3f78458e8bc333793b4d6
Diffstat (limited to 'src')
-rw-r--r--src/plugins/acl/dataplane_node.c10
-rw-r--r--src/plugins/dns/dns.c6
-rw-r--r--src/vnet/dpo/dvr_dpo.c3
-rw-r--r--src/vnet/ip/ip_init.c22
4 files changed, 14 insertions, 27 deletions
diff --git a/src/plugins/acl/dataplane_node.c b/src/plugins/acl/dataplane_node.c
index 25fa4e9410b..3a351a01a04 100644
--- a/src/plugins/acl/dataplane_node.c
+++ b/src/plugins/acl/dataplane_node.c
@@ -945,11 +945,10 @@ VLIB_REGISTER_NODE (acl_out_fa_ip6_node) =
}
};
-VNET_FEATURE_INIT (acl_out_ip6_fa_feature, static) =
-{
+VNET_FEATURE_INIT (acl_out_ip6_fa_feature, static) = {
.arc_name = "ip6-output",
.node_name = "acl-plugin-out-ip6-fa",
- .runs_before = VNET_FEATURES ("interface-output"),
+ .runs_before = VNET_FEATURES ("ip6-dvr-reinject", "interface-output"),
};
VLIB_REGISTER_NODE (acl_out_fa_ip4_node) =
@@ -968,11 +967,10 @@ VLIB_REGISTER_NODE (acl_out_fa_ip4_node) =
}
};
-VNET_FEATURE_INIT (acl_out_ip4_fa_feature, static) =
-{
+VNET_FEATURE_INIT (acl_out_ip4_fa_feature, static) = {
.arc_name = "ip4-output",
.node_name = "acl-plugin-out-ip4-fa",
- .runs_before = VNET_FEATURES ("interface-output"),
+ .runs_before = VNET_FEATURES ("ip4-dvr-reinject", "interface-output"),
};
/* *INDENT-ON* */
diff --git a/src/plugins/dns/dns.c b/src/plugins/dns/dns.c
index 0684a104bc3..0801681b8b3 100644
--- a/src/plugins/dns/dns.c
+++ b/src/plugins/dns/dns.c
@@ -3020,9 +3020,11 @@ dns_init (vlib_main_t * vm)
return 0;
}
-VLIB_INIT_FUNCTION (dns_init);
-
/* *INDENT-OFF* */
+VLIB_INIT_FUNCTION (dns_init) = {
+ .init_order = VLIB_INITS ("flow_classify_init", "dns_init"),
+};
+
VLIB_PLUGIN_REGISTER () =
{
.version = VPP_BUILD_VER,
diff --git a/src/vnet/dpo/dvr_dpo.c b/src/vnet/dpo/dvr_dpo.c
index 533ce4b39f3..5db9c803145 100644
--- a/src/vnet/dpo/dvr_dpo.c
+++ b/src/vnet/dpo/dvr_dpo.c
@@ -632,13 +632,10 @@ VNET_FEATURE_INIT (ip4_dvr_reinject_feat_node, static) =
{
.arc_name = "ip4-output",
.node_name = "ip4-dvr-reinject",
- .runs_after = VNET_FEATURES ("nat44-in2out-output",
- "acl-plugin-out-ip4-fa"),
};
VNET_FEATURE_INIT (ip6_dvr_reinject_feat_node, static) =
{
.arc_name = "ip6-output",
.node_name = "ip6-dvr-reinject",
- .runs_after = VNET_FEATURES ("acl-plugin-out-ip6-fa"),
};
diff --git a/src/vnet/ip/ip_init.c b/src/vnet/ip/ip_init.c
index b3ab90d6dc3..8894a878881 100644
--- a/src/vnet/ip/ip_init.c
+++ b/src/vnet/ip/ip_init.c
@@ -105,22 +105,12 @@ do { \
}
/* *INDENT-OFF* */
-VLIB_INIT_FUNCTION (ip_main_init) =
-{
- .init_order =
- VLIB_INITS ("vnet_main_init",
- "ip4_init",
- "ip6_init",
- "icmp4_init",
- "icmp6_init",
- "ip6_hop_by_hop_init",
- "udp_local_init",
- "udp_init",
- "ip_classify_init",
- "in_out_acl_init",
- "policer_classify_init",
- "flow_classify_init",
- "dns_init"),
+VLIB_INIT_FUNCTION (ip_main_init) = {
+ .init_order = VLIB_INITS ("vnet_main_init", "ip4_init", "ip6_init",
+ "icmp4_init", "icmp6_init", "ip6_hop_by_hop_init",
+ "udp_local_init", "udp_init", "ip_classify_init",
+ "in_out_acl_init", "policer_classify_init",
+ "flow_classify_init"),
};
/* *INDENT-ON* */