[dpdk-users] Questions about IP-PIPELINE

Singh, Jasvinder jasvinder.singh at intel.com
Fri Apr 29 15:38:04 CEST 2016


Hi Xiaoban,

Please see response inline,

> -----Original Message-----
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of Wu, Xiaoban
> Sent: Tuesday, April 26, 2016 4:21 PM
> To: users at dpdk.org
> Subject: [dpdk-users] Questions about IP-PIPELINE
> 
> Dear DPDK,
> 
> 
> I am a beginner of DPDK, recently I want to work on IP-PIPELINE. I am reading
> the source codes by myself, but I think it could be more efficient if the
> following questions can be answered.
> 
> 
> Question 1: The ip_pipeline.cfg is parsed at runtime, what is the data type or
> structure that stores these information?
 
In ip_ipeline/app.h, "app_params" structure stores all parsed information related to nic ports, software rings between the pipelines and all other configuration parameters required for initializing and running the application. When configuration file is parsed (ip_pipeline/config_parse.c), app_params structure fields are populated with the parsed information and validated  using ip_pipeline/config_check.c

 > Question 2: Suppose the configuration file has been parsed and stored,
> where and how these information will start to have effect, like in which
> functions, could you please list some of these functions?

 In ip_pipeline/main.c,  all the functions required to launch and run the ip_pipeline applications are invoked in "main" function. Once the configuration file is parsed and parameters values are checked, application initilisation takes place which involves EAL initialisation (please refer  http://dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html) followed by mempool, hardware(nic)/software (rings) queues initialisation.
The commands accepted by all the pipeline modules as well as specific to pipeline modules are registered. Then pipelines modules are initialised - first, the front end part (CLI commands definitions specific to the pipeline) of the pipeline modules are initialised.  Then, the back-end part of the pipelines which performs packet forwarding and handles commands sent from CLI, is launched on the assigned cores. All routines releted to application initialisation are implemented in app_init() routine (ip_pipeline/init.c).
 
> Question 3: If multiple threads (cores) are running at the same time, can
> these threads send or receive packets at the same time? If so, are the
> packets stored separately in each own TX or RX queue, or merged into a
> single data structure? Where are these data structures defined and used, can
> you please list some functions that explicitly involve these data structures?
> And moreover, which functions are used to send or receive the packets?

Depending upon the application, different cores can be pinned to different queues of the network interface port and they can receive and transmit packets in parallel.  For more details, in addition to abovementioned files, refer- lib/librte_port and lib/rte_pipeline libraries.   

> Some other unrelated questions, but they could help me see the picture

Please try to put questions related to different topics on separate emails so that folks can get an idea from subject line and quickly respond to them.  
 
> Question 4: What is igb-uio driver? What is the purpose of binding the NIC
> with igb-uio driver?

To understand the need of binding igb_uio to DPDK application, please refer link below,
http://dpdk.org/doc/guides-2.2/linux_gsg/build_dpdk.html#loading-modules-to-enable-userspace-io-for-dpdk

> Question 5: Does the "hugepage" uses physical memory or physical disk
> space?

It uses physical memory.  On how to reserve hugepages for DPDK applications, 
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html

> Question 6: In the codes, there are both physical address and virtual address
> in the struct rte_mbuf, struct rte_memzone, struct rte_memseg. If virtual
> address is the memory address like a pointer, what is physical address and
> what is the usefulness of physical address?

The physical addresses refer to addresses in physical memory. These addresses are generally used in direct memory access (DMA) I/O operations as use of this mechanism can greatly increase throughput to and from a device. For more detailed information on this, refer - 
http://www.oreilly.com/openbook/linuxdrive3/book/ch15.pdf

> Thanks so much for your reply and help.
> 
> 
> All the best,
> 
> Xiaoban
> 
>
Thanks,
Jasvinder
 



More information about the users mailing list