From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.97 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796018331; b=RWqMCbLlS+pnRo2MgtH75spygjDHojwCK8enHIC6fPJL3l0xiGcT0qIgk5ZWG9EhTosg SS3apktuiro2D/9F6TcndMnEB3yzcrJv15E+wdenmvnOoL6ZpS5yF2nSoZuUlUUurpEpw ejI5xyFKBaPHFZ5MwBipeB59OYzCCsO3LCteqEG+5S/RRBJhDi25PvEwerWz/eTKNawOv 0Gr3t/qImuj1KBlpmP+iN9xrBCJxfnAb0UkDavMsymkUfix5x62rS0VI8oaA3WidZOyB5 hhQbS69vaRoBdgnsnUQZuhUAp/yCvsTa5aXmOL9y3JHGmFfOyrTKGzG808Zpnh0o6Cw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018331; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:X-Relaying-Domain: X-CFilter-Loop:Received:DKIM-Signature:X-Forwarded-Encrypted: X-Received:X-Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-DetectorID-Processed; bh=qdblJpJWKfrOSwWxYgUOIva4ST0Du0f5ga5iqv/vDQA=; b=0STl2N3fzgb2bO8zR4lwmOPW6QLKSdcrv5NhymbCB66dC/A2MUDF3wJe0lnAPloMvPcL dkPnafnipWUvCjYwYWb7+mBLPrJ1DABIIgX/GYhWPFpeHvxE2MJH4dCxCVgzhnw50H6aG oTqU65KbmQFRe5VXLZKxlnfFNmNLAj86abC+BAf8P9E3jJ2MY/HD+3+/Bzp8hHQeKe3vL 97ijsqVjWUsPnK8ZZI6rXLsBz2cS2beu+6ExS8pmYkGyR3CRT2bcsbQo9EaGzn441sYRE fyspotB/lBjKS7rKqbFZk7s1rf1gRFKaziEohWxcPENtNU6sVYFX0cEl0e095FlRWrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=hoO0NPWi; arc=none smtp.remote-ip=209.85.216.97 Received: from mail-pj1-f97.google.com (mail-pj1-f97.google.com [209.85.216.97]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3232A606A327 for ; Mon, 30 Nov 2026 05:58:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3232A606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=hoO0NPWi Received: by mail-pj1-f97.google.com with SMTP id 98e67ed59e1d1-3b520f1604fso1432962a91.2 for ; Sun, 29 Nov 2026 21:58:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796018330; x=1796623130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qdblJpJWKfrOSwWxYgUOIva4ST0Du0f5ga5iqv/vDQA=; b=YONUz6e7lkYbPWyW7Hv7Z4pL25J8U89SGpFi7ZvbFwPCc76celcuVWWERCAX8Xqm3Y XCOzgUOL1+ru0sfAY6p/Vh2jw4KwUQnjqNoVpUSxbK8X3lgZdhGAeiL05to41vQU8SqH P1TZJgxLM8aaZ+ehEIPtZlVEuZdNFKSVm/VynzUZUK7VFcHFSG5g2uydcDOnC1vUz8rs f4EnPv1ar0hdloKd1AAVewU5ZnJDhCoSB2Tw5H9PRGbyv9nVKYENkEB349VUji/059zR GXiIhqn5KmjT17eaviGpDtTkwpbwpntRkad2OmfMBFI033al0ovsEX/HKwPBrOCXqHNu 3lTA== X-Forwarded-Encrypted: i=1; AL+hErFu/e66korBVd5Aepre1e9UT0v/I42UnbL4eCVwXjhMT/62FMZ8jczUG6nEewzC81xa/UUqB7P4B57Sglo=@vger.kernel.org X-Gm-Message-State: APuU4Z+Qxnfv67V0O9/wveEVzYwV//RR/7wWOBq+kjarvYS83KIu/Ydy NDeI1B7orgHQSF4CR1BIH3DQQLHosIysS9yrTE5HeQev/h/aKOcfzA+qAIA85snP8G60olydE2L pduOjCwi2roZZDXPuMM0XJcx/qRBcs1wMHrVsLibuBOET9HqO7Ifb2FBpnuvBRX4yKXpvCSJAns 6C4BOW+Wwe3KOAiamZTI/PcoS1bYDXveKJZNaqNO3/gT5tI0CRUm3CX7kyUSFjiuqdtDHO8ckju Hmm2XQVhpVEACtzZQ== X-Gm-Gg: AZFdTZd9+s49jZB1uuxsqc1FsqVcm+MhJwZXKVgIPGyrqTHP5KhBT+wHA4UikDyi1Y1 mCFuK8LKgiBtm3J8c+DKpqJoDu2StGb7H2PM4vF4T6Gv3dbXPkekVj0nG4xZloKWvP+yqnmowZy NDvwOlyU+iBPNwpnzXld0alXsm6l3opebpO2RDQdhRin8AUvP5KCqCuV1OarlOJi4yV18zBMsEy Z7S/yhrACXFcdxPOMQTBVDQnWwVZVcBAbA7pFILLca+ITa5peO5W0xL/X3PXTVESLiLFOhRs3jB P3X6TuIMHUoG8USo7ZJOaltEb0EIXJaeNQJxStclyL42clp1d/jLrkqH2lzUvK90Ilbbr9qRKTN Wa66bCWtqdYpMEJ0OMN2QLcOp53xgZugFXMzSHWehMWOuOFcJwTQfNLoxiG514UHcGgiiQc/NBa xFXmZyriP/oHHrouLB9FSXsPXsYljkllkP7oCl X-Received: by 2002:a17:90b:4ec5:b0:3b3:a6b0:8991 with SMTP id 98e67ed59e1d1-3b41c96180amr30198261a91.60.1796018329738; Sun, 29 Nov 2026 21:58:49 -0800 (PST) Received: from smtp-us-east1-p01-i01-si01.dlp.protect.broadcom.com (address-144-49-247-123.dlp.protect.broadcom.com. [144.49.247.123]) by smtp-relay.gmail.com with ESMTPS id 98e67ed59e1d1-3b41ae59fa2sm20782102a91.8.2026.11.29.21.58.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Nov 2026 21:58:49 -0800 (PST) X-Relaying-Domain: broadcom.com X-CFilter-Loop: Reflected Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1b5a36efd01so124523c88.0 for ; Sun, 29 Nov 2026 21:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1796018328; x=1796623128; 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:content-type; bh=qdblJpJWKfrOSwWxYgUOIva4ST0Du0f5ga5iqv/vDQA=; b=hoO0NPWi+xIwzIifOz7DJ/ML+uoIHdnwLPIlipt6J4TuLwTfIhNzFyl9Dhwc/mjz+Q wJ/Zz6rQ0qY7Ef0dQZuHenzcsZ3S7ANy8x/65eJcr2LRIu137XBz06gSU53CwV0cTD34 ZVg4N+Vp+zJbV0jhTG6zd4nYGMVqaQC/0BJ5A= X-Forwarded-Encrypted: i=1; AL+hErEDaWVvOl0KCL+JQr0r1XkjCPJ4qvVhknV8nFo+orRul7TaQKXejxY0VCsOoxKr+NFODiehhrb7aeQXKfs=@vger.kernel.org X-Received: by 2002:a05:7022:f516:b0:143:26cf:8615 with SMTP id a92af1059eb24-1b5568ded03mr27620866c88.25.1796018327859; Sun, 29 Nov 2026 21:58:47 -0800 (PST) X-Received: by 2002:a05:7022:f516:b0:143:26cf:8615 with SMTP id a92af1059eb24-1b5568ded03mr27620852c88.25.1796018327149; Sun, 29 Nov 2026 21:58:47 -0800 (PST) Received: from H5-S1 ([192.19.203.250]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55684c85fsm111911159c88.14.2026.11.29.21.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 21:58:46 -0800 (PST) From: Vikas Gupta To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bhargava.marreddy@broadcom.com, rahul-rg.gupta@broadcom.com, vsrama-krishna.nemani@broadcom.com, rajashekar.hudumula@broadcom.com, dharmender.garg@broadcom.com, ajit.khaparde@broadcom.com, Vikas Gupta Subject: [PATCH net-next v11 10/10] bnge: add cpu_rmap support for IRQ affinity Date: Mon, 30 Nov 2026 11:27:36 +0530 Message-ID: <20261130055736.2306367-11-vikas.gupta@broadcom.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20261130055736.2306367-1-vikas.gupta@broadcom.com> References: <20261130055736.2306367-1-vikas.gupta@broadcom.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-DetectorID-Processed: b00c1d49-9d2e-4205-b15f-d015386d3d5e When CONFIG_RFS_ACCEL is enabled, allocate and populate a cpu_rmap for the RX IRQ vectors so that the kernel's aRFS infrastructure can correctly map flows to the RX queues serviced by the nearest CPU. This ensures that NTUPLE rules created by the kernel steer packets to the optimal queue based on CPU/IRQ affinity. Also, This is the patch that turns aRFS on. Before it dev->rx_cpu_rmap was never set, so set_rps_cpu() took its early exit and bnge_rx_flow_steer() from the previous patch was never called. A failed rmap allocation does not fail the open; aRFS stays off. If adding an IRQ to the rmap fails for one ring, aRFS is turned off for all rings, because a later ring would otherwise take the free slot and map to the wrong RX queue. NQ0 is requested at probe, before the rmap exists, and is not one of the open NQs that bnge_request_irq() loops over. Add its vector to the rmap first, so that the index of every vector in the rmap is its RX ring index. Otherwise each vector lands one slot too low, and aRFS steers a flow to the wrong RX queue. Signed-off-by: Vikas Gupta Reviewed-by: Dharmender Garg --- .../net/ethernet/broadcom/bnge/bnge_netdev.c | 186 +++++++++++++++++- .../net/ethernet/broadcom/bnge/bnge_netdev.h | 8 + .../net/ethernet/broadcom/bnge/bnge_resc.h | 8 + 3 files changed, 199 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c index de7320521a3e..d336c0f580b6 100644 --- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c +++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include "bnge.h" #include "bnge_hwrm.h" @@ -2539,10 +2541,28 @@ static int bnge_setup_interrupts(struct bnge_net *bn) { struct net_device *dev = bn->netdev; struct bnge_dev *bd = bn->bd; + int rc; bnge_setup_msix(bn); - return netif_set_real_num_queues(dev, bd->tx_nr_rings, bd->rx_nr_rings); + rc = netif_set_real_num_queues(dev, bd->tx_nr_rings, bd->rx_nr_rings); + if (rc) + return rc; + +#ifdef CONFIG_RFS_ACCEL + if (bn->priv_flags & BNGE_NET_EN_NTUPLE) { + struct cpu_rmap *rmap = alloc_irq_cpu_rmap(bd->rx_nr_rings); + + if (!rmap) + netdev_warn(dev, "Unable to allocate the CPU rmap, aRFS disabled\n"); + /* Publish under rmap_lock: the NQ0 notifier reads it. */ + mutex_lock(&bn->rmap_lock); + dev->rx_cpu_rmap = rmap; + mutex_unlock(&bn->rmap_lock); + } +#endif + + return rc; } static void bnge_hwrm_resource_free(struct bnge_net *bn, bool close_path) @@ -2552,14 +2572,140 @@ static void bnge_hwrm_resource_free(struct bnge_net *bn, bool close_path) bnge_hwrm_stat_ctx_free(bn); } +#ifdef CONFIG_RFS_ACCEL +/* The aRFS cpu_rmap is indexed by RX ring number. The affinity notifier updates + * the rmap entry of a ring whenever the affinity of its IRQ changes, and + * bnge_nq0_seed_cpu_rmap() writes the first entry of ring 0 at open. The + * notifier does not touch @cpu_mask, which only holds the affinity hint of the + * IRQ. bn->rmap_lock orders both writers against each other and against + * bnge_free_cpu_rmap() tearing the rmap down, which matters because NQ0's + * notifier is persistent (probe to remove) and can fire while the interface is + * down. + */ +static void bnge_irq_affinity_notify(struct irq_affinity_notify *notify, + const cpumask_t *mask) +{ + struct bnge_irq *irq = container_of(notify, struct bnge_irq, + affinity_notify); + struct bnge_net *bn = irq->bn; + struct cpu_rmap *rmap; + int rc; + + mutex_lock(&bn->rmap_lock); + rmap = bn->netdev->rx_cpu_rmap; + if (rmap && irq->ring_nr < bn->bd->rx_nr_rings) { + rc = cpu_rmap_update(rmap, irq->ring_nr, mask); + if (rc) + netdev_warn(bn->netdev, + "aRFS rmap update failed: %d\n", rc); + } + mutex_unlock(&bn->rmap_lock); +} + +static void bnge_irq_affinity_release(struct kref *ref) +{ + /* The bnge_irq and its notifier are owned by irq_tbl, nothing to do. */ +} + +static void bnge_register_irq_notifier(struct bnge_net *bn, + struct bnge_irq *irq) +{ + struct irq_affinity_notify *notify = &irq->affinity_notify; + int rc; + + irq->bn = bn; + notify->irq = irq->vector; + notify->notify = bnge_irq_affinity_notify; + notify->release = bnge_irq_affinity_release; + rc = irq_set_affinity_notifier(irq->vector, notify); + if (rc) + netdev_warn(bn->netdev, + "Set affinity notifier failed, IRQ = %d: %d\n", + irq->vector, rc); +} + +static void bnge_release_irq_notifier(struct bnge_irq *irq) +{ + /* Cancels any pending notify work, so it cannot touch the rmap after + * this returns. + */ + irq_set_affinity_notifier(irq->vector, NULL); +} + +/* set_rps_cpu() reads rx_cpu_rmap under rcu_read_lock(). Hide the pointer so + * that new readers do not see it, wait for the readers that already loaded it, + * and serialise against the affinity notifier via rmap_lock before the rmap is + * freed. set_rps_cpu() loads the pointer twice with plain loads, so a reader + * that is between the two loads is not covered; that has to be fixed in the + * core. + */ +static void bnge_free_cpu_rmap(struct bnge_net *bn) +{ + struct cpu_rmap *rmap; + + mutex_lock(&bn->rmap_lock); + rmap = bn->netdev->rx_cpu_rmap; + WRITE_ONCE(bn->netdev->rx_cpu_rmap, NULL); + mutex_unlock(&bn->rmap_lock); + + if (!rmap) + return; + + synchronize_net(); + free_irq_cpu_rmap(rmap); +} + +static void bnge_nq0_seed_cpu_rmap(struct bnge_net *bn) +{ + const struct cpumask *mask; + unsigned int vector; + u16 map_idx; + int rc; + + map_idx = bn->nq0->nq_ring.ring_struct.map_idx; + vector = bn->bd->irq_tbl[map_idx].vector; + mask = irq_get_affinity_mask(vector); + + mutex_lock(&bn->rmap_lock); + if (bn->netdev->rx_cpu_rmap && mask) { + rc = cpu_rmap_update(bn->netdev->rx_cpu_rmap, 0, mask); + if (rc) + netdev_warn(bn->netdev, + "aRFS rmap seed failed: %d\n", rc); + } + mutex_unlock(&bn->rmap_lock); +} +#else +static void bnge_register_irq_notifier(struct bnge_net *bn, + struct bnge_irq *irq) +{ +} + +static void bnge_release_irq_notifier(struct bnge_irq *irq) +{ +} + +static void bnge_free_cpu_rmap(struct bnge_net *bn) +{ +} + +static void bnge_nq0_seed_cpu_rmap(struct bnge_net *bn) +{ +} +#endif + static void bnge_nq_free_irq(struct bnge_net *bn, struct bnge_napi *bnapi) { int map_idx = bnapi->nq_ring.ring_struct.map_idx; struct bnge_irq *irq = &bn->bd->irq_tbl[map_idx]; if (irq->requested) { + /* Drop the affinity notifier before freeing the IRQ and the + * rmap. + */ + bnge_release_irq_notifier(irq); if (irq->have_cpumask) { - irq_set_affinity_hint(irq->vector, NULL); + irq_update_affinity_hint(irq->vector, NULL); free_cpumask_var(irq->cpu_mask); irq->have_cpumask = 0; } @@ -2583,6 +2729,16 @@ static int bnge_nq_request_irq(struct bnge_net *bn, struct bnge_napi *bnapi) return rc; irq->requested = 1; + irq->ring_nr = bnapi->index; + + /* The affinity notifier keeps the aRFS rmap entry of this ring + * current. It does not use cpu_mask, so install it independent of + * the allocation of the hint mask below. NQ0 is requested at probe, + * when it has no rx_ring yet, and its notifier must exist from then + * on. + */ + if (bnapi->rx_ring || bnapi == bn->nq0) + bnge_register_irq_notifier(bn, irq); if (zalloc_cpumask_var(&irq->cpu_mask, GFP_KERNEL)) { int numa_node = dev_to_node(&bd->pdev->dev); @@ -2590,9 +2746,12 @@ static int bnge_nq_request_irq(struct bnge_net *bn, struct bnge_napi *bnapi) irq->have_cpumask = 1; cpumask_set_cpu(cpumask_local_spread(bnapi->index, numa_node), irq->cpu_mask); - if (irq_set_affinity_hint(irq->vector, irq->cpu_mask)) + if (irq_set_affinity_and_hint(irq->vector, irq->cpu_mask)) bnge_warn(bd, "Set affinity failed, IRQ = %d\n", irq->vector); + } else { + bnge_warn(bd, "No affinity hint mask, IRQ = %d\n", + irq->vector); } return 0; } @@ -2602,8 +2761,14 @@ static void bnge_free_irq(struct bnge_net *bn) struct bnge_dev *bd = bn->bd; int i; + /* Release the open NQ notifiers (and their IRQs) before the rmap, so no + * notify work can reference it while it is freed. NQ0's notifier is + * persistent and is serialised against the free via rmap_lock instead. + */ bnge_for_each_open_nq(i, bd) bnge_nq_free_irq(bn, bn->bnapi[i]); + + bnge_free_cpu_rmap(bn); } static int bnge_request_irq(struct bnge_net *bn) @@ -2616,6 +2781,14 @@ static int bnge_request_irq(struct bnge_net *bn) netdev_err(bn->netdev, "bnge_setup_interrupts err: %d\n", rc); return rc; } + + /* NQ0 is persistent (requested at probe) and is not one of the open NQs + * below, so it is not re-requested here and its affinity is left + * untouched. Seed the freshly allocated rmap entry of RX ring 0 from + * the current affinity of NQ0. + */ + bnge_nq0_seed_cpu_rmap(bn); + bnge_for_each_open_nq(i, bd) { rc = bnge_nq_request_irq(bn, bn->bnapi[i]); if (rc) @@ -3749,6 +3922,11 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs) bn->netdev = netdev; bn->bd = bd; + /* Must be ready before bnge_nq0_init() requests NQ0's IRQ, whose + * affinity notifier takes this lock. + */ + mutex_init(&bn->rmap_lock); + netdev->min_mtu = ETH_ZLEN; netdev->max_mtu = bd->max_mtu; @@ -3885,6 +4063,7 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs) err_free_workq: destroy_workqueue(bn->bnge_pf_wq); err_netdev: + mutex_destroy(&bn->rmap_lock); free_netdev(netdev); bd->netdev = NULL; return rc; @@ -3913,6 +4092,7 @@ void bnge_netdev_free(struct bnge_dev *bd) bnge_free_port_stats(bn); + mutex_destroy(&bn->rmap_lock); free_netdev(netdev); bd->netdev = NULL; } diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h index 73879ba7f129..15d4d5695236 100644 --- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h +++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -395,6 +396,13 @@ struct bnge_net { * lock instead. */ spinlock_t ntp_fltr_lock; + + /* Serialises aRFS cpu_rmap updates (IRQ affinity notifier, NQ0 seed) + * against the creation and teardown of the rmap. Needed because NQ0's + * notifier is persistent (probe to remove) and can fire while the + * interface is down and the rmap is being freed. + */ + struct mutex rmap_lock; }; #define BNGE_DEFAULT_RX_RING_SIZE 511 diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_resc.h b/drivers/net/ethernet/broadcom/bnge/bnge_resc.h index 99354ebbe911..be9e753babc8 100644 --- a/drivers/net/ethernet/broadcom/bnge/bnge_resc.h +++ b/drivers/net/ethernet/broadcom/bnge/bnge_resc.h @@ -4,6 +4,7 @@ #ifndef _BNGE_RESC_H_ #define _BNGE_RESC_H_ +#include #include "bnge_netdev.h" #include "bnge_rmem.h" @@ -61,6 +62,13 @@ struct bnge_irq { u8 have_cpumask:1; char name[IFNAMSIZ + BNGE_IRQ_NAME_EXTRA]; cpumask_var_t cpu_mask; + /* aRFS IRQ affinity notifier state. @cpu_mask above only holds the + * affinity hint of the IRQ. @bn and @ring_nr are used by the notifier: + * @ring_nr is the RX ring (and rmap) index this vector serves. + */ + struct bnge_net *bn; + int ring_nr; + struct irq_affinity_notify affinity_notify; }; int bnge_reserve_rings(struct bnge_dev *bd); -- 2.52.0