Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3202263pxb; Mon, 9 Nov 2020 05:29:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzh0AjIW3p8KuLEgZnzfyQD6qFPKyksPcnTzPpb4mPgpfeTFXDKp4NLTzy+jiultnTsp8o X-Received: by 2002:a17:906:6b86:: with SMTP id l6mr14734071ejr.524.1604928595956; Mon, 09 Nov 2020 05:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604928595; cv=none; d=google.com; s=arc-20160816; b=DfXPT8b7oS6sw9GyzOUdPVTZLc4VyYv2NS5Ir1WkXgrGpZTtr/2lpjLql1dDSAuius E8+NGrc/WYvJmo4lT+NSEiM41GU5kanjTtAojXaEQUkVXbO/TKOxb6s4KfzgcJVXDK8g tVRTRI0M6qh4+HJUN4eaS4mpBjY9S5WmOnO8V1HF6vpIl/3MaQzXPiutTeJZ3lR3WvYQ 7Pdw+ruLDzr4viEA4B65oQc+ruIDJF9fP/hyiEBawSBAVvpUihNgr7YwnQYs3oWqpbe4 z+vgnjDUbap+d8zoh0vM9UHe8i3LQyi0gnM+hEZsSo4lA9bKorjzRvU8L14HUcEm1zS2 CunQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FuNrpqiX7ifY0lJp105mQhTXemq3gl4E36g0apc1kQ4=; b=i5LTAHcmZLUnfVn+RhWuCW9VSN9KRDUqo4jOPBCtMZmof7gnumw9R4D4Cho7ONSHDP W/VyDBIjHW6kv3+PE5VrP89a5T2fO8rZyxVLe9G2gBRYh4MaB/3dAS8mwV6euMuD/rM9 sm4GMmNoU7js2o3EaTvoXqeHEcjrMsMbh+iTssOSs4Ij2+gzdUCSnNXQFHE7t4Smnw+z wxB9bwKav7UxWNqU1tLghhR/1dGzGw1nFTxxCgH88TsZ5M5H3X6Xtm3Bpe0js9471Fk6 xNF59qrUVyMu0TDdTay+OqUQ8nALRvZCC3WTNoKULj0w6nANibXw8SZdUNS9tJkNffrx c+BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lELxAOTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o23si1251184edw.247.2020.11.09.05.29.31; Mon, 09 Nov 2020 05:29:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lELxAOTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387508AbgKINQr (ORCPT + 99 others); Mon, 9 Nov 2020 08:16:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:43832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387527AbgKINQo (ORCPT ); Mon, 9 Nov 2020 08:16:44 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 000D4206D8; Mon, 9 Nov 2020 13:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927803; bh=+LcolaTozObX7AgxMLRbgCPq4c8a4FZGqaYDtNkdGjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lELxAOTNscjzV1tH+OugOPvircHD0jWJ5pZZ0yt0Z/VnRgMJl5lbyU8ryyq6+xw0i SSK5GsEjMIKRjYnj4RjZDYaGJ+02bWwqN+T9AEJrawLFlKbxOO6E/oq5o3L7TMBthz 5xf1TPX1WPWUwuZrD9EoXaDaGf47BPUQESs4sycM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Camelia Groza , Jakub Kicinski Subject: [PATCH 5.9 026/133] dpaa_eth: update the buffer layout for non-A050385 erratum scenarios Date: Mon, 9 Nov 2020 13:54:48 +0100 Message-Id: <20201109125031.980390869@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125030.706496283@linuxfoundation.org> References: <20201109125030.706496283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Camelia Groza [ Upstream commit acef159a0cb2a978d62b641e2366a33ad1d5afef ] Impose a larger RX private data area only when the A050385 erratum is present on the hardware. A smaller buffer size is sufficient in all other scenarios. This enables a wider range of linear Jumbo frame sizes in non-erratum scenarios, instead of turning to multi buffer Scatter/Gather frames. The maximum linear frame size is increased by 128 bytes for non-erratum arm64 platforms. Cleanup the hardware annotations header defines in the process. Fixes: 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") Signed-off-by: Camelia Groza Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -174,12 +174,17 @@ MODULE_PARM_DESC(tx_timeout, "The Tx tim #define DPAA_PARSE_RESULTS_SIZE sizeof(struct fman_prs_result) #define DPAA_TIME_STAMP_SIZE 8 #define DPAA_HASH_RESULTS_SIZE 8 +#define DPAA_HWA_SIZE (DPAA_PARSE_RESULTS_SIZE + DPAA_TIME_STAMP_SIZE \ + + DPAA_HASH_RESULTS_SIZE) +#define DPAA_RX_PRIV_DATA_DEFAULT_SIZE (DPAA_TX_PRIV_DATA_SIZE + \ + dpaa_rx_extra_headroom) #ifdef CONFIG_DPAA_ERRATUM_A050385 -#define DPAA_RX_PRIV_DATA_SIZE (DPAA_A050385_ALIGN - (DPAA_PARSE_RESULTS_SIZE\ - + DPAA_TIME_STAMP_SIZE + DPAA_HASH_RESULTS_SIZE)) +#define DPAA_RX_PRIV_DATA_A050385_SIZE (DPAA_A050385_ALIGN - DPAA_HWA_SIZE) +#define DPAA_RX_PRIV_DATA_SIZE (fman_has_errata_a050385() ? \ + DPAA_RX_PRIV_DATA_A050385_SIZE : \ + DPAA_RX_PRIV_DATA_DEFAULT_SIZE) #else -#define DPAA_RX_PRIV_DATA_SIZE (u16)(DPAA_TX_PRIV_DATA_SIZE + \ - dpaa_rx_extra_headroom) +#define DPAA_RX_PRIV_DATA_SIZE DPAA_RX_PRIV_DATA_DEFAULT_SIZE #endif #define DPAA_ETH_PCD_RXQ_NUM 128 @@ -2854,8 +2859,7 @@ static inline u16 dpaa_get_headroom(stru * * Also make sure the headroom is a multiple of data_align bytes */ - headroom = (u16)(bl->priv_data_size + DPAA_PARSE_RESULTS_SIZE + - DPAA_TIME_STAMP_SIZE + DPAA_HASH_RESULTS_SIZE); + headroom = (u16)(bl->priv_data_size + DPAA_HWA_SIZE); return ALIGN(headroom, DPAA_FD_DATA_ALIGNMENT); }