Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp99637rdb; Thu, 25 Jan 2024 09:16:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBmsP8WQPIiTy+UIEV2JPkfL5b1b9AhanxcKiGLIrsey0o717K5KaVXcs+5ANZIpTiLRmg X-Received: by 2002:a17:906:1ccf:b0:a28:4bf8:a16f with SMTP id i15-20020a1709061ccf00b00a284bf8a16fmr678550ejh.136.1706202991289; Thu, 25 Jan 2024 09:16:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706202991; cv=pass; d=google.com; s=arc-20160816; b=kXPGSDPus9/VH1Et8qToZqSTWcfiGsvcJvS/TbgYZ49AhNGRK/crkcHq9/6CZ3wjJV LKfjv9bYJNyFzc7LjfMv+84898Y/Z78rVYP8ONNYq5zsL2hulgEKJLBTmanWpr+kZ5AI sl2MQvtTUJNYoMoIljMdF6x/YIrLiq5s38+qhA2T3qTZgtcm77voyKiKUaRSdpn7pTJK AWaAOjokA74lW+b84OuuHK58XdJtCsk56Gf/CEtMK1xfVx6M+9+WdY4hHNVwHxhBnYfy KHEm3+Nvpo/OmUaqo3Hajn6GKo0kTgj1vCw3u2TmPwo0Yw9B2dDCAhJ5Mofc7antAMZp VWLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=cwiSZZSX/ApevLiEYXtfnRTxSGnWM9HwOp5AgT3owUs=; fh=ng/UetKAu5dk/PsJ7puuhtuXkmq2/7iquyAc5p9Oer0=; b=a5sqqJTBQVnZEVaBkSx+1PrZXmwTUuCdw8LVzGx3Oaoe8/QwGFp/MJR//ZSW9nAXkw JkoUYdMH2bPmsQ0+XFX+DWG9j/0v7ZWB6GqpyQhtRtzG4bfCGaObT+3nSWk/ehsY8qk/ fwUcl3BTWb3ef1bqck3LcUoamPERCZuXOzfntPdLGmGr9c8Lw4lTjHu8UugypbqoQXF5 Q5PxsKWt1Um9Udc+r9dMq2v1RwgURSx0hTjI1iT4N7LMndflQ1d+WOxmFaBsBqWP3I9A C+neG9ZayHNyFOGu9hQHSLyNZopD7921iWyUcWenSKDgtzF57lafUtU9imx46W/OjpKz sIOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=N0U7gxV4; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-39014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ca23-20020a170906a3d700b00a26dc87b7f2si1080348ejb.820.2024.01.25.09.16.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 09:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=N0U7gxV4; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-39014-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0C17A1F2A2D9 for ; Thu, 25 Jan 2024 17:16:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8CDF137C5A; Thu, 25 Jan 2024 17:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="N0U7gxV4" Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 791FD130E33 for ; Thu, 25 Jan 2024 17:11:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706202684; cv=none; b=FftJb13skLapi+jx1OZqs7g23ZKk2MlNC6anXZUbw2uGDJWIsUjApxcJ7RO0GczpFAiTqx6h9N54naekvhL+2dA6CcaI7Q3x4Z6AfQzgD2v2P4VX+v9RLiLPBruNxl2Lb8arj5KqIygsxe45FeF2c/UsKkPd8Ilc2sWJyWvDEhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706202684; c=relaxed/simple; bh=nEOsNt6FFR1h3VkdNsbanGLxwjGlJ3VKJhYvlacD+Z0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jAQcNiGyesLpU4EHa/hJcvXo+p6vTVyFO4yNQAypoalEEVb3o/nQPke6gqZXYnMjpLjfcg8R7vknimliGiGBIighXRZsHLEEjbOgldIkcAF3LSzA5T/cpINOCBpHDqX+82kERUhh4rsaq7+rbEduw/LRaAews622vMn0XzttOCo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=N0U7gxV4; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <081af630-ab5d-4502-a29a-a8577d414809@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706202677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cwiSZZSX/ApevLiEYXtfnRTxSGnWM9HwOp5AgT3owUs=; b=N0U7gxV4MpRvXxZcKiNEOu7DcT42hPeaN/Y2U6qOFPHSWeUEx4AgFNLBjp7qqagQPL5Oin vS/FcFfWwyVinSJlI1TWDI/1iwAtorxSkT5HS1mkvoDa4w5K36G+wEdbCJp+CO7+M+5p6Y yxIDgy4Ne25i2rLOl8VrcxMTq+AfUn4= Date: Thu, 25 Jan 2024 17:11:08 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 2/2] net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings Content-Language: en-US To: Esben Haabendal , netdev@vger.kernel.org, Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org References: <5606bb5f0b7566a20bb136b268dae89d22a48898.1706184304.git.esben@geanix.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <5606bb5f0b7566a20bb136b268dae89d22a48898.1706184304.git.esben@geanix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 25/01/2024 12:34, Esben Haabendal wrote: > TSO and TBS cannot coexist. For now we set i.MX Ethernet QOS controller to use > TX queue with TSO and the rest for TBS. > > TX queues with TBS can support etf qdisc hw offload. > > Signed-off-by: Esben Haabendal > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > index 8f730ada71f9..c42e8f972833 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c > @@ -353,6 +353,12 @@ static int imx_dwmac_probe(struct platform_device *pdev) > if (data->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY) > plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY; > > + for (int i = 0; i < plat_dat->tx_queues_to_use; i++) { > + /* Default TX Q0 to use TSO and rest TXQ for TBS */ > + if (i > 0) > + plat_dat->tx_queues_cfg[i].tbs_en = 1; > + } > + Just wonder why don't you start with i = 1 and remove 'if' completely? Keeping comment in place will make it understandable. > plat_dat->host_dma_width = dwmac->ops->addr_width; > plat_dat->init = imx_dwmac_init; > plat_dat->exit = imx_dwmac_exit;