From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] tun: compute the RFS hash only if needed. Date: Wed, 07 Nov 2018 22:23:47 -0800 (PST) Message-ID: <20181107.222347.231134541600778645.davem@davemloft.net> References: <12347537bd5fd8b1176ca62ddf51ea9080fe1b41.1541436099.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 ([23.128.96.9]:51976 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbeKHP5m (ORCPT ); Thu, 8 Nov 2018 10:57:42 -0500 In-Reply-To: <12347537bd5fd8b1176ca62ddf51ea9080fe1b41.1541436099.git.pabeni@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Paolo Abeni Date: Wed, 7 Nov 2018 10:34:36 +0100 > The tun XDP sendmsg code path, unconditionally computes the symmetric > hash of each packet for RFS's sake, even when we could skip it. e.g. > when the device has a single queue. > > This change adds the check already in-place for the skb sendmsg path > to avoid unneeded hashing. > > The above gives small, but measurable, performance gain for VM xmit > path when zerocopy is not enabled. > > Signed-off-by: Paolo Abeni Applied.