[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF2d9jiQWx_9-1y2t4PTRwb9+=iR8ngJAbZmMnG=xVUVAY_FHg@mail.gmail.com>
Date: Fri, 22 Sep 2017 11:12:30 -0700
From: Mahesh Bandewar (महेश बंडेवार)
<maheshb@...gle.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: Petar Penkov <peterpenkov96@...il.com>,
linux-netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
David Miller <davem@...emloft.net>,
Petar Bozhidarov Penkov <ppenkov@...nford.edu>
Subject: Re: [PATCH,v2,net-next 1/2] tun: enable NAPI for TUN/TAP driver
On Fri, Sep 22, 2017 at 11:03 AM, Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
> On Fri, Sep 22, 2017 at 1:11 PM, Mahesh Bandewar (महेश बंडेवार)
> <maheshb@...gle.com> wrote:
>>> #ifdef CONFIG_TUN_VNET_CROSS_LE
>>> static inline bool tun_legacy_is_little_endian(struct tun_struct *tun)
>>> {
>>> @@ -541,6 +604,11 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
>>>
>>> tun = rtnl_dereference(tfile->tun);
>>>
>>> + if (tun && clean) {
>>> + tun_napi_disable(tun, tfile);
>> are we missing synchronize_net() separating disable and del calls?
>
> That is not needed here. napi_disable has its own mechanism for waiting
> until a napi struct is no longer run. netif_napi_del will call synchronize_net
> if needed.
Yes, that will do. Thanks.
> These two calls are made one after the other in quite a few drivers.
Powered by blists - more mailing lists