Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1937408rdb; Wed, 31 Jan 2024 14:00:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTlxuQjmEv9ovVZTLES/ecQn1AMDuVV8Uhig3EZ44D/Oj3y7HcChjPZxp5NdZrdNyUa8GN X-Received: by 2002:a05:6512:138f:b0:50e:7bc5:20d8 with SMTP id fc15-20020a056512138f00b0050e7bc520d8mr723035lfb.4.1706738411902; Wed, 31 Jan 2024 14:00:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706738411; cv=pass; d=google.com; s=arc-20160816; b=gerWm/vD/dzJ73M7HWYpZeYH5hIsoNBp2Vuz5aWouTPKw6TnmQfkRv8tyYBk3n6U95 B1f/Ky4cCLl3Z3OThhepM9k0RtfjrgDKEJMedu6PVFQKSUYafjQPNDkXSh3KYDHh8STJ XUT/AqN4Pq0phxJYAQYpdsfC7393jF0STFi+gt+KXuvH6zBLbmIRyWh37v6Io/a4JgZ+ aZDziXVMZRGPCHL37X1YNDhZHfeB4+M8TgmUTlDc9OcDAd1xtABLxZdXiZxFUybBn1ez F2K5gBMfHzV4UKdPQ4dCZhfgokMI8Z/Ut7kpQ1MNgU8sXmRQQAEjZ3fYyJ5sbF2zo7yV MzXg== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=6cceawbCFiLT/nNuxjw20HwwZkJ0peSJEK9m+ASYads=; fh=9au3Zk/ojr2mO2luMG3RdEdhOYeFaUgT1GGr7ZRnTYA=; b=lLvFrOQDcvHyjcLnYqLTmlCurPZllGvSArSFWWCvWztBMaIxX3G/FkmISZmf8+8fQL +s9X09g0VsQjH3GsvyDab1o8Q8vJJgPcEffIjeyBAmH3ZRt3Ow7WgdAtHwFibB5fEMA9 PTrAlCFL8dSTl9LnChEK7BBVOoOxVJKXr4/MU7ZWrxyT5AZfjTeZt+DWXLBMfFd7Sumo WXkIRjb5gJYwOxH4UwFzQlNldrrzKlgEHR+qreO2ptOccXfSrzJLmCXXwAdoIH2MNO5p U+sIE/xraYgED8HQ7rVb8ZRPkt7k8/Cz9F4xb/g4q1q3O9iTERxAzn0yliARpWyFILj1 nEXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jX0hpcZN; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-47220-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCVIHwao6QijjxRKzdgq/8BrtaIxoAKvbxVRx9X7DJcOwbfIODL/C2505gEKFCmtFjDizO6gyeZOI2zp4jPaippnenVkNLBAWVkKzWCkcA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d20-20020a170906371400b00a365ef1de5csi1335080ejc.35.2024.01.31.14.00.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 14:00:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47220-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=@quicinc.com header.s=qcppdkim1 header.b=jX0hpcZN; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-47220-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7432A1F28B41 for ; Wed, 31 Jan 2024 22:00:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B150C39FD7; Wed, 31 Jan 2024 21:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jX0hpcZN" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 2B05739AC8; Wed, 31 Jan 2024 21:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738398; cv=none; b=QkqCLVcpse9d0/KrrdWhOrsLNUvN8LunyxdoFAj/oVQWO67IvvEGrjDU2/z4HBM7nh8nNO90m/TLWQTiXCvt/6e3F2u+azQpc+cSDVF1swPBXPZhz+sATf8omu4zPr0vgrjY6IacwiQsopUop42eGB91WF7x06bM0Sibkay5WQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706738398; c=relaxed/simple; bh=QS9kYyTmF0+N4WirBEbQPjUnZA5Cj9CVicXQINR9Pnw=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=JWlefwjT9xGuPwM+lUxNoLTQafI02v6+1+XCn2DCxYmTck9EHZCLpzY3M07cNfAqlUq3d4QmB9UhBFcgqcjOtfgVKiVSg83efF/kr3/PuYPDnNy/fbLTUXHJezgI0HnzLp6osEfFiWx32KtxMGnII2KpJIBJs/jGbfK335RGgIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=jX0hpcZN; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40VKseC0031538; Wed, 31 Jan 2024 21:59:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=6cceawbCFiLT/nNuxjw20HwwZkJ0peSJEK9m+ASYads=; b=jX 0hpcZN831ZU0B3HHrEPsdDQ+KmBd1831TuEAvXjnVuOVTFZOzMC2n5w1E4HbRXF2 RIXeiAhgQbVMgH/Jd/gohx9kXdiud+DHkBsTFkJSoNbAibxFMoAPgGpQcug7ljre iie+sM1L550U/rgiqg0XLn1iouCbDdv8+uuSUg/dnM1Pin1xdzRMonlF5vq4VIpz kjZwnVrjsaV5n6dHem2VR0Aq7Ppi7b08ALukMHw1Unc6fWU4+QtdE3jkR9IlUk0j uj+HjaomBQrt8Joc6gycVM/2iMlosftnLQAenSfFBTf/W4fp4oQQw1j7xA733uY9 ujA3Sw9ofUD9kMPCnlsw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vyve60auh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 21:59:23 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40VLxMCO007973 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 21:59:22 GMT Received: from [10.110.127.163] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 31 Jan 2024 13:59:20 -0800 Message-ID: <5626e874-066c-4bf2-842d-a7f3387b6c1b@quicinc.com> Date: Wed, 31 Jan 2024 13:59:20 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 2/2] net: stmmac: TBS support for platform driver To: Esben Haabendal 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 , , , , , , , , References: <20230927130919.25683-1-rohan.g.thomas@intel.com> <20230927130919.25683-3-rohan.g.thomas@intel.com> <92892988-bb77-4075-812e-19f6112f436e@quicinc.com> <87r0i44h8v.fsf@geanix.com> Content-Language: en-US From: "Abhishek Chauhan (ABC)" In-Reply-To: <87r0i44h8v.fsf@geanix.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: PB0QoEx8sXd23pNThVFyQYoPg1a0htHB X-Proofpoint-ORIG-GUID: PB0QoEx8sXd23pNThVFyQYoPg1a0htHB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-31_10,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 malwarescore=0 spamscore=0 clxscore=1011 impostorscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401310170 Hi Esben, My responses are inline to the queries. I hope i have justified my problem statement. On 1/26/2024 12:43 AM, Esben Haabendal wrote: > "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? > ethtool API can be implemented but that still doesn't solve the problem of stopping the entire MAC block because of enhanced desc allocation. 1. We can either allocate enhanced desc for all channels at bootup and then choose to switch to enable TBS mode at runtime (Additional memory usage) 2. Live with the disruption of traffic for a brief duration of time. Which is not a good solution for priority and critical traffic. >> 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. > any DTS solution today anyway requires completely loading the boot image and rebooting the device, but once the device is functional, End user can activate TBS, as he knows the exact usecase and requirements. I understand the solution is not scalable, but at this point we don't have a solution to activate TBS at runtime. >> 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"? > We can either allocate enhanced desc for all channels at bootup and then choose to switch to enable TBS mode at runtime >> 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 Best Regards ABC