aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2023-07-31 18:26:08 -0700
committerMartin KaFai Lau <[email protected]>2023-07-31 18:26:26 -0700
commit1110865273c1fe76853c5900b0a28214afc50b4c (patch)
tree146af8dabef741f9c6c8073dc79f672907ca8398
parent81584c23f249ac2d809e2f89b76a7a9a02c09d8a (diff)
parent1ea66e89f68cd463ae189fb5d491df52e330136a (diff)
Merge branch 'Remove unused fields in cpumap & devmap'
Hou Tao says: ==================== Patchset "Simplify xdp_do_redirect_map()/xdp_do_flush_map() and XDP maps" [0] changed per-map flush list to global per-cpu flush list for cpumap, devmap and xskmap, but it forgot to remove these unused fields from cpumap and devmap. So just remove these unused fields. Comments and suggestions are always welcome. [0]: https://lore.kernel.org/bpf/[email protected] ==================== Signed-off-by: Martin KaFai Lau <[email protected]>
-rw-r--r--kernel/bpf/cpumap.c3
-rw-r--r--kernel/bpf/devmap.c2
2 files changed, 0 insertions, 5 deletions
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
index 6ae02be7a48e..0a16e30b16ef 100644
--- a/kernel/bpf/cpumap.c
+++ b/kernel/bpf/cpumap.c
@@ -60,8 +60,6 @@ struct bpf_cpu_map_entry {
/* XDP can run multiple RX-ring queues, need __percpu enqueue store */
struct xdp_bulk_queue __percpu *bulkq;
- struct bpf_cpu_map *cmap;
-
/* Queue with potential multi-producers, and single-consumer kthread */
struct ptr_ring *queue;
struct task_struct *kthread;
@@ -588,7 +586,6 @@ static long cpu_map_update_elem(struct bpf_map *map, void *key, void *value,
rcpu = __cpu_map_entry_alloc(map, &cpumap_value, key_cpu);
if (!rcpu)
return -ENOMEM;
- rcpu->cmap = cmap;
}
rcu_read_lock();
__cpu_map_entry_replace(cmap, key_cpu, rcpu);
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 49cc0b5671c6..4d42f6ed6c11 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -65,7 +65,6 @@ struct xdp_dev_bulk_queue {
struct bpf_dtab_netdev {
struct net_device *dev; /* must be first member, due to tracepoint */
struct hlist_node index_hlist;
- struct bpf_dtab *dtab;
struct bpf_prog *xdp_prog;
struct rcu_head rcu;
unsigned int idx;
@@ -874,7 +873,6 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
}
dev->idx = idx;
- dev->dtab = dtab;
if (prog) {
dev->xdp_prog = prog;
dev->val.bpf_prog.id = prog->aux->id;