Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3700546iob; Mon, 2 May 2022 03:30:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztAH0Omv2aD4qFcXjxRCXwv9fyRBngOdtsMm9WyLpKL+GgV8FgkBf6yek+A+ywY/nQ/1Fi X-Received: by 2002:a17:90b:3506:b0:1dc:72c6:384d with SMTP id ls6-20020a17090b350600b001dc72c6384dmr325990pjb.137.1651487406851; Mon, 02 May 2022 03:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651487406; cv=none; d=google.com; s=arc-20160816; b=gzzEVsydJB7SeZPvnzfGuVB3l8BzTr1R5AT6FmyvqJRq98exUoGCUTKwQDvUiShrFe 5+X7gfFW7iTo0ckt0wxXmxd3q2HcodMsbBemudN5FsMx8kxh/+K6XdCN2uvCM+DI1uk7 QqAlrnoPIFbruDKT6SP1NtFnQRWsIAuHTET5yX0KLvqN+NeMuNtk0XR/I+3oaB5MSLv9 Kh9yUQycnwd/yiF//sS9k7a7j/acc8KN0qGXT62ZzCNuj0tshIoDUXfYH3+/DXD3uYmk sSTN+ScI3q0bmktFVNs7cvXoGPIuPKWMaDPw0QMQQ7Q3oaKgwjwOaJSys3EEOXPTL5gu OGZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wDv/ZjgQAgskJE5rGbkjOymcGzgk+Bgbxz84MQ43iy4=; b=rsGCtxo4RWWv8dbKF26+6NShQ082hmTaMb9p/O8pEV8yCWJzc5kBvyxiX+OHJPTVvm uJbstHoBr8lvlQ1dswc3hKpPevt/lJQ5eDaORf9bnLz3jQWTwb+pIvVZuYuoY7PJT0Ya zTlGDY6paV9oH0v0QAhJbC8H473mRKVGzp0nnqJTT2KZoJROxGAys4GrI7N2/pf7eiKC oYsn9pDEgyDoKgwVFh1U2axHpwqn7G8YHQhxFmTPsfIeXIr8ecaW06E+obsCYkGios7W FTJ+YKXq/p9dOF0EJHS3MS680RuVeWacF1ze4Cvi+pSmVbPUY4AOMS6O+1NXordh59is 8+WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=H4DSI1d+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a170903024e00b00153b2d164bbsi10757748plh.195.2022.05.02.03.29.51; Mon, 02 May 2022 03:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=H4DSI1d+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358723AbiD2Lyu (ORCPT + 99 others); Fri, 29 Apr 2022 07:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358676AbiD2Lyq (ORCPT ); Fri, 29 Apr 2022 07:54:46 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6693AC6EC8; Fri, 29 Apr 2022 04:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651233088; x=1682769088; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vUGUX7Nvc/8LjzsG1/1jXvrhtbo00tkto7h2bu3JZ70=; b=H4DSI1d+94Djdk3XQD/VbKAY2wwOazJtVUnjc6AqU7ayVl8Ihh5xw/hQ djKsrR45uV5NYLqM33Lqa0aIQo6SNYPeAgAI9ZjrQvoXYpYuVCiBHSQve 7aN4RqDOzFQpzlfg15Y80nJD5RAirT2kb7D7tgzde/AJzy12LsfpUmi8B GXXb8gy5+ZgLpdim8rHfj9a4tl7+NXpPfNVR2gcWB2ueSUu5ZRchO6SGp fbg0vhNDGrnVtdfk98i5XzgdRafq8xdg5ZxlJ2k/BQkw9DdTtVqACvWOg /NpcPba+nQREkDMy9QbXbcBR1iLaUb2nHhzl0z8gP/5o607bvMxAESrOG w==; X-IronPort-AV: E=McAfee;i="6400,9594,10331"; a="329565488" X-IronPort-AV: E=Sophos;i="5.91,185,1647327600"; d="scan'208";a="329565488" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 04:51:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,185,1647327600"; d="scan'208";a="582085655" Received: from p12hl01tmin.png.intel.com ([10.158.65.175]) by orsmga008.jf.intel.com with ESMTP; 29 Apr 2022 04:51:21 -0700 From: Tan Tee Min To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Michael Sit Wei Hong , Xiaoliang Yang , Wong Vee Khee , Tan Tee Min , Ling Pei Lee , Bhupesh Sharma , Matthew Hagan , Kurt Kanzenbach Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Voon Wei Feng , Song Yoong Siang , Ong@vger.kernel.org, Boon Leong , Tan Tee Min , Looi Hong Aun Subject: [PATCH net v2 1/1] net: stmmac: disable Split Header (SPH) for Intel platforms Date: Fri, 29 Apr 2022 19:58:07 +0800 Message-Id: <20220429115807.2198448-1-tee.min.tan@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Based on DesignWare Ethernet QoS datasheet, we are seeing the limitation of Split Header (SPH) feature is not supported for Ipv4 fragmented packet. This SPH limitation will cause ping failure when the packets size exceed the MTU size. For example, the issue happens once the basic ping packet size is larger than the configured MTU size and the data is lost inside the fragmented packet, replaced by zeros/corrupted values, and leads to ping fail. So, disable the Split Header for Intel platforms. v2: Add fixes tag in commit message. Fixes: 67afd6d1cfdf("net: stmmac: Add Split Header support and enable it in XGMAC cores") Cc: # 5.10.x Suggested-by: Ong, Boon Leong Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: Wong Vee Khee Signed-off-by: Tan Tee Min --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- include/linux/stmmac.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 63754a9c4ba7..0b0be0898ac5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -454,6 +454,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->has_gmac4 = 1; plat->force_sf_dma_mode = 0; plat->tso_en = 1; + plat->sph_disable = 1; /* Multiplying factor to the clk_eee_i clock time * period to make it closer to 100 ns. This value diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 4a4b3651ab3e..2525a80353b7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7021,7 +7021,7 @@ int stmmac_dvr_probe(struct device *device, dev_info(priv->device, "TSO feature enabled\n"); } - if (priv->dma_cap.sphen) { + if (priv->dma_cap.sphen && !priv->plat->sph_disable) { ndev->hw_features |= NETIF_F_GRO; priv->sph_cap = true; priv->sph = priv->sph_cap; diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 24eea1b05ca2..29917850f079 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -270,5 +270,6 @@ struct plat_stmmacenet_data { int msi_rx_base_vec; int msi_tx_base_vec; bool use_phy_wol; + bool sph_disable; }; #endif -- 2.25.1