The feature arc infra handles dispatching packets from feature to feature, depending on the set of enabled features.
It's fine to define static arcs to e.g. error-drop, but there's no need to manually dispatch packets to the next feature node. Use vnet_get_config_data(...) to set next0 as shown below: Top of the node dispatch function: u8 arc_index = vnet_feat_arc_<arc_name>.feature_arc_index; vnet_feature_config_main_t *cm = &fm->feature_config_mains[arc_index]; In single/dual/quad loops, per packet: vnet_get_config_data (&cm->config_main, &b0->current_config_index, &next0, 0 /* sizeof (c0[0]) */ ); There are plenty of examples. HTH... Dave -----Original Message----- From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Sara Gittlin Sent: Tuesday, March 13, 2018 9:44 AM To: vpp-dev@lists.fd.io Subject: [vpp-dev] order of running 2 plugins Hi, i've implemented 2 plugins plgA and plgB 1. plgA is running immediately after 'device-input' node 2. plgB should run after plgA 3. interface-output should run after plgB i set this these for plgA and plgB VNET_FEATURE_INIT (plgA, static) = { .arc_name = "device-input", .node_name = "plgA", .runs_before = VNET_FEATURES ("plgB"), }; VNET_FEATURE_INIT (plgB, static) = { .arc_name = "plgA-input", .node_name = "plgB", .runs_before = VNET_FEATURES ("ethernet-input"), }; and i set the next0 accodingly in the nodes for example in plgA next0 = AMETHYST_POLICER_NEXT_plgB_INPUT in plgB i set next0 = AMETHYST_POLICER_NEXT_ETHERNET_INPUT are these settings OK ? is there any other setting required ? Thank you in advance -Sara -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8524): https://lists.fd.io/g/vpp-dev/message/8524 View All Messages In Topic (2): https://lists.fd.io/g/vpp-dev/topic/14532428 Mute This Topic: https://lists.fd.io/mt/14532428/21656 New Topic: https://lists.fd.io/g/vpp-dev/post Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656 Group Home: https://lists.fd.io/g/vpp-dev Contact Group Owner: vpp-dev+ow...@lists.fd.io Terms of Service: https://lists.fd.io/static/tos Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub -=-=-=-=-=-=-=-=-=-=-=-