From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EEA61A83FD for ; Fri, 20 Dec 2024 09:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734687226; cv=none; b=VUmol0YazF/lwAxqQIILNTfckM64/qrlmOzX+pZ764Le0TJWaB9hGOWg9fLcIITRzaSb1iep/nMb6zr2a/a5Tjjyfp3i2pwkzNTRL3UtiaALuHmOassA0qoJh4/Ytyj9uG5jRJfU9tgqpuriUx+ouA1BLZabnF9v8AQfkyNrt2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734687226; c=relaxed/simple; bh=ql2cvojNhDoLyvf6JrsgSjwAgndqbWMG7FrdjDf+I+0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nxw2hgJ2rJnlCBqyj5u4FOmRgQnJn7TMDtnzlxotzMShrKBneMwum+VyFWInFojU6OyA07udr+6iGNmPYr762CXSOq/bk68rs+40AFHWnYOtaV2E658nM44ETytzzTbykDnd4BH45tD3iwpo6wk7Q9CeOHd7h0CY8oYnkMyc9zs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cogentembedded.com; spf=pass smtp.mailfrom=cogentembedded.com; dkim=pass (2048-bit key) header.d=cogentembedded-com.20230601.gappssmtp.com header.i=@cogentembedded-com.20230601.gappssmtp.com header.b=QHeX8rbD; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cogentembedded.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cogentembedded.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cogentembedded-com.20230601.gappssmtp.com header.i=@cogentembedded-com.20230601.gappssmtp.com header.b="QHeX8rbD" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-3003c0c43c0so19120951fa.1 for ; Fri, 20 Dec 2024 01:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20230601.gappssmtp.com; s=20230601; t=1734687222; x=1735292022; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jo8fLuZk//T+YU0KgoC3pp0THGZOK8etrF75WPNYpLU=; b=QHeX8rbDomFRsno+nFUj2Hz39d6BAH8JdJI756pCZoMfTU2LofTPvrlXw4ltHfnnsC zSfABc+8cBLxE/MuuAs+uBDrOg7YjHDz7IKyfCecOWC2gcfm7OysqMkPhbPu/RTfAD5N eESyahyQwR8l7QXMGDNNt8EWyfHHiOVIR7ZGnGkXZDlFNR+km8LQO+9aWBQFFTvLSq1C DGlgDp+lnyz6xyzx7wF0K8+zlwOVpbWYJOuLvLNnFGH4rFdMr3LBErhX4TUBlRr7MvYk c/LNdjGabePLAfNECfWGHo3Bu+hP/cbvBTCVBTRz9/dCA/0oHh+ACJSy78lhHnz5VJBp 9JHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734687222; x=1735292022; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jo8fLuZk//T+YU0KgoC3pp0THGZOK8etrF75WPNYpLU=; b=D0MxzcT2DVEhB6GG84ZVfOwADIZU24QpUHyr//1NICMm4KpSJuMhlB4wktKwPEN31u CVsblGpB8Bi03+X19omofi98bzilk5PY+CiSyaMyQP3AmhqAiiCq3YP60Tkeaj90KGZy DfE2TyXWM3I3ylKehFpuZybUDa0o4VNwJ9EkInIdUo89eOo02CulXeSbTZaklD+aFrUQ GwTwDb9gDieTlmxeh16MReq+PZjku32p7auBP1UyHuqLxkwCk3LgvI0me5JgauAPPlLE hcC7rFa0QSjVcCz0MZxpUrPBfgzMHGcLi1ERV0JV7MmDNskjYSt2hoPpMvgsQTkML3/I DI7w== X-Forwarded-Encrypted: i=1; AJvYcCWnKwgmb7cytd41W3X5o+MWE+c8kntMDb+4aADpG3aDfUMEDLJoUyMuf7aJnQR3bZTTi33bARIwBmiuR9k=@vger.kernel.org X-Gm-Message-State: AOJu0YxBNhH4CtxO0YKDvNkcA4D9Hn1xAUlB2WYoUNUZ18Sb2WlI8FbA UVKuLUEWojII2ehGfeVxQNqQ90qZAC4cVncxSkUXPbelDiu1SxTpjKXhw4HK3FI= X-Gm-Gg: ASbGncuU6cCOmzdeYfmxYWlY08QSq2c/p0OlS3uxZIqPeCbXajolk/AqVywMyWYfXPY Ej+ZY9M9tTxKCRQOwfIK/sSx91/BMa2v9QVLk3gihtlfKBkITj85YbubZ5kdLfMls6IKS99i2IC ckth4jvnRgFG83iZmHVkS/XVcL57A4zBAvWGFiP1+LofqxTdSnOrAR4YiAzqdeCJb6U29abaeWy 2NfUdQ7zvE3F+9j/+jSCt4kPfMsMk5fLhG0rvHbyRXW/q+o/TEmKV5loTb2Qw0nURzYwCL7TusX X-Google-Smtp-Source: AGHT+IFH9+g2ADiqcDjxY+wSn3OVVD0jTbeD93+8HhtUP/uu4l9Lapa834iXKgUP2D0TTAaABdYTIQ== X-Received: by 2002:a05:651c:1544:b0:302:3003:97e with SMTP id 38308e7fff4ca-304686087c4mr7366591fa.30.1734687222506; Fri, 20 Dec 2024 01:33:42 -0800 (PST) Received: from [192.168.0.104] ([91.198.101.25]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3045ad9c093sm4687421fa.49.2024.12.20.01.33.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 01:33:42 -0800 (PST) Message-ID: <21f0aa0e-9df3-4b5a-957a-dcf68399cdce@cogentembedded.com> Date: Fri, 20 Dec 2024 14:33:39 +0500 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 1/2] net: renesas: rswitch: use per-port irq handlers To: Andrew Lunn Cc: Yoshihiro Shimoda , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Geert Uytterhoeven , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Dege , Christian Mardmoeller , Dennis Ostermann References: <20241220041659.2985492-1-nikita.yoush@cogentembedded.com> <20241220041659.2985492-2-nikita.yoush@cogentembedded.com> <1f4b60ec-544c-49c5-b939-89882e1311ed@lunn.ch> Content-Language: en-US, ru-RU From: Nikita Yushchenko In-Reply-To: <1f4b60ec-544c-49c5-b939-89882e1311ed@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 20.12.2024 14:19, Andrew Lunn wrote: > On Fri, Dec 20, 2024 at 09:16:58AM +0500, Nikita Yushchenko wrote: >> Instead of handling all possible data interrupts in the same handler, >> switch to per-port handlers. >> >> This significantly simplifies handling: when the same interrupt is used >> for several ports, system calls all handlers, and each handler only has >> to check interrupts for one port's tx and rx queues. >> >> But it is not required to use the same interrupt for all ports - GWCA >> provides 8 data interrupts and allows arbitrary per-queue assignment >> of those. Support that by reading interrupt index for each port from >> optional 'irq-index' device tree property. > > It has been pointed out that adding this property breaks backwards > compatibility with older DT blobs. It does not break backwards compatibility. Current behavior is that everything is serviced by interrupt 0. And in case of irq-index not defined, the fallback is exactly that. (physically there is code that assigns interrupts per chain index, but in the current driver chains that get non-zero interrupts assigned are never used; anso currently multiple interrupts are just multiple entries to the exactly same handler that always services everything) > I don't know this hardware... > > How many ports are there? Less than 9? Can you just do a static > allocation, port 0 gets interrupt 0, port 1 interrupt 1... There are only 3 physical ports, however the use case I'm targeting is - virtual ports serving virtual machines (with offloading features making hardware directly L2-forward or L3-route most traffic between outside world and VM-owned virtual port frontends). In this setup, some of 8 GWCA irqs will be given to VMs and thus there are definitely not enough to per-consumer allocation. Nikita