Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp505455rdb; Fri, 26 Jan 2024 02:13:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmKQj43FLOoahnPCrrIf29wjxV6CmTWI8jn6H1+mo2eEzjrZChsaE/D3A5aH2uVwx0MEL8 X-Received: by 2002:a05:6358:d195:b0:176:67dc:ea97 with SMTP id ka21-20020a056358d19500b0017667dcea97mr1930375rwb.61.1706264026513; Fri, 26 Jan 2024 02:13:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706264026; cv=pass; d=google.com; s=arc-20160816; b=YUk/1SjvS8V6o+DXuPSEm/dpaFn5SE4YcztavUYQWDjS7Q/ncKo3AIAI39zuiiIk4F 4U3OlL538ChtfzZb0Vn/ttMx4BffJUOMHTBV28ddmFOBLh0aYJ7KsS8xIrwVr3FLLNKv h+q2zNUylyfoAhXNVN0dBHuB1lJEibbufL1EIuS3Ae+DkEdF6TwK3n5rvxBkKXxYdt9j ygFDuuJj4txGxKurgXRk1fP2IXzuO0X8gVetLV31fOsijeoW0cksZCo8uGWuIzETMJC3 cGcCBsDTjeDtXuNmTHE7dJdmixf8Sn87Qz6fFFDFWGbJUAozfgQDX60tiEQMnSy1WFVr sA/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=PUfxJlZFVfmPhNLMt5rpstbfpKShoNxijw+jhoG4IIQ=; fh=v7hefir7TuQo4k08HEm4KyhqmXBDG8bpkg2CrCe8pjY=; b=xlcqTeadcXxPy85uwl4dPxuNTZMiNNndlXO/GABq3noRq0dUKXDGRc7TlF2o4Rf0PH ZQytEJhwY13YXFpJWvlTF8fqxjWa2MFNGatzbWu2o0a3oxO9gDV2HQYGOnTrLCXVPN+2 Gp+IUjNS1LZ1PRmz3/gQhkSaA1hdZENB/wtT2hH7tQS6yXLBJRjr8wRUSHiFqVcV4cCe MIzuolMsaOfCYNpeaVUPY2CXmGhrAgEmgvkmdNv6R7XLyiJqvZeDRDc14XCKGg5H7+2j lgGGRPwLkAoHFxa3wLCuJ7ScRB7eoV1CPIzffqL4u2uX/dCM9K0rQhmvvHFXdn/G806P 0Now== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=qhQ+aznB; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-39890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bs192-20020a6328c9000000b005c6b4e190b0si855748pgb.530.2024.01.26.02.13.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 02:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=qhQ+aznB; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-39890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7EDDA298565 for ; Fri, 26 Jan 2024 09:58:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3664A61675; Fri, 26 Jan 2024 09:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="qhQ+aznB" Received: from www530.your-server.de (www530.your-server.de [188.40.30.78]) (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 76DC860ED5; Fri, 26 Jan 2024 09:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.40.30.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260134; cv=none; b=e15QsUn5GXgw0Zld4O4x90xB+wmZUl0aV0ABTpcXEnU4Sjoh+OrNLaG6kXmiLpZTiO57+7qpIs7KyOlMjZy/gJ37OSlkhWjJa3a9e+PFIrPjsunt/Ux9Zn7vUwA+Wih9vhlmVE7XigFSqURlU9SG4g/P+2h+j53h10YbpOyeHXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706260134; c=relaxed/simple; bh=+iBdilf2oAlb3QWslakRcDz4Slj2S/vo74OJbOpf7io=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=u+AS+h6e+EB6kzV+2NBhUL8CsyW36hXqgqG0oVd0hiOPutyNizo8iZ/+ULEBPVagOJyF9mIN23mHmuC11Wg+xobX9wrdxLJiG3cCW24ApN0fqxiaggdZrZIfblbJKRs3lBUAeH2kuTLwDiH6feBDtyWxFzSU18kW8aBhWkGP4ZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=qhQ+aznB; arc=none smtp.client-ip=188.40.30.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=PUfxJlZFVfmPhNLMt5rpstbfpKShoNxijw+jhoG4IIQ=; b=qhQ+aznBBExDH5jZPmD78Y4aEl 8AGLUycpgv2X48qKwFSdTpu0TvBGX9DeIgtBi5WsujLd4bS2Zhk4nuIPMCzzn6BV6Rq/1n/gIHCm9 nKxz8qwTLQqzd7B/VcTl/eteW1uBuGjqqU86wiZHpJmgO0casflUaxMcIU4jm2gSgiQ9k/F9z0d3d Vt3wBK2LJbhhJQMrLaTejZOB+mnXokTB0YMlfid+Gur3Yke93LIfiRTEYkVfO3nvd7PPOKVtIpRUo 5kpwVCPRUpwGSjB6tJoQv7rr4mBywoyWdNKNRQyqDzmlOqPzNONvwV8T24J3sjRxSEY1OvewUg1KY 476+OxDA==; Received: from sslproxy01.your-server.de ([78.46.139.224]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTHoA-000CBk-GH; Fri, 26 Jan 2024 09:43:30 +0100 Received: from [87.49.42.9] (helo=localhost) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTHo9-000Kqi-0v; Fri, 26 Jan 2024 09:43:29 +0100 From: Esben Haabendal To: "Abhishek Chauhan (ABC)" Cc: Rohan G Thomas , "David S . Miller" , Alexandre Torgue , "Jose Abreu" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni , Maxime Coquelin , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Giuseppe Cavallaro , "Serge Semin" , Andrew Halaney , , , , , , , , Subject: Re: [PATCH net-next 2/2] net: stmmac: TBS support for platform driver In-Reply-To: <92892988-bb77-4075-812e-19f6112f436e@quicinc.com> (Abhishek Chauhan's message of "Wed, 10 Jan 2024 12:19:29 -0800") References: <20230927130919.25683-1-rohan.g.thomas@intel.com> <20230927130919.25683-3-rohan.g.thomas@intel.com> <92892988-bb77-4075-812e-19f6112f436e@quicinc.com> Date: Fri, 26 Jan 2024 09:43:28 +0100 Message-ID: <87r0i44h8v.fsf@geanix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Sender: esben@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.10/27165/Thu Jan 25 10:51:15 2024) "Abhishek Chauhan (ABC)" writes: > Qualcomm had similar discussions with respect to enabling of TBS for a > particular queue. We had similar discussion on these terms yesterday > with Redhat. Adding Andrew from Redhat here > > What we discovered as part of the discussions is listed below. > > 1. Today upstream stmmac code is designed in such a way that TBS flag > is put as part of queue configurations(see below snippet) and as well > know that stmmac queue configuration comes from the dtsi file. > > //ndo_open => stmmac_open > int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;(comes from tx_queues_cfg) > > /* Setup per-TXQ tbs flag before TX descriptor alloc */ > tx_q->tbs |= tbs_en ? STMMAC_TBS_AVAIL : 0; > > 2. There is a no way to do this dynamically from user space because we don't have any > API exposed which can do it from user space Not now. But why not extend ethtool API to allow enabling TBS for supported controllers? > and also TBS rely on special descriptors aka enhanced desc this cannot > be done run time and stmmac has to be aware of it before we do > DMA/MAC/MTL start. Isn't this somewhat similar to changing the RX/TX ring parameters, which I believe also is quite difficult to do at run time, and ethtool therefore requires the interface to be down in oroer to change them? > To do this dynamically would only mean stopping DMA/MAC/MTL realloc > resources for enhanced desc and the starting MAC/DMA/MTL. This means > we are disrupting other traffic(By stopping MAC block). Yes. But you would be disrupting traffic less than by requiring a complete reboot of the target which is needed if the devicetree must be changed. > 3. I dont think there is a way we can enable this dynamically today. I > would like upstream community to share your thoughts as well. Hereby done. Could we investigate the possibility of using ethtool to change TBS enable/disable "run-time"? > 4. I agree with Rohan's patch here and want upstream community to > accept it. This will allow use to configure the queues where TBS needs > to be enabled as hardcoding in the code unless upstream has better way > to this using userspace. > > Please let us know if you think otherwise. /Esben