From nobody Fri Nov 29 02:51:34 2024 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 0E2231741D0 for ; Thu, 26 Sep 2024 03:00:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727319646; cv=none; b=JltyMpPBjs5yYN7bIZZ6MohS0blNRsNcw3dVi2rJztpA61mof+BATb9w7vI9bPRonjzR3qwd/Cfp1Q2KahE2I0f1T0sYRnmF62ZX8FqYsrb0yBsuKhhN/JVBnqte3uGCexIWYjMQ6aMOY1cuhiaaSlvWbrxTsFY73eiZ+1F1dIg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727319646; c=relaxed/simple; bh=ke7VjoLC8SeGZeHWg/3wGeF+yuAtJBY3g55jc8f75O8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nf5btwvbxonek+b7kXKQfhhGyAkeKJhfs4993AM1HcIVeelBFp7Hfc/McJY74zNMET4V8dP/MJcsqqQ1uLLkRRR6QB380jxEsty7w7n4jrO1rQV0sUJtL1jqR57LDpRM1yEvq/F1Mle77N6j3DHnHU7hkecgnZdPp8bBqKvoOIw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com; spf=pass smtp.mailfrom=fastly.com; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b=aXpwI+Pe; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastly.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fastly.com header.i=@fastly.com header.b="aXpwI+Pe" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-718d704704aso454315b3a.3 for ; Wed, 25 Sep 2024 20:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1727319644; x=1727924444; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mFH9E5BI155gM3Rr+uFGb1WMCMDmhX6ED0N/YxAEGrI=; b=aXpwI+PeHK6HwQNrXsPrSi6WwskDe5cv6wIz1KcTTSF9EguQGpEL8TDJEHCsNHwWGL QycdSoy52w8rIemIFIxzVPcichyF1DY8Cw2QCsZfmSCjJw8gXHBeIVc7XE8YNUpcDqXa 3V3Gq9FgKBjiq0cyAMFykFpIboeLT80GUJIJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727319644; x=1727924444; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mFH9E5BI155gM3Rr+uFGb1WMCMDmhX6ED0N/YxAEGrI=; b=Z97/AYQN53Wg3T7yUQymZ62XR1iY8wESJ0uakvcvTYN0P9gfhNL3VXn2kpCgwmvYL2 hTjcLD7ZnAH4yM5F6hHp4RMAdLDwEf4g0JMhLRR4hl26NpRXeD6R5Rbwhe5wRKYx7ceI 0/jLDK7kTunZ5TJKkMIDAgzFgjyOyLInLyNZVHmD1tISPO3d/yn5dqoaxt3VCdNWTMpy zSlVi58IW/3uveOuUEBrvFVTaElYS2PfnznTua79X8tYdvkulkuUbapRzgXBYqBiSN8W JWziJ08rUPHPjLhg4duQFVFvfzKB88ee2qvuFzoW4fRI6MUU8HUPsNIijonE2lKjIss/ zYtw== X-Forwarded-Encrypted: i=1; AJvYcCV0brLnhx+E74DmyZk1BQ2QCQ6VCyBgR5tmPIBchF6FPZbvXz5cgmfoCcLn+WxB2IK+QDjLqvmJLQRG9jg=@vger.kernel.org X-Gm-Message-State: AOJu0YxCFCMPBWJFVqdoxZ2CD9FfIP8Bdb80MV7ic8Sf0mxOwZnEoADI UBLxsOUUZJa00SACepP0A1Wg+II2y0+9IVSKTMeqiIAyrEq2ReStF7nnzFo4eNM= X-Google-Smtp-Source: AGHT+IFwXhiKp92OtV3zKXtfySxHUFQ6ffBh3po82IyoEmF7fZbfZbFLz2IsWR+8MIdi2e/0d9XDBw== X-Received: by 2002:a05:6a20:e18a:b0:1cf:55e:f893 with SMTP id adf61e73a8af0-1d4d4b8609cmr6114351637.36.1727319644364; Wed, 25 Sep 2024 20:00:44 -0700 (PDT) Received: from localhost.localdomain ([2620:11a:c019:0:65e:3115:2f58:c5fd]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71afc97c2a8sm3354111b3a.163.2024.09.25.20.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 20:00:44 -0700 (PDT) From: Joe Damato To: netdev@vger.kernel.org Cc: Joe Damato , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , linux-kernel@vger.kernel.org (open list) Subject: [RFC net-next 1/2] gve: Map IRQs to NAPI instances Date: Thu, 26 Sep 2024 03:00:21 +0000 Message-Id: <20240926030025.226221-2-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240926030025.226221-1-jdamato@fastly.com> References: <20240926030025.226221-1-jdamato@fastly.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use netdev-genl interface to map IRQs to NAPI instances so that this information is accesible by user apps via netlink. $ cat /proc/interrupts | grep gve | grep -v mgmnt | cut -f1 --delimiter=3D'= :' 34 35 36 37 38 39 40 [...] 65 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json=3D'{"ifindex": 2}' [{'id': 8288, 'ifindex': 2, 'irq': 65}, [...] {'id': 8263, 'ifindex': 2, 'irq': 40}, {'id': 8262, 'ifindex': 2, 'irq': 39}, {'id': 8261, 'ifindex': 2, 'irq': 38}, {'id': 8260, 'ifindex': 2, 'irq': 37}, {'id': 8259, 'ifindex': 2, 'irq': 36}, {'id': 8258, 'ifindex': 2, 'irq': 35}, {'id': 8257, 'ifindex': 2, 'irq': 34}] Signed-off-by: Joe Damato --- drivers/net/ethernet/google/gve/gve_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/google/gve/gve_utils.c b/drivers/net/ethe= rnet/google/gve/gve_utils.c index 2349750075a5..30fef100257e 100644 --- a/drivers/net/ethernet/google/gve/gve_utils.c +++ b/drivers/net/ethernet/google/gve/gve_utils.c @@ -111,6 +111,7 @@ void gve_add_napi(struct gve_priv *priv, int ntfy_idx, struct gve_notify_block *block =3D &priv->ntfy_blocks[ntfy_idx]; =20 netif_napi_add(priv->dev, &block->napi, gve_poll); + netif_napi_set_irq(&block->napi, block->irq); } =20 void gve_remove_napi(struct gve_priv *priv, int ntfy_idx) --=20 2.43.0