TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
Keystone Multicore Forum (C66, 66A, AM5)
PA_SimpleExample (c6670) questions,
PC based udp packet generator <====Ethernet connection====> [c6670 EVM running PA_SimpleExample project].
I have a PC based udp packet generator which is generating UDP packets [the packet contents is/are SAME as provided in the PA_SimpleExample project]. Here are the steps i am following
1.I have done few modifications for the Project to delay a bit more [kind of a large delay wait state] just before findPacket().
2. I commented the function sendPacket().
3. Following are my settings
Int cpswLpbkMode = CPSW_LOOPBACK_NONE; //CPSW_LOOPBACK_PA;Int cpswSimTest = 0;
4. My aim/objective is to generate a single UDP packet [which is same in contents as the packet in the PA_Simpleexample project] and to make the EVM running the project receive the packet.
5. i made the switch 2 of SW9 to be off [this if i understand makes static IP Configuration] to make it accept a STATIC IP address. Is this correct ?.
6. My laptop/PC is on static IP Configuration [Note this IP is local to IP configured on the evm board through Pa_addIp() ].
Finally, what i see is there is no packet being received on the evm board. As far as i have seen all my steps are complete/fullest, please let me know if i am missing anything.
c6670 EVM board is connected to pc/laptop through Ethernet straight cable.
software configuration: -
ccsv5 : - .69
mcsdk : - .21
Let's discuss what you want to do at first. I believe that you want to modify the PA_SimpleExample project to recerive some packets generated and sent by PC, right?- Have you configured PASS to receive such packet?- Have you configured the CPSW ALE table to receive such packet?- Can you show me the packet taht you intend to send and receive?- You can dump the CPSW statistics at address 0x2090b00 and 0x2090c00.
Many a Thanks for quick reply. Yes, my aim is to receive the udp packets generated by the pc.
1. PASS configuration yes though setupPa().
2. CPSW ALE Table. here my understanding is nill, i assume Init_Cpsw() will do the stuff.
10 11 12 13 14 15 00 0e a6 66 57 04 08 00 45 0000 6c 00 00 00 00 05 11 a5 97 9e da 6d 0a 01 0203 04 12 34 00 00 00 58 e1 98 32 33 34 35 36 3738 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 4748 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 5758 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 6768 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 7778 79 7a 7b 7c 7d 7e 7f 80 81
4. I will get you the dump in immediate next post [little time from now].
I am not sure which version of PDK that you are using. We do not program ALE table unless cpswSimTest is set at tle latest version of PDK. Besides, please provide dump before and after you send packets from PC. I will recommend you to confim that you are able to receive packet from EVM at first. Then you can write a PC program to swap the MAC address of the received packet and send it back to EVM.
PDK version : - pdk_C6670_1_0_0_21
NDK version : - ndk_2_21_00_32
CCSV5 : - .69 [Version: 5.2.0.00069]
MCSDK : - .21 [mcsdk_2_00_09_21]
I will be sending the dump now itself [few mintues from now].
I see the values from 0x2090b00 to 0x2090c00 [in memory brower] being zeros. I see the wireshark capture shows the packets being sent out [i mean atleast they are leaving the ethernet port of laptop/pc].
1. In the example project, the destination ip is being set to 188.8.131.52 and i am setting my laptop ip to 184.108.40.206 [255.255.255.0]. let me know if i am incorrect here ?
2. I am running this example on core0 [c6670] only.
the other observation is,
even in the normal mode [i mean in the example, with purely no changes], i see ZERO values in taht range of address 0x2090b00 to 0x2090c00 .
1. i am looking at the values after putting breakpoint at
System_printf ("Test Completed successfully\n");
let me know, there is any other appropriate places for the breakpoint.
The simpleExample use internal PASS loopback by deafult. In other words, it does not send the packet out. You should run the same test by using emacExample.
Please confirm the following in simple words
1. The PA_simpleExample CANT do any ethernet packet communication with external world [laptop/pc].
2. "In other words, it does not send the packet out" ==> W.R.T to what you told, probably i am not clear in explaining myself. I WANT PC/Laptop to send UDP packet to EVM board.
PC[rj 45 connector] ==udp sendpacket==> c6670 evm [rj45 connector]
do you mean that the PA config does not allow you to send packet inside. can you please reason out why?
1. The PA_simpleExample CANT do any ethernet packet communication with external world [laptop/pc].[Eric] The PA_simpleEXample does not send packet to the ethernet port (CPSW) by default. Int cpswLpbkMode = CPSW_LOOPBACK_PA;
/* Send the packet out the mac. It will loop back to PA if the mac/switch have been * configured properly */ if(cpswLpbkMode == CPSW_LOOPBACK_PA) Qmss_queuePush (gvTxQ, hd, len4, CONFIG_SIZE_DESC, Qmss_Location_TAIL); else Qmss_queuePush (gvTxQ, hd, len4, CONFIG_SIZE_DESC, Qmss_Location_TAIL);
You need to change the cpswLpbk_mode to other values.
/* Define LoopBack modes */ #define CPSW_LOOPBACK_NONE 0#define CPSW_LOOPBACK_INTERNAL 1#define CPSW_LOOPBACK_EXTERNAL 2#define CPSW_LOOPBACK_PA 3
Which mode do you use to send and receive packet? Can you do the same CPSW dump before and after you run the test successfully?
If you happen to read my first post [in this same thread], i have already mentioned the info
i have put diagram and statement also to explain what i am trying to achieve. I assume this diagram itself tells i DONT want any loop back
PC based udp packet generator <====Ethernet connection====> [c6670 EVM running PA_SimpleExample project].
My aim/objective is to generate a single UDP packet [which is same in contents as the packet in the PA_Simpleexample project] and to make the EVM running the project receive the packet.
with above statements, i MEAN I DONT WANT ANY LOOPBACK, i WANT ONLY PC to EVM connection though ethernet cable.
As i reiterate again, the CPSW dump before and after is all zeros
If you read my above two posts again, i did following experiments
1. I did run the ccs project [here project means PA_SimpleExample project] on evm board c6670 as is [as is means i didnt modify anything in the code] and when i see dump at the address [you mentioned],its all zeros.
2. I asked you in my earlier post, which is the appropriate place to view the dump and i told at what point i am viewing the dump.
[i am looking at the values after putting breakpoint at
System_printf ("Test Completed successfully\n");] ]
3. finally, whether i run the PA_Simpleexample in evm board c6670,i am not seeing any values in the address range you mentioned, kindly let me know is there any structure [structure means data structure] which i can view in the expressions windows for the cpsw stats.
4. Also let me reiterate again and again, i am running the project on c6670 evm board.
My kind request is to please go through my previous posts [in THIS same thread/chain] and please see if i am missing anything.
after much debugging and going through all possible documents, i found that i am doing a simple silly mistake [too bad on my part, i accept it] and the mistake was i was using simulator based .ccxml [Though i was running on the c6670 board]. sorry for earlier incorrect cpsw stats, here are the new stats
but my project is still not coming to successfull completion.
We are geting there. Can you show me the rx and tx statistics of CPPI port (0x2090b00)? Please dump the following memory location in 32-bit format: 0x2000000-0x200005f (24 32-bit words) after you forward the packet.
Is it possible to use a private (controlled) network, so that we know what and how many packets are delivered to the EVM board.
Thanks for your reply.
w.r.t to you question [Is it possible to use a private (controlled) network, so that we know what and how many packets are delivered to the EVM board.]
Yes, my network is private controlled, i mean i have pc/laptop connected to EVM [c6670] board through a straight cable [its a point to point connection].
from udp packet generator, i sent 2 packets and here i am attaching the captures
[C66xx_0] function findPacket: Timeout waiting for data packet[C66xx_0] --- PA STATS --- C1 number of packets: 6C1 number IPv4 packets: 0C1 number IPv6 packets: 0C1 number custom packets: 0C1 number SRIO packets: 0C1 number llc/snap fail: 0C1 number table matched: 0[C66xx_0] C1 number failed table matched: 3C1 number Ingress IP frags: 0C1 number IP depth overflow: 0C1 number vlan depth overflow: 0C1 number gre depth overflow: 0C1 number mpls packets: 0C1 number of parse fail: 0C1 number invalid [C66xx_0] IPv6 opts: 0C1 number of Egress IP frags: 0C1 number of silent discard: 3C1 number of invalid control: 0C1 number of invalid states: 0C1 number of system fails: 0
[C66xx_0] C2 number of packets: 5C2 number of UDP packets: 0C2 number of TCP packets: 0C2 number of custom packets: 0C2 number of silent discard: 0C2 number of invalid control: 0
[C66xx_0] Modify number of command file: 0
[C66xx_0] Function findPacket failed
=============================udp tool packet vals =====
10 11 12 13 14 15 00 0e a6 66 57 04 08 00 45 0000 6c 00 00 01 00 05 11 a5 97 9e da 6d 0a 01 0203 04 12 34 00 00 00 58 e1 98 32 33 34 35 36 3738 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 4748 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 5758 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 6768 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 7778 79 7a 7b 7c 7d 7e 7f 80 81
i have a doubt, the address 0x2090b00 belongs to [EMAC port 0 = SGMII_0 = switch port 1 = AMC backplane lines]
i have a doubt, the address 0x2090c00 belongs to [EMAC port 1 = SGMII_1 = switch port 2 = RJ45 connector] ? please confirm/correct my understanding.
one more information i wanted to provide. I have added udp port based classification custom rules [but if i understand, that are at Level 4, here what i see is Level 2 MAC itself is failing].
The other part is udp port classification [256 ports per queue] works in loopback and it classifies
Port Range start Port Range End QueueNumber
0x0000 0x00FF 904
0x0100 0x01FF 905
0x0200 0x02FF 906
0x0300 0x03FF 907
so the example works in loopback mode, so i assume the code which i added [w.r.t to ports based classification is not coming in the PC<=>EVM board connection based testing]. please let me know if i am doing anything incorrect.
based on your suggestion, i made the changes as below
//if(cpswLpbkMode != CPSW_LOOPBACK_NONE) CSL_CPSW_3GF_enableAleBypass();
Now with above changes, i pumped in 10 packets [in which only 5 packets are correct and remaining 5 packets are incorrect, this is due to bug in packet generator tool :-( ], so based on that 5 packets will be custom packets which will reach the Rxqueue [host queue] after all classification checks.
[C66xx_0] function findPacket: Timeout waiting for data packet[C66xx_0] --- PA STATS --- C1 number of packets: 23C1 number IPv4 packets: 10C1 number IPv6 packets: 0C1 number custom packets: 0C1 number SRIO packets: 0C1 number llc/snap fail: 0C1 number table matched: [C66xx_0] 20C1 number failed table matched: 0C1 number Ingress IP frags: 5C1 number IP depth overflow: 0C1 number vlan depth overflow: 0C1 number gre depth overflow: 0C1 number mpls packets: 0C1 number of parse fail: 0C1 number inval[C66xx_0] id IPv6 opts: 0C1 number of Egress IP frags: 0C1 number of silent discard: 5C1 number of invalid control: 0C1 number of invalid states: 0C1 number of system fails: 0
[C66xx_0] C2 number of packets: 10C2 number of UDP packets: 0C2 number of TCP packets: 0C2 number of custom packets: 5C2 number of silent discard: 0C2 number of invalid control: 0
with the code changes above, the example works for 5 packets [which is inline with my expectations]. Thanks Eric and now i have to investigate why and how this ALEBypass condition affected my project.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.