Skip to content

Commit 1110865

Browse files
author
Martin KaFai Lau
committed
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]>
2 parents 81584c2 + 1ea66e8 commit 1110865

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

kernel/bpf/cpumap.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ struct bpf_cpu_map_entry {
6060
/* XDP can run multiple RX-ring queues, need __percpu enqueue store */
6161
struct xdp_bulk_queue __percpu *bulkq;
6262

63-
struct bpf_cpu_map *cmap;
64-
6563
/* Queue with potential multi-producers, and single-consumer kthread */
6664
struct ptr_ring *queue;
6765
struct task_struct *kthread;
@@ -588,7 +586,6 @@ static long cpu_map_update_elem(struct bpf_map *map, void *key, void *value,
588586
rcpu = __cpu_map_entry_alloc(map, &cpumap_value, key_cpu);
589587
if (!rcpu)
590588
return -ENOMEM;
591-
rcpu->cmap = cmap;
592589
}
593590
rcu_read_lock();
594591
__cpu_map_entry_replace(cmap, key_cpu, rcpu);

kernel/bpf/devmap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ struct xdp_dev_bulk_queue {
6565
struct bpf_dtab_netdev {
6666
struct net_device *dev; /* must be first member, due to tracepoint */
6767
struct hlist_node index_hlist;
68-
struct bpf_dtab *dtab;
6968
struct bpf_prog *xdp_prog;
7069
struct rcu_head rcu;
7170
unsigned int idx;
@@ -874,7 +873,6 @@ static struct bpf_dtab_netdev *__dev_map_alloc_node(struct net *net,
874873
}
875874

876875
dev->idx = idx;
877-
dev->dtab = dtab;
878876
if (prog) {
879877
dev->xdp_prog = prog;
880878
dev->val.bpf_prog.id = prog->aux->id;

0 commit comments

Comments
 (0)