Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp419437rdh; Wed, 14 Feb 2024 00:16:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWM3NFJfU301fEB7pFeRI1ZkOYLV1/exwQuzl/Xj1zDouOAxG+QP+IYLK5rColDeAfxJvSlqWNLqwJZvk4NtVYbKG3taNNeshh4dLP7aQ== X-Google-Smtp-Source: AGHT+IHUQjKwMxCGPPAPfQM1HQ4jjdnDub+Cv2gWsW1Z6vozohUFNs/Pz95bRK65vA8AQhxOzbUk X-Received: by 2002:a05:6a20:9d92:b0:19c:955e:7100 with SMTP id mu18-20020a056a209d9200b0019c955e7100mr2441384pzb.62.1707898608888; Wed, 14 Feb 2024 00:16:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707898608; cv=pass; d=google.com; s=arc-20160816; b=MBQYcnI/i2g/MLsuNc/9UtVWFjRZUsw/WvGRWB/BDcIDoiBiTdXgsk36d8rS1La7rL hsZtqn9yCWc7FyZKPd9Jf0eO6knBBogcCCvnYYNhLB+OwOUctbxtuXZjmZsUoa8NCToO Gzwp/4srZiig0KQm67aqBIns/G4Z0/Z1swkeTSq47sNo3ByPxIpdaDoOTKH1w5wkb9uS Aw5LQKn59LJaKsOIzzJ86sAhHrv6ASB1btUoAJdBwwDdSih8HtjXEKvC7H0z/0OBr7Iy gKCnm1JtcOA5RI+2t/vHJCzKpAd8WGTGGfeED77pErj69pfJ8wo8VFdBc7rswD8ealjy ttVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fbrmV/fTxTcI3ZYxWZP5BZRl9IWnyHuuwCP8tCjW3D8=; fh=K0MWoL6a3pU/y/0qygZzr64Jw/6xcT5jMdL6PpiabkE=; b=Y5ZSVw4Brp9B+hqIjCYpFuIQ+ZwCbMYMoBOjpueSYskN+3tuyfl7kcHBzZitnXbKht UmAdOsnJFdZRMsHKXhvouSKCuDfRBLFA79zKS+9p+u9zBDW6zbizj7QpKhMvzmmZq2JQ 4Z/F4xfGmDDEEsWlJl+V8F8FptV04d+Z4HeJE68EOwaWdcFDqk7w8XfxvIY72oSqPKpN ujTaGKtB1/+1eoxpDVaRXGPgPyC1P5CEtZ3XGXRLdMsE5vGQikoTWJdpK2fTIgi2ke8O 4FXc+AdQ0z9Y0DcTzvmaEUivaYWLiHG07UJMUgtJEtzBwe3f1oKqfVYslPqC6kEYWl1u 3Ktw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=2Hi3sxu3; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-64860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com X-Forwarded-Encrypted: i=2; AJvYcCW3/j7hy/6Bs28nDfjbI82+Z2nAloJsRxVaULwXnNi+6nCO8Gda+7WqR/HCEXIcfeXIS/CnQ37uQM2fGX8KD2xy73u0VwBjt2Wu4P3hGA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a17-20020a170902ecd100b001d9176f56f7si3471055plh.462.2024.02.14.00.16.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 00:16:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=2Hi3sxu3; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-64860-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 56846B23B38 for ; Wed, 14 Feb 2024 08:15:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA009125AF; Wed, 14 Feb 2024 08:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="2Hi3sxu3" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 5CE04125A2; Wed, 14 Feb 2024 08:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707898510; cv=none; b=i2vkcknKD9iR60iOzVkJa64iS6XdnQmBvrLRs09cLMKb44m8tx8gqGk+7ydXPq5wzzs5Hr707VVbNEW1y3q5krn99xY7Ui8T2XI5uhAZfzI74JsRR8SwHCq4X7AddIPEOIG2/9PMfEX4Jxk0CQbN80xKxrN6PjDyl5xZMcHIKp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707898510; c=relaxed/simple; bh=R1qEZaJZqEahESp0vUMVsznWrk1nhHpzObybxfL6gjg=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qTD6m+Vyo1pA7hRS5AAgsrzpiv8PQixEG1QOCsEo4SK3sTjpG+bS126HGIFBcLVuKldVCJWiqOYjqDwMQceS9BF4q2NSc0njSZe0H0ZzjwIDz0Q1wPtPHzomrn0zZPO2+c+6tczXDex5e8g2yiGVVC4gZ4aj5pI0qQr0ZEO50aY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=2Hi3sxu3; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1707898510; x=1739434510; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=R1qEZaJZqEahESp0vUMVsznWrk1nhHpzObybxfL6gjg=; b=2Hi3sxu3KM/y18BIdJtYyMkzkWnI6/rToE2SIV3Skh4t3A2zZ3evc9Ms fUTirA42tG56e/0GPdWeS3W56LK6/gymUPgf5aEd8KZemmh66Tjkj44xK w+GaOz1nhmypbpvHYkb2sTg32/Bq460PBgfwPJr1BXutzLl5qGTxtsMiM 2lOHUbi7kwKz5wyn6NYJsEd0e/65Ptt/nLmTfZ6CnuS+cr8FQk+jsOhkt hEuOzh7XAJpPSCK9SWwBuxsctedE23E+HJ1YzCEHCxw343hkFSDkuTqWY SCfWScxv69hom9yVYxI37Ski+rLqUt5dQvxN6kbRV9ygACuzqQAn/X5b+ Q==; X-CSE-ConnectionGUID: CP2X/acaTSCOFjJ1bbznCQ== X-CSE-MsgGUID: GHR+fUgGQOG+4nuI6k8xAg== X-IronPort-AV: E=Sophos;i="6.06,159,1705388400"; d="scan'208";a="16217464" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Feb 2024 01:15:09 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 14 Feb 2024 01:14:43 -0700 Received: from localhost (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Wed, 14 Feb 2024 01:14:43 -0700 Date: Wed, 14 Feb 2024 09:14:42 +0100 From: Horatiu Vultur To: Florian Fainelli CC: , , , , , , , , , , , , , , , Subject: Re: [PATCH net-next] net: sparx5: Add spinlock for frame transmission from CPU Message-ID: <20240214081442.w533wvcvqpvq5352@DEN-DL-M31836.microchip.com> References: <20240213121705.4070598-1-horatiu.vultur@microchip.com> <5476743f-3648-4038-97f8-a9df22c0f507@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <5476743f-3648-4038-97f8-a9df22c0f507@gmail.com> The 02/13/2024 09:26, Florian Fainelli wrote: > > On 2/13/24 04:17, Horatiu Vultur wrote: > > Both registers used when doing manual injection or fdma injection are > > shared between all the net devices of the switch. It was noticed that > > when having two process which each of them trying to inject frames on > > different ethernet ports, that the HW started to behave strange, by > > sending out more frames then expected. When doing fdma injection it is > > required to set the frame in the DCB and then make sure that the next > > pointer of the last DCB is invalid. But because there is no locks for > > this, then easily this pointer between the DCB can be broken and then it > > would create a loop of DCBs. And that means that the HW will > > continuously transmit these frames in a loop. Until the SW will break > > this loop. > > Therefore to fix this issue, add a spin lock for when accessing the > > registers for manual or fdma injection. > > > > Signed-off-by: Horatiu Vultur > > Any reason you targeted 'net-next' rather than 'net', as this appears to > be clearly a bug fix here? Yes, it is a bug but it is not something that happens all the time and I thought this fits more into the lines of 'This could be a problem ...' therefore I had targeted 'net-next'. But if you consider that I should target 'net' instead of 'net-next' I can do that. > -- > Florian > -- /Horatiu