Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1191683ybn; Wed, 2 Oct 2019 12:12:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKTh9zIQdEerMwA/Rppu9fuw2S6f7bIFx6cYqPv9kYVR6/5hcfTlNOitQsaGn4vt4cUxVX X-Received: by 2002:a05:6402:1ade:: with SMTP id ba30mr5664619edb.304.1570043550194; Wed, 02 Oct 2019 12:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043550; cv=none; d=google.com; s=arc-20160816; b=Oq6QjiSaslizrJrOoCpjwbXXiCmU1BFBjzqDj5l/QE0p0+PS83PgOpouPoqO5XL0KC +/pKmaiCNidcJTXEosprlX1ea39aV8GHKb96E8lkngZDCwL5apepceNfSy9fa8ngH7wS ozRJdt1gzkJDsFBcCJ08ItHUc7ypVRFv4IwQwmyqFQVxx0dwg84JXcn1fC/0yaH1ymeH 7mLoLGLT9YhCfTZncCB78ZArvaM2L0xy1T3t29M03qTHnkO9WDZJUqRf8JSROrivqxuc s0f1+4s40bI41And3+iYeulTMTnpmzd6VAh2jfDczvl6wWl17Y4tTlSMtt/iGnOfPVAL f2Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=qlHLn5cDqVhu0OLQbLeBfyrMAwjs412fDvlDv7riEGM=; b=YBZjCyy1JBt5JpA59lPM8JMuU00q2rbQUbVcLQch+YDN8Wy5OROEeoJK8eoOCEb+Wr qNh5tm2n+QSBfmVv+xfF+P1XxDMkXdl6WLuzT1b2USjbYONEhox+lmjNpm7cKw6YY1ZO 1hD9yYFPb9EeLpcnVaEBw5i1A3Rhu1lespghbA+/r7Tzlwe8JLKymXJEuU1RerN4dwx+ EyLEcF6t9rSUXXfl1UrUXKVv18srQGOdlb5Lq79AETCc8mHtbxdf1kvJYON6IjmFCh8C v0msSMvJvP7PWQXQfEoEv1h1vTrYKeXUF0Jo3IWWpHPKs96lbFGNz1NmOTkKyZa5Nfzd vlIg== ARC-Authentication-Results: i=1; mx.google.com; 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 53si18930edz.275.2019.10.02.12.12.05; Wed, 02 Oct 2019 12:12:30 -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; 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 S1729948AbfJBTK4 (ORCPT + 99 others); Wed, 2 Oct 2019 15:10:56 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35784 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729302AbfJBTIP (ORCPT ); Wed, 2 Oct 2019 15:08:15 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyu-000364-EQ; Wed, 02 Oct 2019 20:08:12 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyq-0003gI-94; Wed, 02 Oct 2019 20:08:08 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Jiri Pirko" , "David S. Miller" , "Jiri Pirko" , "YueHaibing" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 80/87] bonding: Always enable vlan tx offload In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: YueHaibing commit 30d8177e8ac776d89d387fad547af6a0f599210e upstream. 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 [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- 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 @@ -4038,13 +4038,13 @@ 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_ALL_CSUM & ~NETIF_F_HW_CSUM); bond_dev->hw_features |= NETIF_F_GSO_UDP_TUNNEL; bond_dev->features |= bond_dev->hw_features; + bond_dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; } /*