Re: netif_rx and dev stack - Solved !!!

2006-10-09 Thread Chava Leviatan
Hi, The crashes were solved. I added a delay at the exit routine, just prior to the thread stop, so that the last __kfree_skb() called by net_tx-action will take place prior to the thread stop Thanks for everyone who tried to help. chava Hello, I have a 2.4.18 machine with 2 ethernet

Re: netif_rx and dev stack - Solved !!!

2006-10-09 Thread Oron Peled
On Monday, 9 בOctober 2006 10:59, Chava Leviatan wrote: I added a delay at the exit routine, just prior to the thread stop, so that the last __kfree_skb() called by net_tx-action will take place prior to the thread stop A delay never solves a synchronization problems It only delays (pun

Re: netif_rx and dev stack

2006-10-07 Thread Chava Leviatan
. And I have also allocated the skb, and free it from the thread itself - that also worked fine - Original Message - From: Rami Rosen [EMAIL PROTECTED] To: Chava Leviatan [EMAIL PROTECTED] Cc: linux-il@linux.org.il Sent: Saturday, October 07, 2006 7:46 AM Subject: Re: netif_rx and dev stack

Re: netif_rx and dev stack

2006-10-07 Thread Baruch Even
* Chava Leviatan [EMAIL PROTECTED] [061005 16:13]: However, when i do the rmmod the machine crashes , i.e., performs a reset !! When I remove the netif_rx the rmmod returns ok. Your best bet to debug this is to connect a serial cable to the machine and set the kernel such that it logs

Re: netif_rx and dev stack

2006-10-07 Thread Rami Rosen
[EMAIL PROTECTED] Cc: linux-il@linux.org.il Sent: Saturday, October 07, 2006 7:46 AM Subject: Re: netif_rx and dev stack Chava , , when i do the rmmod the machine crashes , i.e., performs a reset !! 1) - when there is such reset , is there antyhing written in the kernel log ? can you please

Re: netif_rx and dev stack

2006-10-06 Thread Oron Peled
On Friday, 6 בOctober 2006 14:16, you wrote: Though I still think that _kfree_skb is called in the kernel context. Chava, you mix thing up. There's no such thing as kernel context. All kernel code is run either: * In interrupt context. * In process context. When a process is doing a system

Re: netif_rx and dev stack

2006-10-06 Thread Rami Rosen
Chava , , when i do the rmmod the machine crashes , i.e., performs a reset !! 1) - when there is such reset , is there antyhing written in the kernel log ? can you please check and post it ? 2) just for the sake of deubuggin : can you allocate one skb only in that module, comment the

netif_rx and dev stack

2006-10-05 Thread Chava Leviatan
Hello, I have a 2.4.18 machine with 2 ethernet interfaces. I am trying to simulate a scenario where packet has just arrived from one interface and going to the other. I have build a kernel module that runs a kernel thread. That kernel thread is invoked every second, and then it does the

Re: netif_rx and dev stack

2006-10-05 Thread Gilboa Davara
On Thu, 2006-10-05 at 16:02 +0200, Chava Leviatan wrote: Hello, I have a 2.4.18 machine with 2 ethernet interfaces. I am trying to simulate a scenario where packet has just arrived from one interface and going to the other. I have build a kernel module that runs a kernel thread.

Re: netif_rx and dev stack

2006-10-05 Thread Oron Peled
On Thursday, 5 בOctober 2006 16:02, Chava Leviatan wrote: -alloc_skb -Fill the proper sk_buff fields -Fill IP header fields -Fill ICMP header fields Have you skb_reserve()'ed headroom for all these headers? Maybe

Re: netif_rx and dev stack

2006-10-05 Thread Chava Leviatan
: Thursday, October 05, 2006 5:45 PM Subject: Re: netif_rx and dev stack On Thu, 2006-10-05 at 16:02 +0200, Chava Leviatan wrote: Hello, I have a 2.4.18 machine with 2 ethernet interfaces. I am trying to simulate a scenario where packet has just arrived from one interface and going to the other

Re: netif_rx and dev stack

2006-10-05 Thread Chava Leviatan
thread ? Chava - Original Message - From: Oron Peled [EMAIL PROTECTED] To: Chava Leviatan [EMAIL PROTECTED] Cc: linux-il@linux.org.il Sent: Thursday, October 05, 2006 9:16 PM Subject: Re: netif_rx and dev stack On Thursday, 5 בOctober 2006 16:02, Chava Leviatan wrote

Re: netif_rx and dev stack

2006-10-05 Thread Oron Peled
On Thursday, 5 בOctober 2006 21:55, Chava Leviatan wrote: Could that be the problem that the malloc and kfree are not called from the same thread ? No. The typical case for network reception is alloc from interrupt context (card irq handler), free from process context (at the socket layer,