Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4776588ybl; Tue, 4 Feb 2020 01:39:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzJthqHoOamTk43HKNM5ibJtW1AG8OLzjCpQzwfeAACZcHjSRdCFJ2z/9iZjiU81/Asgu9Y X-Received: by 2002:a05:6830:2015:: with SMTP id e21mr20847620otp.106.1580809162975; Tue, 04 Feb 2020 01:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580809162; cv=none; d=google.com; s=arc-20160816; b=C5Kapcp1rVunBFqJmnuQVC++f/7DOZw6Ov2Sj64bX7fFmO4w2LacOuJxzcs0SFxteM tPMIq0XlZXBmVTyW4FqOv+I3xaWLYFUOcaujpsfucvxTo+/M8i5zA5o/jqps/D+14I17 FVOw49ZKsqQKFMaVzTd9XWe0Mu93SOAVptBYPbPpdFaAGkLYJXDr/hXwj7jiohWhEvYs yItuawev+BdwhhG474dAd5O8B2xlh1t7T/LPv/+pJr+7sM2V1uNnmAFSM9FlKjPcduNn 6vP86d/wOFZ9H4x81q4qSbfAR16nWQlb21zdHbQPh7vzN4d5UFKA5EAxXH9KV/h3zMXy d74w== 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; bh=9E8Nxg0r4FVguzl6eWg3sBhiZXO0qUcxly5Py2vECqk=; b=kieyr00gZiWiH/8BbSgistAV/Q2a37XeY0P+73iIl6Td2F0WPqt+M+xEyG/rz0RxJy FccRJQlprcb/cfKrbw1y9Zz+RgXkShpV2jAc2HtdyUTjSkKhpPk0dENWKuVccrNI6au6 UL0TG9/VTZ0JUEgr2BSJSVUtGCYfbXqbAApHyRropv3mLTVFLOwPKQiQZMNlS/0ABwld QIa3sPCFsjhTplTrX8kks/qmCKDZUekbFZ+bcGY06m5mqHuICNYW/w/eDpEvruZISWyp If+pv866Y42Zo7Pq/Ljw4Lhyk8sI+xpnpruBT8dYSMHVSBPjwJiwsATiC+qG3uGDyUpW taNQ== 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 m26si12899200otk.305.2020.02.04.01.39.11; Tue, 04 Feb 2020 01:39:22 -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 S1727110AbgBDJhx (ORCPT + 99 others); Tue, 4 Feb 2020 04:37:53 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:41370 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726730AbgBDJhw (ORCPT ); Tue, 4 Feb 2020 04:37:52 -0500 Received: from localhost (unknown [IPv6:2001:982:756:1:57a7:3bfd:5e85:defb]) (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 D91971577F51A; Tue, 4 Feb 2020 01:37:50 -0800 (PST) Date: Tue, 04 Feb 2020 10:37:49 +0100 (CET) Message-Id: <20200204.103749.1474392609351299440.davem@davemloft.net> To: harini.katakam@xilinx.com Cc: nicolas.ferre@microchip.com, claudiu.beznea@microchip.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com Subject: Re: [PATCH v2 2/2] net: macb: Limit maximum GEM TX length in TSO From: David Miller In-Reply-To: <1580735882-7429-3-git-send-email-harini.katakam@xilinx.com> References: <1580735882-7429-1-git-send-email-harini.katakam@xilinx.com> <1580735882-7429-3-git-send-email-harini.katakam@xilinx.com> X-Mailer: Mew version 6.8 on Emacs 26.3 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]); Tue, 04 Feb 2020 01:37:52 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harini Katakam Date: Mon, 3 Feb 2020 18:48:02 +0530 > GEM_MAX_TX_LEN currently resolves to 0x3FF8 for any IP version supporting > TSO with full 14bits of length field in payload descriptor. But an IP > errata causes false amba_error (bit 6 of ISR) when length in payload > descriptors is specified above 16387. The error occurs because the DMA > falsely concludes that there is not enough space in SRAM for incoming > payload. These errors were observed continuously under stress of large > packets using iperf on a version where SRAM was 16K for each queue. This > errata will be documented shortly and affects all versions since TSO > functionality was added. Hence limit the max length to 0x3FC0 (rounded). > > Signed-off-by: Harini Katakam > --- > v2: > Use 0x3FC0 by default You should add a comment above the definition which explains how this value was derived. It looks magic currently.