From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 35151212B17 for ; Fri, 10 Jan 2025 17:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736530705; cv=none; b=GvFSO6rUQo2gkZwD/AhTGIzMrSApMdOUg130JGcBPZYokenVldUsb5PVDyxU1ayQKpHJV6y00BAsWCmfiv6nh7Ac2RI9mvP1BZtyGvTjVqbahjPkS8PbSZMYM3SzyMkLz9ALHD79qlfJrnDYeYnpQzReAmSeWuJtsEKlVoD5GLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736530705; c=relaxed/simple; bh=Xc0LpgSxeWnVXm4Gt0fYSe89ljh2mxgpVSUJyXzY328=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Mr9hUEf1ov6iiUFvHr9/3ZgG/6Bd2NSDTBuLFk4WFpi22sCSAgD6poju4Ckr0uXVj4I7NDYnx3CXzD5n01/FjUZDumnxwbqKfN0C6wbPTfBPP8dfQDU0RTxCxG4eMaBOuGZHVqtHgG8V4vyfA3ORZJF2+D1zfQAUVlWmE2CBL9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b=XuLHWiSz; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20230601.gappssmtp.com header.i=@networkplumber-org.20230601.gappssmtp.com header.b="XuLHWiSz" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-218c8aca5f1so47833305ad.0 for ; Fri, 10 Jan 2025 09:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736530703; x=1737135503; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=AaCF3XWNWiv2osYod1MG0foHbsq7nHjfgxfahU2MLW8=; b=XuLHWiSzFb46hcRu2+Rste4jJyh3m5HeNczWiqoBI5Zg0hB1S2l3SkcG6Whq9//0I+ djaEUIorF5euJoGmSv4Ndsfmngf6OJizk8j1NNcft9S1/4dfeqTRZz5Esg7CrK7qfwfm 0Q057DQlnMX53uLYbi9ql9/PYsc9EVyYm/B/epJMlo+aeWcvS7wG7Q3EKPw1dBcX6Lcr shkUpEcNjg9hW3KMmGIyVLo7Qan1j6ncdBOFS2s7X5gfNhOESejmsAdY708WAGG9VgA2 dS8gnqEcguplgFdmVM5GdjPS4CBM4IbNhGi/Z6PY1w7ej1dRvIJxNzIyzpI6MmrwqBfO EmBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736530703; x=1737135503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AaCF3XWNWiv2osYod1MG0foHbsq7nHjfgxfahU2MLW8=; b=lElcpXtKOLQLQn36wk9rhkwIX4cjz1q6rJ4fxFcAvVZifrn9n6882D3L+yte4tJb6a A6rO28n9cyCK9ryXeGpLdLCzi/9VWx+dCMRoYZ+dflTW/X0JrX7vzH15hhkdOusKIQiE nCjqyCoSz6VqTLQ2HNkxd1OAcV5Yy9g/EsNEalQB4IbisP6nMS6Koq7dRBFlExgAgHOl j5Vpk8d7tqv+AEM1JTkypiPl4YyUNeVngykKm3av+UQjeIuss9jz1J2ltFfqgnKXqByk Zk1uPzHmAqaGjGhOBl1iIAbXen0UFeoeWi2dNUmlxCrD5V8r8uxA1ujbIjIueQQZut14 9GYg== X-Gm-Message-State: AOJu0YwISjc8kzTF7WJSm9Ujmjnx+CVH+OnmgzDogPZ1MlNkRuIQ4UjO lk39liG9E/HIcj6VsUHIxrHdoBCyB2nnNvAy0CHaNDElhKov+BKcoAQ7xFehqKQ= X-Gm-Gg: ASbGncuNBfrYj92hFt3ySX98JOFvtpC/Hmgd7wXE/ASE/bx+4ty7VwZKmkLcV1ErU6v GxNazP0Peq+CJqjLzT/vQUTb2UfMFeSoZ5x3fIOQJQhkNmO8/rKNYVwVlUQdC9nmEh550SNTIO5 MmLBvqnHojud5/MtgkDB9JISUw3+6ReENsLYj1h9J0JJZ8gr9RNbNvO4gbMX7FZFBLDsO65eUwy ERUwY661Cr93ISrT7JSEGwmb1RWurPxBSLXEWSAMY9t7KtgcYVUUtBKI/gBpFN6XEvtyntqHIzt 9f37N8nc75IO9HfwykOxGJi+l+obaB5NgA== X-Google-Smtp-Source: AGHT+IFruOsvLZwxdgb2eT/ZWZCtZnr1qJLKlmbhNl+GSWEOYy1xmGTwD6FNcA0bViHhul3jyXRZ0Q== X-Received: by 2002:a05:6a00:3a02:b0:728:e81c:2bf4 with SMTP id d2e1a72fcca58-72d21f4eefbmr15914264b3a.11.1736530703600; Fri, 10 Jan 2025 09:38:23 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72d40591da9sm1794105b3a.73.2025.01.10.09.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 09:38:23 -0800 (PST) Date: Fri, 10 Jan 2025 09:38:21 -0800 From: Stephen Hemminger To: Daniel Sedlak Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [Question] Generic way to retrieve IRQ number of Tx/Rx queue Message-ID: <20250110093821.4eddeff3@hermes.local> In-Reply-To: References: 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=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 10 Jan 2025 10:07:18 +0100 Daniel Sedlak wrote: > Hello, > I am writing an affinity scheduler in the userspace for network cards's > Tx/Rx queues. Is there a generic way to retrieve all IRQ numbers for > those queues for each interface? > > My goal is to get all Tx/Rx queues for a given interface, get the IRQ > number of the individual queues, and set an affinity hint for each > queue. I have tried to loop over /proc/interrupts to retrieve all queues > for an interface in a hope that the last column would contain the > interface name however this does not work since the naming is not > unified across drivers. My second attempt was to retrieve all registered > interrupts by network interface from > /sys/class/net/{interface_name}/device/msi_irqs/, but this attempt was > also without luck because some drivers request more IRQs than the number > of queues (for example i40e driver). > > Thank you for any help or advice > > Daniel > Good luck reinventing irqbalance. There can be multiple interrupts per queue, or one interrupt can serve multiple queues.