[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54453170.7080909@dev.mellanox.co.il>
Date: Mon, 20 Oct 2014 18:59:44 +0300
From: Ido Shamay <idos@....mellanox.co.il>
To: David Miller <davem@...emloft.net>, amirv@...lanox.com
CC: idos@...lanox.com, netdev@...r.kernel.org, yevgenyp@...lanox.com,
ogerlitz@...lanox.com
Subject: Re: [PATCH net] net/mlx4_en: mlx4_en_netpoll shouldn't call napi_schedule
when port is down
On 9/29/2014 8:47 PM, David Miller wrote:
> From: Amir Vadai <amirv@...lanox.com>
> Date: Mon, 29 Sep 2014 14:04:55 +0300
>
>> From: Ido Shamay <idos@...lanox.com>
>>
>> mlx4_en_netpoll, which is mlx4_en ndo_poll_controller callback,
>> might be called when port is down, causing a napi_schedule when
>> napi->poll callback in NULL. mutex_trylock is needed to acquire
>> the port_state lock, since other threads may grab it and stop
>> the port while we are in napi scheduling. Using trylock since in atomic
>> context.
>>
>> Signed-off-by: Ido Shamay <idos@...lanox.com>
>> Signed-off-by: Amir Vadai <amirv@...lanox.com>
>
> I don't think netpoll should 'variably succeed' on poll controller's
> ability to immediately take a trylock.
>
> You need to find a way to make this code always process the queues
> when it is called, the approach you are taking here is not a correct.
>
> If you've designed things in such a way that the locking here is
> difficult, that's unfortunate but you still have to make this
> function behave properly.
Sorry about that, aborting this commit since the problem was already
fixed in commit 3484aac1, which added netif_device_detach to driver port
stop flow and that made netconsole not to call ndo_poll_controller callback.
Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists