From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: vlan: add support for tunnel offload Date: Wed, 07 Nov 2018 22:23:53 -0800 (PST) Message-ID: <20181107.222353.2042064681834666845.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: xiyou.wangcong@gmail.com, netdev@vger.kernel.org, fbl@redhat.com, fw@strlen.de To: dcaratti@redhat.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:51988 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbeKHP5s (ORCPT ); Thu, 8 Nov 2018 10:57:48 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Davide Caratti Date: Wed, 7 Nov 2018 11:28:18 +0100 > GSO tunneled packets are always segmented in software before they are > transmitted by a VLAN, even when the lower device can offload tunnel > encapsulation and VLAN together (i.e., some bits in NETIF_F_GSO_ENCAP_ALL > mask are set in the lower device 'vlan_features'). If we let VLANs have > the same tunnel offload capabilities as their lower device, throughput > can improve significantly when CPU is limited on the transmitter side. > > - set NETIF_F_GSO_ENCAP_ALL bits in the VLAN 'hw_features', to ensure > that 'features' will have those bits zeroed only when the lower device > has no hardware support for tunnel encapsulation. > - for the same reason, copy GSO-related bits of 'hw_enc_features' from > lower device to VLAN, and ensure to update that value when the lower > device changes its features. > - set NETIF_F_HW_CSUM bit in the VLAN 'hw_enc_features' if 'real_dev' > is able to compute checksums at least for a kind of packets, like done > with commit 8403debeead8 ("vlan: Keep NETIF_F_HW_CSUM similar to other > software devices"). This avoids software segmentation due to mismatching > checksum capabilities between VLAN's 'features' and 'hw_enc_features'. > > Reported-by: Flavio Leitner > Signed-off-by: Davide Caratti Applied.