Subject: Re: pktgen

From: Ben Greear <[email-masked]>
Date: Thu, 30 Nov 2006 09:33:43 -0800

Robert Olsson wrote:
> Hello!
>
> Seems you found a race when rmmod is done before it's fully started
>
> Try:
>
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> index 733d86d..ac0b4b1 100644
> --- a/net/core/pktgen.c
> +++ b/net/core/pktgen.c
> @@ -160,7 +160,7 @@
>  #include <asm/div64.h>		/* do_div */
>  #include <asm/timex.h>
>  
> -#define VERSION  "pktgen v2.68: Packet Generator for packet performance testing.\n"
> +#define VERSION  "pktgen v2.69: Packet Generator for packet performance testing.\n"
>  
>  /* #define PG_DEBUG(a) a */
>  #define PG_DEBUG(a)
> @@ -3673,6 +3673,8 @@ static void __exit pg_cleanup(void)
>  	struct list_head *q, *n;
>  	wait_queue_head_t queue;
>  	init_waitqueue_head(&queue);
> +	
> +	schedule_timeout_interruptible(msecs_to_jiffies(125));
>  
>  	/* Stop all interfaces & threads */
>  
>   
That strikes me as a hack..surely there is a better method than just adding
a sleep??

Ben

-- 
Ben Greear <[email-masked]> 
Candela Technologies Inc  http://www.candelatech.com