If I want to change an existing networking application to use usdpaa how do I go bout it?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

If I want to change an existing networking application to use usdpaa how do I go bout it?

876 Views
priyaagarwal
Contributor III

1. If I use the same logic as hello_reflector, should I store the full application as call back routine.

2. If I do the above, do I have to remove all the code in which the application communicates with OS Stack.

It doesn't seem correct as this would mean changing the full application itself.

0 Kudos
3 Replies

743 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,


In order to make USDPAA application code development easier, we bring in PPAC/PPAM module, the application source code can be organized into two parts, the "PPAC" (Packet-

Processing Application Core) and a "PPAM" (Packet-Processing Application Module). The idea behind this is that many packet-processing applications would likely only differ  in the logic that looks at the packet and determines what to do with it. The PPAM portion implements this application specific logic, and PPAC component represents the common infrastructure to implement initializing devices, handling flow control, implementing a CLI, managing threads and buffers, etc. You could get detailed description in Linux SDK user manual.

I recommend you to start with the application "reflector" rather than "hello_reflector", if you want to use PPAC/PPAM module.

In addition, USDPAA application doesn't use Linux OS Stack, has its specific DPAA network drivers, bypassing the normal Linux DPAA driver and stack processing,

If you need further assistance, please feel free to let me know.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

743 Views
priyaagarwal
Contributor III

I recommend you to start with the application "reflector" rather than "hello_reflector", if you want to use PPAC/PPAM module.

In addition, USDPAA application doesn't use Linux OS Stack, has its specific DPAA network drivers, bypassing the normal Linux DPAA driver and stack processing,

     I have gone through reflector as well. In that too, the full application is stored as a callback. I am trying to make 'squid' (an existing app) run while using usdpaa. So I guess right thing to do is to store squid as a callback,which will be my PPAM.

However, squid currently uses OS stack to communicate. So once I use it in USDPAA framework, do I need to remove the existing functions that communicate with OS Stack (like read/write) from the code. Because as you said USDPAA app doesn't use OS Stack.

0 Kudos

743 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Priya Agarwal,

You could refer to reflector.c to implement PPAM interface initialization, PPAM Rx and Tx initialization and Packet Processing functions.

In USDPAA framework applications, you could use this way to implement communicate with Linux Kernel Stack, USDPAA puts network packets to Linux Kernel Rx queue after receiving and processing them, then

assign packets to Linux OS stack.

You could use "MAC-less" to implement communication between Linux and USDPAA, "MAC-less" is a internal virtual network interface. One can interpose an OH port between a Linux MAC-less net device and a USDPAA MAC-less interface, where the Linux-to-USDPAA path goes through the OH port.

USDPAA lpm-ipfwd application provides a MAC-less use case, please refer to the section "How to ping MAC-less interface ?" in SDK user manual for how to use MAC-less in this application.

Linux SDK user manual also contains detailed description about MAC-less technology.

Thanks,

Yiping