Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4040418ybl; Mon, 13 Jan 2020 06:55:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzo6jjvlA+tsrLegud/BtLjyBq7rC90lY7RTCrpwhh/5iREMy+IsUqE/mn4/57b6lOr83rl X-Received: by 2002:a9d:7:: with SMTP id 7mr12748218ota.26.1578927324041; Mon, 13 Jan 2020 06:55:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578927324; cv=none; d=google.com; s=arc-20160816; b=JSO234B7YmzTBgq3cBlpcHLlaXsKpZwqUbIompbmDKaFsv/aVzcIF3+6/Ort1+W/5z Oo7pI5Vj9elv8HekFwlS+QuXYeoob2w16BLeWX8APRgXublQnvpfxSKDHqRtoR7DuCvW xvCt4zj1UNoALkMZKsyeo9WjfnYVK2DwaIyk+toAaMvcaGDYmM5gSfOpu0X/+TQ+Lw/b mFt3xcZIXqyo2IrnNvloUC1juQ7G902qH5vE4FdoLd+XYeqLcUA8U8GFDmAGba7Dpkz1 s8S3eknS4BmiEY7RWZe6w0tSFaLdV5Dku4RXQ+A3g6bNi1EFq7T1wd9/RP+iy2Ip7K/O 66gg== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=hzsCTcflYPVFH9nTtd4vhAmuHBLnwp93s44af5bKH/s=; b=tB8JHGz7cgn7fSqlKPeYdGO4+t+2DMGHfrIyrDK95hNAd1bxtX1aw88s47li8kcSlf tesaSjvgFR5tsj8q1/AhpyD5wTYSWWJD2ugyfeA3DMavsbuGi07qK8iesvVwKZ3sHLs1 Lu4VFzAWM27l6JJnBefmVNYwzA+oQqF/YNVW/A+mjyviM7CBUnP8xNpm+h+0hZAff21Y Y7QQwWiC7jOh6WPmqQ0wiXchOM5jtl7f2TNLWSK+mE9//gfGm15F6xtO/41y4D+QuHjB nb7khbxUaBvF5UCvV8yhHwuRB3E46wtYUdwyPALZF+3KGdEAKhZ9iJ6YB0wYo8GQR5lu vnfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="WRIzdv/D"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x142si5944548oia.220.2020.01.13.06.55.12; Mon, 13 Jan 2020 06:55:24 -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; dkim=pass header.i=@kernel.org header.s=default header.b="WRIzdv/D"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728892AbgAMOyJ (ORCPT + 99 others); Mon, 13 Jan 2020 09:54:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:49958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgAMOyI (ORCPT ); Mon, 13 Jan 2020 09:54:08 -0500 Received: from cakuba (c-73-93-4-247.hsd1.ca.comcast.net [73.93.4.247]) (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 72A4C20661; Mon, 13 Jan 2020 14:54:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578927247; bh=+tBhl1sLCJP/p0MoLb8K4ZlbC7vCLCmh0VyIotWkp3U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WRIzdv/Dl2lNzNKusUFmrd+8Xdbd63fCKtbgASuIZNtRMvEQOcDutfNEM0lmCBuZu lg0LvogSkI8beX9SKvJYbiPjfdMjyGy+9eL7me5jL6j6JdWSWFq4hzI7+rF/q5nlF8 StJLauWncJk2m+xvT+qcvjseBPj6q6hAooY/qju8= Date: Mon, 13 Jan 2020 06:54:06 -0800 From: Jakub Kicinski To: Jose Abreu Cc: netdev@vger.kernel.org, Joao Pinto , Giuseppe Cavallaro , Alexandre Torgue , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 1/8] net: stmmac: Initial support for TBS Message-ID: <20200113065406.54bb324b@cakuba> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jan 2020 14:02:36 +0100, Jose Abreu wrote: > Adds the initial hooks for TBS support. This needs a 32 byte descriptor > in order for it to work with current HW. Adds all the logic for Enhanced > Descriptors in main core but no HW related logic for now. > > Signed-off-by: Jose Abreu > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h > index f98c5eefb382..dceaeb72a414 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h > @@ -42,10 +42,13 @@ struct stmmac_tx_info { > /* Frequently used values are kept adjacent for cache effect */ > struct stmmac_tx_queue { > u32 tx_count_frames; > + int tbs_avail; > + int tbs_en; These could be bool or a bitfield? > struct timer_list txtimer; > u32 queue_index; > struct stmmac_priv *priv_data; > struct dma_extended_desc *dma_etx ____cacheline_aligned_in_smp; > + struct dma_edesc *dma_entx ____cacheline_aligned_in_smp; Won't this create a cache line-sized hole? Is the structure member supposed to be aligned or the data its pointing to? > struct dma_desc *dma_tx; > struct sk_buff **tx_skbuff; > struct stmmac_tx_info *tx_skbuff_dma; > diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h > index 0531afa9b21e..19190c609282 100644 > --- a/include/linux/stmmac.h > +++ b/include/linux/stmmac.h > @@ -139,6 +139,7 @@ struct stmmac_txq_cfg { > u32 low_credit; > bool use_prio; > u32 prio; > + int tbs_en; also bool? > }; > > struct plat_stmmacenet_data {