From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] tun: do not compute the rxhash, if not needed Date: Fri, 20 Apr 2018 11:51:47 -0400 (EDT) Message-ID: <20180420.115147.1711381333310778661.davem@davemloft.net> References: <1c43f8bc63407239c91df916b149d4fdbf26bed3.1524222969.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jasowang@redhat.com To: pabeni@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:45520 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755854AbeDTPvt (ORCPT ); Fri, 20 Apr 2018 11:51:49 -0400 In-Reply-To: <1c43f8bc63407239c91df916b149d4fdbf26bed3.1524222969.git.pabeni@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Paolo Abeni Date: Fri, 20 Apr 2018 13:18:16 +0200 > Currently, the tun driver, in absence of an eBPF steering program, > always compute the rxhash in its rx path, even when such value > is later unused due to additional checks ( > > This changeset moves the all the related checks just before the > __skb_get_hash_symmetric(), so that the latter is no more computed > when unneeded. > > Also replace an unneeded RCU section with rcu_access_pointer(). > > Signed-off-by: Paolo Abeni Applied, thank you.