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: <> On Behalf Of Sara Gittlin
Sent: Tuesday, March 13, 2018 9:44 AM
Subject: [vpp-dev] order of running 2 plugins

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

are these settings OK ? is there any other setting required ?

Thank you in advance


You receive all messages sent to this group.

View/Reply Online (#8524):
View All Messages In Topic (2):
Mute This Topic:
New Topic:

Change Your Subscription:
Group Home:
Contact Group Owner:
Terms of Service:

Reply via email to