I have been looking through the simpleExample that comes with the PA in the pdk subdirectory and I had a few questions that need clarification.
The example talks of two tables of layer 2/3 configuration information. When setting up the MAC address with the pa_addMac it make changes to the memL2Ram by writing the mac address amongst other things into the memory. Similarly it does this for the IP address into the memL3Ram when doing pa_addIP. However where does the port info get stored or is that because it is just a port number so it does not need to be saved like the IP and Mac addresses? I gather these are just duplicates of the actual tables stored in the PA for the purpose of preparing the actual command to send to the PA to setup the tables and the PA hardware actually contains the LUT table and the configuration is just supposed to write to those tables? If doing custom LUT2 would I need a layer 4 Ram section?
The setupFlow0 function sets up the default return queue as 902 which is what is used for PA cmd reply. However in the case of pkts received by the PA on loopback, the CONFIG_ADDPORT0_ROUTE is used in config.h to set up the queue CONFIG_FIRST_RX_PKT_Q i.e. 904 for routing packets to the host overriding this default setup. The CONFIG_PACOM_REPLY is also setup to use flow 0 and it uses the dest queue as 902 also. I guess my question really is why the need to setup the default return queue number as it is always setup by the PA for all packets being received such as command reply and others packets being received from the loopback. Is it just for completeness sake?
The length of the buffers are setup to be 304 bytes. Now for configuration of PAs what is the maximum size of Tx packets required for configuration only? Is it okay to use 256 byte buffers and use multiple of these when TX during PA config setup just like for regular Tx by PA of Ethernet packets. In other words can the configuration by broken into multiple packets and pushed onto the queue as a multi-packet configuration, the response of which to a command like say Pa_addMac is then forwarded back to the LLD through the Pa_forwardResult.
If I want to allocate 256 byte buffers for all incoming packets to the DSP through the PA in external memory. How do I go about ensuring that the first 12 bytes off every packet are not written to? I need to put some proprietary stuff in those bytes when stored in external memory. Would that be through the rx_sop_offset in the flow to be configured? So for example an Ethernet packet greater than 256 bytes would use multiple buffers with the first 12 bytes of each buffer skipped.
Thanks, Aamir