Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7147753ybi; Mon, 8 Jul 2019 15:36:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZmIUTHMjTMXiJvmRDEbGpZjTZQvWuukWiSscS5GYG+rWYxes844H1OHD16Upbf6TsLjmM X-Received: by 2002:a65:51cb:: with SMTP id i11mr25717825pgq.390.1562625362654; Mon, 08 Jul 2019 15:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625362; cv=none; d=google.com; s=arc-20160816; b=djEWkMeCFsce5xmotfoVjD42mDJOq3KYyec5ZRXzaNMxC/yr2CLRlZ5fbJR0G0kADa N+qwQYuwJE7+t1rrgR8d04hbCub6a1xrM6hZ0/IlSwQR83XUUDyxpnl1txMu9lHPBBkK fvO9XdHagTFp4abwv7pWfT8/xQcXCwBOE66HMzdl3LSi2+oisLXo44QByOP68/tx/vUf 4GPCZ88lGR2CjGNa+e8yKLlzawBB+YZAF74L0rKWJoNTUnIyV63QW/uyzDc+CR96A8WW AXnebo0gI/tgnJqH2WkiGNZojPuVM0ZxzuL66TKh04MRlFCc+nU0cc/dddNglaILnaxu DzjA== 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=wSA7avBEWS5X2+Abr2z2ptB0ZgWJXGe44YRNZyaabX8=; b=p0MKR4XqlMMASFwCejh6ISuMCtu4PfAOTyURk4SkW1/4PzqXtH1DNCdxBCNQ81NrZ7 0ygEYJQa/5wJjmPUSrAECuHzgBapffvyEW9WdKVD03pgKN7rcDjsj+RfUb1o2RcQjJLL nLeZfJRNFBDBZRIRwGSVKn77q4HqwNHKKS+evdcSOpJYphBAhY0w3YsMFBDcHvE9Tyln pgMHLfIq0u01ifjcFb+PFOMHpQpaz10jPlYKJ8e78M/ANI05t4Fnw8oiiJQSqvnr0tFW OG8iBoJ6+lfq36TwKaBRzxxV0UqYmk3OZT1Kk8fZkqSt3zPOogkRIAI/F1W0MwnqJpCC vo9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hb6YpDBp; 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 f33si716813pjg.81.2019.07.08.15.35.48; Mon, 08 Jul 2019 15:36:02 -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=hb6YpDBp; 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 S2387438AbfGHPVJ (ORCPT + 99 others); Mon, 8 Jul 2019 11:21:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:46542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387709AbfGHPVG (ORCPT ); Mon, 8 Jul 2019 11:21:06 -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 28B7B21734; Mon, 8 Jul 2019 15:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599265; bh=uJ9cKZvs83i2eyJqGCstzudXWkkAG38PjVk7XRlvJAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hb6YpDBpAQ481LCq18gdJBvo6K4aOcrCInrwF2IXYCFWBTQi8HzacI15974MyqahR JSJzE5L7a7rFWiGBthX4FEeKgVpoQJADjoAFyamqLichTyYZxHBQtvfF0vMs12hdiy wj1kEz2GWumrECi2HZ5uNVXb+jgLFeOLku547EwI= 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 4.9 059/102] bonding: Always enable vlan tx offload Date: Mon, 8 Jul 2019 17:12:52 +0200 Message-Id: <20190708150529.518123433@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150525.973820964@linuxfoundation.org> References: <20190708150525.973820964@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 @@ -4241,12 +4241,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; bond_dev->features |= bond_dev->hw_features; + bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX; } /* Destroy a bonding device.