In vlib – vpp’s basic vector library - frames comprise a single vector, a set 
of scalar variables, and some flags.



At node creation time, each graph node registration indicates the size of a 
vector element, and the total size of scalar data. Vlib_frame_t vectors include 
up to VLIB_FRAME_SIZE (256) vector elements of the indicated size.



In the vpp/vnet use case, vector elements are 32-bit buffer handles, easily 
converted to vlib_buffer_t pointers. Most graph nodes do not use scalar data.



An sample use case for per-frame scalar data: send all these packets in the 
vector to a certain ip address, where the ip address could be stored in 4 or 16 
octets’ worth of scalar data.



HTH... Dave



-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Raj
Sent: Thursday, January 31, 2019 9:27 AM
To: vpp-dev <[email protected]>
Subject: [vpp-dev] Understanding vlib_frame_t



Hello all,



Continuing my reading of VPP code, I have a query regarding packet handling.



When a node gets a vector of packets to process, if I understand correctly, 
this would be a vlib_frame_t instance. From this vlib_frame_t instance 
arguments[0] is the offset to first  packet, arguments[1] is the offset to 
second  packet and so on, upto xx number of packets. Is this understanding 
correct? if yes, how much is the maximum size of the packet buffer?



Also what is the significance of scalar_size/vector_size in vlib_frame_t? Does 
it mean the number of frames/size of frames?



in vlib/main.c there is a statement  vec_resize (nm->pending_frames, 32). In 
here, what is pending_frames and what is the significance of number 32?



I know I have been asking too many questions over here and very grateful to all 
who answer.



Thanks a lot!



Raj
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12098): https://lists.fd.io/g/vpp-dev/message/12098
Mute This Topic: https://lists.fd.io/mt/29606187/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to