Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3057732ybi; Tue, 2 Jul 2019 01:18:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgZxv8OHanexy7WSJmshCZ4mwROaodc4Evuujk+DNC8EKec/V6u6fZjcvmdog0DEOSBKC8 X-Received: by 2002:a17:90a:2224:: with SMTP id c33mr4192375pje.22.1562055504126; Tue, 02 Jul 2019 01:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562055504; cv=none; d=google.com; s=arc-20160816; b=EbRrp4WHZHTzKenJ4c/Mkksb7bE3Pg2fHBCq2okaLGTZxDlEXshtigEVxBU+ATXFZP 59DhP3Cm66i2KBNkcUb7F16Uc4/GIO9CxyYdIkv/IV6SLi/MrLwZtLiWUS0nrxWRNy7E wSAOXwVVln8KGLNjrE8QNklyRTa0lhLqNmzBEHMhbCi/h0ArhYlKnFUlxGfOBAvk77Mo 3VhzwTmWsJhMAIfDEt4rH29IYiK0mZ9cSVRc1Yuvjs7i7dbFMjEJacdg08Rwj26NKMEz X+5oj7FCNqi4lbG8AEFNV3PAkHp8aS6NxwAzeeTP8Z0nYyDiQ3Y/T3748hRjbsUdDppv EYtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m6EhZt5rwKlDNcURlNDvQIzaq1WS53tEihvH/EAM7EI=; b=VC+ihEI/uHegE0u8NM/DOfvx8aHh6Y4vesuGlG44Rr0vPqvf1N//2GxqOGq8JVWtYN kCfYu78EG6bsJge7GuWm2oDecJnYowjSekBrepVqufqflcdi+yyeFOA5erlD2n0vUM1I 4GMn78cxJ77eZFNVZbE9EIkk6S2Cm/qDeXr72JJY8Ef/iY7x6vJ+mNR475fSKXPsgawY Yx3odif7dJTTMC67CW3YGzik4fyLTBrV1uk1QL+Z6VanvHpb4ltdaEB9jHIP3/vzM5za jjdtSejpdH2Bb5wewzEVtBDgx+Oeu8Xb4RtLG2f8qZKpuN4cqhqYNo1ehQ8SbfX+XYwQ NZSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H/xUv6cm"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id co12si12643271plb.197.2019.07.02.01.18.09; Tue, 02 Jul 2019 01:18:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H/xUv6cm"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727504AbfGBIDo (ORCPT + 99 others); Tue, 2 Jul 2019 04:03:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:48766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727485AbfGBIDk (ORCPT ); Tue, 2 Jul 2019 04:03:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 930AC21874; Tue, 2 Jul 2019 08:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562054620; bh=BRP7Ql1eActHI1tbBOAzaSFubYS8GkEJ87I9ftlT1/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H/xUv6cmxlNwSBAQGzYoJ18b8qUqNRzBEzNfdn1I+ACY1v8P52oGBhw+zWvjt97z/ /NwP4b5UGWjCCdBv21bodm+Sz/8zGHyrZmujr2yH+kNS3FYunMCOQn8vrouyfbMLwO 52smwMk/x/0tf6Of9Jl9LL1zIuze52F7olcIa3Ws= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Pirko , YueHaibing , Jiri Pirko , "David S. Miller" Subject: [PATCH 5.1 31/55] bonding: Always enable vlan tx offload Date: Tue, 2 Jul 2019 10:01:39 +0200 Message-Id: <20190702080125.750796171@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190702080124.103022729@linuxfoundation.org> References: <20190702080124.103022729@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing [ Upstream commit 30d8177e8ac776d89d387fad547af6a0f599210e ] We build vlan on top of bonding interface, which vlan offload is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is BOND_XMIT_POLICY_ENCAP34. Because vlan tx offload is off, vlan tci is cleared and skb push the vlan header in validate_xmit_vlan() while sending from vlan devices. Then in bond_xmit_hash, __skb_flow_dissect() fails to get information from protocol headers encapsulated within vlan, because 'nhoff' is points to IP header, so bond hashing is based on layer 2 info, which fails to distribute packets across slaves. This patch always enable bonding's vlan tx offload, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan implementation. Fixes: 278339a42a1b ("bonding: propogate vlan_features to bonding master") Suggested-by: Jiri Pirko Signed-off-by: YueHaibing Acked-by: Jiri Pirko Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4321,12 +4321,12 @@ void bond_setup(struct net_device *bond_ bond_dev->features |= NETIF_F_NETNS_LOCAL; bond_dev->hw_features = BOND_VLAN_FEATURES | - NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER; bond_dev->hw_features |= NETIF_F_GSO_ENCAP_ALL | NETIF_F_GSO_UDP_L4; bond_dev->features |= bond_dev->hw_features; + bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; } /* Destroy a bonding device.