From: Varshini Elangovan <varshini.elangovan@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
kuba@kernel.org, hawk@kernel.org, john.fastabend@gmail.com,
andrii@kernel.org, kafai@fb.com, songliubraving@fb.com,
yhs@fb.com, kpsingh@kernel.org, netdev@vger.kernel.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Varshini Elangovan <varshini.elangovan@gmail.com>
Subject: [PATCH] staging: r8188eu: Add queue_index to xdp_rxq_info
Date: Thu, 2 Jun 2022 23:06:57 +0530 [thread overview]
Message-ID: <20220602173657.36252-1-varshini.elangovan@gmail.com> (raw)
Queue_index from the xdp_rxq_info is populated in cpumap file.
Using the NR_CPUS, results in patch check warning, as recommended,
using the num_possible_cpus() instead of NR_CPUS
Signed-off-by: Varshini Elangovan <varshini.elangovan@gmail.com>
---
kernel/bpf/cpumap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
index 650e5d21f90d..756fd81f474c 100644
--- a/kernel/bpf/cpumap.c
+++ b/kernel/bpf/cpumap.c
@@ -102,8 +102,8 @@ static struct bpf_map *cpu_map_alloc(union bpf_attr *attr)
bpf_map_init_from_attr(&cmap->map, attr);
- /* Pre-limit array size based on NR_CPUS, not final CPU check */
- if (cmap->map.max_entries > NR_CPUS) {
+ /* Pre-limit array size based on num_possible_cpus, not final CPU check */
+ if (cmap->map.max_entries > num_possible_cpus()) {
err = -E2BIG;
goto free_cmap;
}
@@ -227,7 +227,7 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu,
rxq.dev = xdpf->dev_rx;
rxq.mem = xdpf->mem;
- /* TODO: report queue_index to xdp_rxq_info */
+ rxq.queue_index = ++i;
xdp_convert_frame_to_buff(xdpf, &xdp);
--
2.25.1
next reply other threads:[~2022-06-02 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 17:36 Varshini Elangovan [this message]
2022-06-02 17:54 ` Jakub Kicinski
2022-06-02 20:43 ` Zvi Effron
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=20220602173657.36252-1-varshini.elangovan@gmail.com \
--to=varshini.elangovan@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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®