Hi,
this link https://e2e.ti.com/support/processors/f/791/p/938677/3496092
We need to add our ip,port & mac using PA LLD api's & sending packets from evm board to specific added MAC in PA example codes. We tried to added destination MAC, IP & ports but packets not receiving, & not able to see my IP address Wireshark application .
Here we added IP, MAC & ports in PA LLD api's & attched logs. Please talk to your PA LLD experts & let me know the solutions for this.
Code : example/multicoreExample/src/local_variables.c
======================================================
uint8_t pktMatchBuf[PACKET_SIZE] = {
0xe0, 0xd5, 0x5e, 0x37, 0xbc, 0xec,/* Dest MAC */ -------> This is my PC MAC address
0x02, 0x18, 0x31, 0x7e, 0x3e, 0x00, /* Src MAC */ -------> This is my EVM MAC address
0x08, 0x00, /* Ethertype = IPv4 */
0x45, 0x00, 0x00, 0x6c, /* IP version, services, total length */
0x00, 0x00, 0x00, 0x00, /* IP ID, flags, fragment offset */
0x05, 0x11, 0x32, 0x26, /* IP ttl, protocol (UDP), header checksum */
0xc0, 0xa8, 0x00, 0x7f, /* Source IP address */ -------> This is my EVM IP address
0xc0, 0xa8, 0x00, 0x71, /* Destination IP address */-------> This is my PC IP address
0x5355, 0x631, /* UDP source port, dest port */ -------> EVM port, PC port
0x00, 0x58, 0x1d, 0x18, /* UDP len, UDP checksum */
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, /* 80 bytes of payload data */
0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41,
0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81 };
Code : example/multicoreExample/src/pa_mgmt.c
==============================================
Add_MACAddress
paEthInfo_t ethInfo = {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* Src mac = dont care */ ---> Here we don't changed
{ 0xe0, 0xd5, 0x5e, 0x37, 0xbc, 0xec }, /* Dest mac */ ---->
0, /* vlan = dont care */
0x0800, /* ether type = IPv4 */
0, /* MPLS tag = dont care */
0 /* Input EMAC port = dont care */
Add_IPAddress
paIpInfo_t ipInfo = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* IP source = dont care */
{ 0xc0, 0xa8, 0x00, 0x71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* IP dest */
0, /* SPI = dont care */
0, /* flow = dont care */
pa_IPV4, /* IP type */
0, /* GRE protocol */
0, /* Ip protocol = dont care (TCP or UDP or anything else) */
0, /* TOS */
FALSE, /* TOS = dont care (seperate field since TOS=0 is valid */
0 /* SCTP destination port = dont care */
};
Add_Port
int16_t ports = {0x631};
Attached Logs after we added our IP , port & MAC in PA Multicore example code
==============================================================================
root@AM5K2E04:~# rmServer.out /usr/bin/device/k2e/global-resource-list.dtb /usr/bin/device/k2e/policy_dsp_arm.dtb
Starting rmServer.out
Daemon returned 0 as return value.
root@AM5K2E04:~# ./paMCExample.out
No command line given. Forking off 4 tasks
************************************************
*** PA Multi Core Example Started on Core 0 ***
************************************************
************************************************
*** PA Multi Core Example Started on Core 1 ***
************************************************
************************************************
Waiting for global config (core 1) ...
*** PA Multi Core Example Started on Core 3 ***
************************************************
Waiting for global config (core 3) ...
************************************************
*** PA Multi Core Example Started on Core 2 ***
************************************************
Waiting for global config (core 2) ...
Initialized RM_Client0
Initializing Free Descriptors.
QMSS successfully initialized
Unable to open below cppi tx channels...presuming linux has already enabled it
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20
Unable to open below cppi Rx channels...presuming linux has already enabled it
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 6
CPPI successfully initialized
PASS successfully initialized
Zumi : Qmss_getQueueNumber 0
Tx setup successfully done
Zumi : RX0Qmss_getQueueNumber 0
Zumi : RXQmss_getQueueNumber 0
Zumi : RX2Qmss_getQueueNumber 0
Rx setup successfully done
Add_MAC successful for corenum:0
Add_IP successful for corenum:0
Destination for the packet Rx queue: 1027 (Core 0)
Add_Port successful for corenum:0
PASS setup successfully done
Publishing global config Done from SYSINIT Core...
Publishing local config done from core num: 0...
Waiting for all cores to reach the barrier before transmission starts ...
Initialized RM_Client1
Initialized RM_Client3
QMSS Local successfully initialized
Initialized RM_Client2
QMSS Local successfully initialized
CPPI Local successfully initialized
QMSS Local successfully initialized
CPPI Local successfully initialized
PA Local successfully initialized
CPPI Local successfully initialized
PA Local successfully initialized
PA Local successfully initialized
Rx setup successfully done
Rx setup successfully done
Rx setup successfully done
Destination for the packet Rx queue: 1031 (Core 1)
Add_Port successful for corenum:1
PASS setup successfully done
Publishing local config done from core num: 1...
Waiting for all cores to reach the barrier before transmission starts ...
Destination for the packet Rx queue: 1032 (Core 3)
Add_Port successful for corenum:3
PASS setup successfully done
Publishing local config done from core num: 3...
Waiting for all cores to reach the barrier before transmission starts ...
Destination for the packet Rx queue: 1033 (Core 2)
Add_Port successful for corenum:2
PASS setup successfully done
Publishing local config done from core num: 2...
Waiting for all cores to reach the barrier before transmission starts ...
Packet Transmission Start ... core id: 2
Packet Transmission Done.
Wait for all packets to be Received ... core num: 2
Packet Transmission Start ... core id: 0
Packet Transmission Done.
Wait for all packets to be Received ... core num: 0
Packet Transmission Start ... core id: 1
Packet Transmission Done.
Wait for all packets to be Received ... core num: 1
Packet Transmission Start ... core id: 3
Packet Transmission Done.
Wait for all packets to be Received ... core num: 3
Waiting for packet received after that nothing will displayed Please let me know the solutions for this,
Regards,
SanthanaKumarS