On 11 May 2006 04:24:25 -0000, kiran kumar <kiran07_nitk@xxxxxxxxxxxxxx> wrote:
hi all,
i am sending the code thru attachment to the kernelnewbiws@xxxxxxxxxxxx
On Wed, 10 May 2006 Manjunath Naik wrote :
>On 10 May 2006 09:10:17 -0000, kiran kumar <kiran07_nitk@xxxxxxxxxxxxxx >
>wrote:
>>
>> hi all,
>> i am implementing delay for the acknowledgement of 10th packet using
>>timer_list timer.i am using kernel 2.6.11.1
>> initiallyi have declared the structure struct timer_list *my_timer to be
>>global in the file tcp_output.c
>> i initialized the timer using init_timer in the function tcp_send_ack
>>the inititalization is
>> my_timer->expires = jiffies+10*HZ
>> my_timer->data="">>> my_timer->function = &my_function
>>i defined my_function after the function tcp_send_ack
>> in this function i am calling tcp_transmit_skb(sk,skb) which was called
>>in the tcp_send_ack
>> for the 10th pkt i use the delay!
>>now when i compile & boot i get the kernel panic with oops message as:
>>
>>EFLAGS:00010296
>>EIP is at my_function + 0x36/0x60
>>eax:ddf1f880 ebx:00000000 ecx:00000002c edx:df7ef740 esi:00000200
>>edi:ddf1f880 ebp:c02fabb0 esp:c0428fa4 ds:007b es:007b ss:0068
>>process swapper (pid:0, threadinfo=c0428000 task=c037cba0)
>>stack: 00000200 00000200 c13f6a60 c012d7f9 de446104 de446000 c13f7fa0
>>c13fff80
>>c0428000 c0428fc8 c0428fc8 00000001 c03ddb88 c0421bc0 0000000a c0129262
>>00000000 c0428000 c03e6fa0 c04251a0 004da007 c010664b
>>
>>call trace:
>> [<c012d7f9>]run_timer_softirq+0xe9/0x1c0
>> [<c0129262>]__do_doftirq+0x72/0xf0
>> [<c010664b>]do_softirq+0x5b/0x60
>>------------------------
>>------------------------
>> [<c0104be4>]apic_timer_interrupt+0x1c/0x24
>> [<c0102030>]default_idle+0x0/0x30
>> [<c0102056>]default_idle+0x26/0x30
>> [<c01020ee>]cpu_idle+0x4e/0x70
>> [<c03e79b5>]start_kernel+0x165/0x1d0
>> [<c03e7380>]unknown_bootoption+0x0/0x200
>>
>>code: 74 24 04 89 7c 24 08 74 0c 8b 74 24 04 8b 7c 24 08 83 c4 0c c3 a1
>>48 63 38 c0 ba 20 00 00 00 e8 51 29 e5 ff b9 2c 00 00 00 89 c7 <f3> a5 89
>>c2 89 f0 e8 af cd ff ff a1 e8 1b 4b c0 8b 74 24 04 8b
>><0> kernel pabnic=not syncing:Fatal exception in interrupt
>>>>where i am going wrong! pls help me on this !
>>could u pls tell me how to set the delay to 2millisecs.>>if i spoof the acks for 10th packet and if i want to introduce delay b/w
>>consecutive acks shoulsd i have to use the array of timer_list pointers!!!!
>>
>>warm regards,
>>
>>kiran kumar s.k
>>N.I.T.K,surathkal
>>
>>
>>
>
>what does the my_function contains? Can post the code of my_function which
>is implemented by you. That may help someone who doesn't understand OOPS
>message properly (like me)
>
>for timer implementation you can refer
> linux/kernel/timer.c:schedule_timeout function
>
>Thanks
>Manjunath Naik
Hi kiran,
keep kernelnewbies email ID also in loop so that it may help others in future,
Meanwhile since I was new to "kernel debugging" I was searching some articles related to this.
I found the following links are very useful. If you have time you can go through it. I feel these are very good article to new to kernel debugging.
h ttp://buffer.antifork.com/linux/kernel_debugging_1.txt
http://buffer.antifork.com/linux/kernel_debugging_2.txt
http://buffer.antifork.com/linux/kernel_debugging_3.txt
www.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf
Thanks
Manjunath Naik