Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp804262ybl; Fri, 31 Jan 2020 08:15:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyKwqL32YWQSGrw2LG4KsHYOwITgzZSo3i1dFCnvPM7l06mOb86UqMF6d2zjxs6+dmViA2L X-Received: by 2002:a05:6830:22ee:: with SMTP id t14mr8041248otc.236.1580487353338; Fri, 31 Jan 2020 08:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580487353; cv=none; d=google.com; s=arc-20160816; b=hrMWagjnd4UxI5VOj6CpyI/KZDtaNbJliOhHp041EbcOPpcP1MMC+hY6OltGL1SP+Z ML1eXyUZbmlk5v92FUqzm+a4eOkwZfZIGXuAcHbbYwAWDpLctPASPZ+HCqG3DVbpoThr zoKdAa4jX8XvlNKYD4WRv6P916AgsgQlWoGC6vzhZ7m1aWlTWO9WXTNL/0FFHTwn/ToE hhMhLpB4lkDZaeRbpWD6xrb+S4sdu+QI1zhy+DtVj0FyLnQgFRdQSKQ/vLKuqkWDenMA g1077BdSuP/gSpWx7mDfR8PWCJwn2fuueb5Mgr7a1ywpL0SwYfQWWvira+7HryM1zlKd ZDpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ckkf5M0bZXgaGqlYIu11/GGEFF4eIcF87GnyR7xW+c0=; b=s0Ulpqkt9yrjVf9q5So3A8NUOoXxBslQ1oExlUTgksrobBe/5vWwPRHuSL/KZW5ZWJ lS6i6EDPS4Gfy19E6Q1wu10MWzknhMCiWpBx88PAbvNvjyicY613caN9RpDCKmNjBMmT 5EBEVZt9TcVTyxWsoiKKnQ8/0QQJMGfkOIrsV1ki0jLnogzsIX23CSCbWBkPbUI8g4IV gU7DG/CLW52gB5MsS1T9QgjOQiku57AAyUsl3yPXXDvwoEmhbsFrDNkVL4b5nd+cuIZi bH1JMBx3CtMAb3coFN4J0masd0CBkf95aPBbpr0bOL10JwuqxDMXbjQURZT4SlFHWgLJ 0Dug== 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 l4si4743038oib.170.2020.01.31.08.15.41; Fri, 31 Jan 2020 08:15:53 -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 S1729326AbgAaQOe (ORCPT + 99 others); Fri, 31 Jan 2020 11:14:34 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:39336 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729162AbgAaQOd (ORCPT ); Fri, 31 Jan 2020 11:14:33 -0500 Received: by mail-yw1-f67.google.com with SMTP id h126so5200686ywc.6; Fri, 31 Jan 2020 08:14:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ckkf5M0bZXgaGqlYIu11/GGEFF4eIcF87GnyR7xW+c0=; b=cGd43aZbv57vw61B3V6vfMWOQ0mNvESafKj+z9r7ImDRvuY+DkltNfTrvnjkLA1o2r +f5bNiGPda0ubBk/7Yho7UHSGR7fhGeEpaOQI+1jxiPDJyPxGvHptunYoHs+whILJ7EE wA2WsWLwEHbUxkjvgkOSa4IzTyQVDPH4hM8+2U4x50UXmfoIDnT0Oa1LlqZVcahZrlBK 8hEgn18X5Gs2klsJDzj9eN4HaO5rkKkxUyAjPjKtN+oDIkxajVHHqDlC4iGduLLL9W+b r3RhohFpcrG0IIvefKmYgKDwZtmejP+8Pmw816I29jze++DsRdmJD+ok5cX3//IQ0XEI H8Cg== X-Gm-Message-State: APjAAAWWK6gslHKNke1ocqoOIs1MvQgSNVQg/odkQsBvq0Q5GDOiedFs dDLXHP+Du5GPwYB7sRw/G2m3etZQugfy5QkLDbM= X-Received: by 2002:a25:c784:: with SMTP id w126mr9036069ybe.14.1580487272811; Fri, 31 Jan 2020 08:14:32 -0800 (PST) MIME-Version: 1.0 References: <1580466455-27288-1-git-send-email-harini.katakam@xilinx.com> <1580466455-27288-3-git-send-email-harini.katakam@xilinx.com> <29c67f4f-9dd9-3786-689f-c0b6eeb40f49@microchip.com> In-Reply-To: <29c67f4f-9dd9-3786-689f-c0b6eeb40f49@microchip.com> From: Harini Katakam Date: Fri, 31 Jan 2020 21:44:20 +0530 Message-ID: Subject: Re: [PATCH 2/2] net: macb: Limit maximum GEM TX length in TSO To: Claudiu Beznea Cc: Harini Katakam , Nicolas Ferre , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Claudiu, On Fri, Jan 31, 2020 at 8:27 PM wrote: > > > > On 31.01.2020 12:27, Harini Katakam wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > > 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 > > --- > > - bp->max_tx_length = GEM_MAX_TX_LEN; > > + bp->max_tx_length = min(GEM_MAX_TX_LEN, GEM_MAX_TX_LEN_ERRATA); > > Isn't this always resolved to GEM_MAX_TX_LEN_ERRATA? Sorry, yes it does. I accidentally concluded that this was version specific. Will just default to 0x3fc0 in v2. Thanks for the review. Regards, Harini