From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] openvswitch: do not propagate headroom updates to internal port Date: Sat, 02 Dec 2017 21:17:26 -0500 (EST) Message-ID: <20171202.211726.1769384755580628445.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, pshelar@nicira.com To: pabeni@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:57704 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbdLCCSa (ORCPT ); Sat, 2 Dec 2017 21:18:30 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Paolo Abeni Date: Thu, 30 Nov 2017 15:35:33 +0100 > After commit 3a927bc7cf9d ("ovs: propagate per dp max headroom to > all vports") the need_headroom for the internal vport is updated > accordingly to the max needed headroom in its datapath. > > That avoids the pskb_expand_head() costs when sending/forwarding > packets towards tunnel devices, at least for some scenarios. > > We still require such copy when using the ovs-preferred configuration > for vxlan tunnels: > > br_int > / \ > tap vxlan > (remote_ip:X) > > br_phy > \ > NIC > > where the route towards the IP 'X' is via 'br_phy'. > > When forwarding traffic from the tap towards the vxlan device, we > will call pskb_expand_head() in vxlan_build_skb() because > br-phy->needed_headroom is equal to tun->needed_headroom. > > With this change we avoid updating the internal vport needed_headroom, > so that in the above scenario no head copy is needed, giving 5% > performance improvement in UDP throughput test. > > As a trade-off, packets sent from the internal port towards a tunnel > device will now experience the head copy overhead. The rationale is > that the latter use-case is less relevant performance-wise. > > Signed-off-by: Paolo Abeni Applied, thanks.