[ofa-general] Re: [PATCH] ipoib: don't enable napi when it's already enabled

Yossi Etigin yosefe at Voltaire.COM
Wed Jan 14 11:53:58 PST 2009


Well, now after I sent and you applied a patch that fixes the issue
by moving napi_enable() after ipoib_pkey_dev_delay_open(), it seems
to be broken.
If the pkey is never found, ipoib_open() will not be called again and
napi will never be enabled. Then, in napi_disable(), it gets stuck in an 
infinite loop (polling for NAPI_STATE_SCHED bit).
I think the fix (to the fix) should be like the one in the patch below.

Roland Dreier wrote:
>  > -	napi_enable(&priv->napi);
>  > -	set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
>  > +	if (!test_and_set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
>  > +		napi_enable(&priv->napi);
>  > 
>  > 	if (ipoib_pkey_dev_delay_open(dev))
>  > 		return 0;
> 
> Does it work just to move the napi_enable() to after the
> ipoib_pkey_dev_delay_open() test?
> 
>  - R.



More information about the general mailing list