Use vlib_node_add_next(...) to create the graph arc at your convenience. Memorize the arc index when you create it, so you can set e.g. next0 to the correct value in MyNode.
HTH... Dave -----Original Message----- From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Prashant Upadhyaya Sent: Wednesday, October 24, 2018 2:15 AM To: vpp-dev@lists.fd.io Subject: [vpp-dev] Regarding VLIB_REGISTER_NODE Hi, I have a registered node like the following -- VLIB_REGISTER_NODE (MyNode) = { .name = "MyNode", . . .n_next_nodes =N, .next_nodes = { [firstone] = "error-drop", [secondone] = "ip4-lookup", [thirdone] = "ip6-lookup", [fourthone] = "may-or-may-not-be-loaded-node", . . Now I want to be able to run the system whether the fourth one above is loaded or not as a .so The business logic in my code takes care that I never use the fourth one in case it is not loaded. I have a private configuration which tells me whether the fourth one is present in deployment or not. But the VLIB_REGISTER_NODE requires the wiring at compile time like the above. And the system will not startup if the fourth one is not actually present in deployment So I want to avoid mentioning the fourth one in the VLIB_REGISTER_NODE of MyNode as one of the next_nodes. And then how to add it as one of the next_nodes from runtime for MyNode when my private configuration tells me that the fourthone indeed is existing in the deployment ? I am looking for some API to wink in the fourth one at runtime into .next_nodes of MyNode. Regards -Prashant
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10953): https://lists.fd.io/g/vpp-dev/message/10953 Mute This Topic: https://lists.fd.io/mt/27616631/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-