> On 16 May 2017, at 10:55, Tomas Brännström <tomas.a.brannst...@tieto.com> 
> wrote:
> 
> Hi
> I'm struggling a bit to understand how VPP processes the node graph. If we 
> take the sample plugin for example, it registers itself to the "device-input" 
> arc. Then it is run after "af-packet-input" among others. But looking at the 
> af-packet-input-node, it has the following "next" nodes in the graph:
> 
> af-packet-input            ip4-input-no-checksum [0]
>                                  ip4-input [1]      
>                                  ip6-input [2]      
>                                 mpls-input [3]      
>                               ethernet-input [4]    
>                                 error-drop [5]      
>                                   sample [6]        
> 
> But how does af-packet-input decide which of these nodes to run? Is it simply 
> in descending order so since sample is at the bottom, it will be run before 
> ethernet-input etc?

Sample plugin is using feature arcs. It registers himself for “device-input” 
arc and when you enable it for specific interface, af-packet-input node will 
start sending packets to the first node on the arc.

Key function in af-packet-input node code is (in 
src/vnet/devices/af_packet/node.c)

            /* redirect if feature path enabled */
            vnet_feature_start_device_input_x1 (apif->sw_if_index, &next0, b0);

It basically alters next0 if feature arc is enabled for specific sw_if_index ….

> 
> Also, is there a document somewhere that explains exactly how a node is input 
> into the graph? I think I understand how it works on some level, but I'm not 
> 100% clear what for example VPP actually does with ".arc_name", 
> ".runs_before" and so on.

Everything we have is public (including youtube recordings and wiki).

Feel free to ask here if you have specific questions...
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to