under the dm365 platform i want to send the encoded data to udp ,but there are some problems leading to the kernel to be tainted ,the whole program is dead ,below is the log and source code .
SDK is dvsdk_2_10_01_18,kernel release is mvl_5_0_0_demo_lsp_setuplinux_02_10_00_14.bin
Unable to handle kernel paging request at virtual address e1a00002
pgd = c18f8000
[e1a00002] *pgd=00000000
Internal error: Oops: 0 [#1]
Modules linked in: dm365mmap edmak irqk cmemk
CPU: 0
PC is at 0xe1a00002
LR is at handle_IRQ_event+0x70/0xfc
pc : [<e1a00002>] lr : [<c00753d8>] Not tainted
sp : c1eedf60 ip : 00000000 fp : c1eedf94
r10: 00000001 r9 : 0000000a r8 : 00000002
r7 : 00000001 r6 : c1eec000 r5 : 00000000 r4 : 00010000
r3 : 00000002 r2 : 00000000 r1 : e59f3194 r0 : 0000000a
Flags: nzCv IRQs on FIQs on Mode SVC_32 (T) Segment kernel
Control: 5317F
Table: 818F8000 DAC: 00000017
Process IRQ 10 (pid: 860, stack limit = 0xc1eec258)
Stack: (0xc1eedf60 to 0xc1eee000)
df60: 0000000a 00000000 00000002 c03c0280 c1eec000 c3b6c460 0000000a c03c02ac
df80: 00000002 c044d598 c1eedfcc c1eedf98 c00762f8 c0075378 c03c0280 00000032
dfa0: c0076160 c03c0280 c1eec000 c0076160 c1b41e10 00000000 00000000 00000000
dfc0: c1eedff4 c1eedfd0 c0067354 c0076170 ffffffff ffffffff 00000000 00000000
dfe0: 00000000 00000000 00000000 c1eedff8 c0053a6c c006727c 01218848 edbf7ed9
Backtrace:
[<c0075368>] (handle_IRQ_event+0x0/0xfc) from [<c00762f8>] (do_irqd+0x198/0x388)
[<c0076160>] (do_irqd+0x0/0x388) from [<c0067354>] (kthread+0xe8/0x128)
[<c006726c>] (kthread+0x0/0x128) from [<c0053a6c>] (do_exit+0x0/0x9cc)
r7 = 00000000 r6 = 00000000 r5 = 00000000 r4 = 00000000
Code: bad PC value.
prev->state: 2 != TASK_RUNNING??
IRQ 10/860[CPU#0]: BUG in __schedule at kernel/sched.c:3826
Error: get encoded 0 frame buffer to write thread
this will lead to the whole program to be dead, the udp multicast code is :
void init_udp_connect()
{
int nRecvBuf = UDP_BUFFER_SIZE;
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
/* init servaddr */
bzero(&addr, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(UDP_DES_PORT);
if(inet_pton(AF_INET, UDP_DES_IPADDR, &addr.sin_addr) <= 0)
{
printf("[%s] is not a valid IPaddress\n", UDP_DES_IPADDR);
exit(1);
}
#ifdef MULTICAST
if(bind(sockfd, (struct sockaddr *)&addr, sizeof(addr)) == -1)
{
perror("bind error");
exit(1);
}
#endif
}
UDP sending function :
void udp_tx(char *buf, int length)
{
sendto(sockfd, buf, length, 0, &addr, sizeof(addr));
}
Any question how to send udp multicaat on the dm365 platform ,make a thread or a progress to communicate with write thread ?