This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PA_emacExample problem on Packet receive

Hi to all

I try to send/receive packet between PC and C6678 EVM using Packet Accelerator (I modify use Pa_emacExample PDK 1_1_2_6)

Change loopback mode to none:

Int cpswSimTest = 0;

 Int cpswLpbkMode = CPSW_LOOPBACK_NONE;

Change Dest MAC address to my PC MAC and change src,dest IP in pktMatch[]

Packet receive on PC correctly (I use wireshark)

for receive packet from PC to EVM I do this steps

I bypass ALE to transfer all packet from port 2(J45) to port 0

    //if(cpswLpbkMode != CPSW_LOOPBACK_NONE)

        CSL_CPSW_3GF_enableAleBypass();

I see 0x2090b00 and 0x2090c00 range in memory browser after bypass ALE packet transmit to port 0

my packet dest mac is 10:11:12:13:14:15 (I use packet builder to to create packet on PC)

I comment this line in pa_mgmt.c because my packet dest,src mac set correct

    /* Use Source MAC as destination MAC if non-loopback

    if(cpswLpbkMode == CPSW_LOOPBACK_NONE)

        memcpy(ethInfo.dst, srcMac, sizeof(srcMac));

    */ 

In this step I want to route all packet directly to Host in result I change AddMACAddress()

routeInfo =     {   pa_DEST_HOST,        /* Continue parsing

                0,                        /* Flow Id = dont care */         

                0,                        /* queue = dont care */           

                -1,                       /* multi route = dont care */

                0xaaaaaaaa,

nFailInfo =     {   pa_DEST_HOST,         /*EA: Toss the packet  */          

                    0,                    /* Flow Id = dont care */       

                    0,                    /* queue = dont care */         

                    -1,                   /* mutli route = dont care */   

                    0xaaaaaaaa,           /* multi route = dont care */

But i can’t receive packet in EVM from PC :

Port = 0, MAC address = 00:01:02:03:04:05, unicast_type = 3
Port = 2, MAC address = d8:5d:4c:81:f3:ac, unicast_type = 3
Port = 2, MAC address = 00:15:65:12:06:19, unicast_type = 3
Received 0 packets so far...
Received 0 packets so far...
Received 0 packets so far...

And interrupt not trigged 

Packet accelerator is powerful tool for using network and i like to learn about it anybody can help me that what's wrong?  

thanks

Ebi

  • Hi,
    If you want to receive packet from PC then I would like to suggest to use the following project with "ReceivePacket()" API.
    C:\ti\pdk_C6678_1_1_2_6\packages\ti\drv\exampleProjects\PA_multicoreExample_exampleProject
  • thanks for your useful reply Titusrathinaraj ,
    using of "ReceivePacket()" API more simple than Cpsw_RxISR but packets not route from PA to host
    i continue work on issue
    I'll be glad to hear some insight from anyone.

    Ebi
  • i replace receivepacket() but gRxCounter remain 0

    i see some E2E post with same problem in receive packet but i can't solve problem

    in this answered post i don't understand  's post:

    Fail to Receive ARP Request on PA_emacExample (C6670) - Processors forum - Processors - TI E2E support...

    e2e.ti.com
    Hi, now I'm working on C6670 EVM PA module in which I have this problem. The setup is: PC --> sgmii-1 --> host/evm switch_0 = 00:01:02:03:04:05 sgmii-1

    anybody can help me?

    thanks

    Ebi

  • Update:

    i continue working on project i think problem in routing becuase i see packet received to Port 0 from Port 2 

    below is my packet that send from PC to EVM

    dest MAC :10 11 12 13 14 15

    dest port : 0x5678

    dest IP :192.168.5.2

    10 11 12 13 14 15 6C F0 49 43 E3 E9 08 00 45 00 00 6C 00 00 00 00 05 11 2A 25 C0 A8 05 0A C0 A8 05 02 12 34 56 78 00 58 15 17 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81

    anybody can help me to route packet from PA to Host (Link or solution)?

    thank you 

    Ebi

  • Hi

    my problem is resolved i can send and receive packet between EVM and PC

    this is my packet:

    00 01 02 03 04 05 6C F0 49 43 E3 E9 08 00 45 00 00 6C 00 00 00 00 05 11 2A 25 C0 A8 05 0A C0 A8 05 02 12 34 56 78 00 58 15 17 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81

    i enable ALE

    i change Dest MAC from 0x10, 0x11, 0x12, 0x13, 0x14, 0x15 to  0x00, 0x01, 0x02, 0x03, 0x04, 0x05   in Add_MACAddress() 


    i remove below lines:

        if(cpswLpbkMode == CPSW_LOOPBACK_NONE)

            memcpy(ethInfo.dst, srcMac, sizeof(srcMac));

    in cpsw_mgmt.c ::Switch_update_addr

    i change if (cpswSimTest) -> if (cpswSimTest || (cpswLpbkMode == CPSW_LOOPBACK_NONE)

    and i use PacketReceive() API from PA_multicoreExample 

    Thanks  ,  ,  

    Ebi

  • Hi Ebi,
    Sounds great!
    Thanks for your update.

    Thanks for the shared solution.

    Could you please attach the modified code here, it may help to other community members as well.