From: David Miller Subject: Re: [PATCH net-next] tun: avoid unnecessary READ_ONCE in tun_net_xmit Date: Wed, 06 Dec 2017 15:09:29 -0500 (EST) Message-ID: <20171206.150929.1869136637774624730.davem@davemloft.net> References: <20171206031117.86588-1-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jasowang@redhat.com, willemb@google.com To: willemdebruijn.kernel@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:54572 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751208AbdLFUJa (ORCPT ); Wed, 6 Dec 2017 15:09:30 -0500 In-Reply-To: <20171206031117.86588-1-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn Date: Tue, 5 Dec 2017 22:11:17 -0500 > From: Willem de Bruijn > > The statement no longer serves a purpose. > > Commit fa35864e0bb7 ("tuntap: Fix for a race in accessing numqueues") > added the ACCESS_ONCE to avoid a race condition with skb_queue_len. > > Commit 436accebb530 ("tuntap: remove unnecessary sk_receive_queue > length check during xmit") removed the affected skb_queue_len check. > > Commit 96f84061620c ("tun: add eBPF based queue selection method") > split the function, reading the field a second time in the callee. > The temp variable is now only read once, so just remove it. > > Signed-off-by: Willem de Bruijn Applied, thanks Willem.