From: Geetha sowjanya <gakula@marvell.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <edumazet@google.com>,
"Geetha sowjanya" <gakula@marvell.com>,
Sunil Kovvuri Goutham <sgoutham@marvell.com>
Subject: [net-next PATCH] octeontx2-pf: Use only non-isolated cpus in irq affinity
Date: Mon, 25 Jul 2022 15:14:02 +0530 [thread overview]
Message-ID: <20220725094402.21203-1-gakula@marvell.com> (raw)
This patch excludes the isolates cpus from the cpus list
while setting up TX/RX queue interrupts affinity
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
.../ethernet/marvell/octeontx2/nic/otx2_common.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index fb8db5888d2f..9886a02dd756 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -8,6 +8,7 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <net/tso.h>
+#include <linux/sched/isolation.h>
#include "otx2_reg.h"
#include "otx2_common.h"
@@ -1657,9 +1658,16 @@ void otx2_set_cints_affinity(struct otx2_nic *pfvf)
{
struct otx2_hw *hw = &pfvf->hw;
int vec, cpu, irq, cint;
+ cpumask_var_t mask;
+
+ if (!alloc_cpumask_var(&mask, GFP_KERNEL))
+ return;
+
+ cpumask_and(mask, cpu_online_mask,
+ housekeeping_cpumask(HK_TYPE_DOMAIN));
+ cpu = cpumask_first(mask);
vec = hw->nix_msixoff + NIX_LF_CINT_VEC_START;
- cpu = cpumask_first(cpu_online_mask);
/* CQ interrupts */
for (cint = 0; cint < pfvf->hw.cint_cnt; cint++, vec++) {
@@ -1671,10 +1679,11 @@ void otx2_set_cints_affinity(struct otx2_nic *pfvf)
irq = pci_irq_vector(pfvf->pdev, vec);
irq_set_affinity_hint(irq, hw->affinity_mask[vec]);
- cpu = cpumask_next(cpu, cpu_online_mask);
+ cpu = cpumask_next(cpu, mask);
if (unlikely(cpu >= nr_cpu_ids))
cpu = 0;
}
+ free_cpumask_var(mask);
}
u16 otx2_get_max_mtu(struct otx2_nic *pfvf)
--
2.17.1
next reply other threads:[~2022-07-25 9:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 9:44 Geetha sowjanya [this message]
2022-07-27 3:08 ` Jakub Kicinski
2022-07-27 5:28 ` Tariq Toukan
[not found] ` <CA+sq2CdV=ujVuJswkq5TvK8mM7b6_vBXKR=oNBGQzSTH2cEiXA@mail.gmail.com>
2022-08-01 6:55 ` Tariq Toukan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220725094402.21203-1-gakula@marvell.com \
--to=gakula@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®