Received: by 10.223.176.46 with SMTP id f43csp3381239wra; Mon, 22 Jan 2018 13:13:22 -0800 (PST) X-Google-Smtp-Source: AH8x2274c6bC4W9pZNnc1tvSWEWG6H93m0H8hjRTRIUJ1O3Em+jfPjxEuPdlLBJGJkTpH7Zt2H8y X-Received: by 10.36.80.135 with SMTP id m129mr288773itb.134.1516655602006; Mon, 22 Jan 2018 13:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516655601; cv=none; d=google.com; s=arc-20160816; b=ndw2GI1+p3BuFt6eN719j9XTnN+ZHIkX2kjJu5UiCNJd+H4rCDSM2UTjQVnrTN6zBr pbZ9So8kOdWAAFMFb27gOCht/s47t9kmhQM17JytrLPZpsBKB12AyjYXeWWjQe26F5hN 74TD73wLSPQGe/vAP8iCoAV+LPz8JK5KHcP8bYSIhkLOEMCc2/9IT/sqWeLXUg3w/Ps4 ATJeMs4ObQI6vPv1G+511xTmedHI6zOYEnymz9JpYJXdmmcrohVDBY65jnMFlivJUJwd C7hC+2Y7+ARu1lBLi1YZEezKSh+raweDyenDUYdfSFJ09LEZLCbrwWkjogEwOENEYAPs Ew7Q== 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 :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=NJ2rvOklF41eduNyinzPhwaPos1gre1qGDfpmx8v1SU=; b=v9wEeV4gIu2qwMDo6EZz/tkIqzGpS74bIgGi5EWudNA3r7rNcJPon0X62cFUCVu2VU 9tsarcAtkDzYusKYUjOethTGORAMNk4Q85qz9i+psAKN2S3k7IdCxvkS+AzfLWap7mRn ZpYEIfT88L8ANoIVnGQvjliFs64nKtkC8QiAIUlN5kuhqDOOMrfopF5bSdrwV5k6LOM8 00tWdv7/A7n6p9JbQzCX/5mooTE2kYAz5Qhy2bJVeFrAavGL13J+2e4bFC+bUvcXVr+7 3vCUZQ8veO75Do7jjyBIsxlghdQUHfsiIfczqPRscbxwdo1rmDLYDWK7WesApITU7/ZD DBQQ== 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 g3si14169287ioj.232.2018.01.22.13.13.09; Mon, 22 Jan 2018 13:13:21 -0800 (PST) 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 S1751063AbeAVVMl (ORCPT + 99 others); Mon, 22 Jan 2018 16:12:41 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:41112 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbeAVVMj (ORCPT ); Mon, 22 Jan 2018 16:12:39 -0500 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2ECF213FA1818; Mon, 22 Jan 2018 13:12:38 -0800 (PST) Date: Mon, 22 Jan 2018 16:12:37 -0500 (EST) Message-Id: <20180122.161237.1482527198791478004.davem@davemloft.net> To: f.fainelli@gmail.com Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, maxime.ripard@free-electrons.com, wens@csie.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next v2] net: stmmac: Fix reception of Broadcom switches tags From: David Miller In-Reply-To: <20180118231222.19394-1-f.fainelli@gmail.com> References: <20180118231222.19394-1-f.fainelli@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 22 Jan 2018 13:12:39 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli Date: Thu, 18 Jan 2018 15:12:21 -0800 > Broadcom tags inserted by Broadcom switches put a 4 byte header after > the MAC SA and before the EtherType, which may look like some sort of 0 > length LLC/SNAP packet (tcpdump and wireshark do think that way). With > ACS enabled in stmmac the packets were truncated to 8 bytes on > reception, whereas clearing this bit allowed normal reception to occur. > > In order to make that possible, we need to pass a net_device argument to > the different core_init() functions and we are dependent on the Broadcom > tagger padding packets correctly (which it now does). To be as little > invasive as possible, this is only done for gmac1000 when the network > device is DSA-enabled (netdev_uses_dsa() returns true). > > Signed-off-by: Florian Fainelli > --- > Changes in v2: > > - fixed build failure in dwmac4_core.c > - updated dwmac100_core.c to also clear the ASTP bit Applied, thanks Florian.