History

net: bpf: Add netlink and ipv6_route bpf_iter targets

This patch added netlink and ipv6_route targets, using the same seq_ops (except show() and minor changes for stop()) for /proc/net/{netlink,ipv6_route}. The net namespace for these targets are the current net namespace at file open stage, similar to /proc/net/{netlink,ipv6_route} reference counting the net namespace at seq_file open stage. Since module is not supported for now, ipv6_route is supported only if the IPV6 is built-in, i.e., not compiled as a module. The restriction can be lifted once module is properly supported for bpf_iter.

Yonghong Song committed 6 years ago

Commit 138d0be1 parent 6086d295 files · +207 −4Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/proc_fs.h+3−0
@@ -105,6 +105,9 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo · 104 unmodified lines
105 void *data);105 void *data);
106extern struct pid *tgid_pidfd_to_pid(const struct file *file);106extern struct pid *tgid_pidfd_to_pid(const struct file *file);
107 107
108extern int bpf_iter_init_seq_net(void *priv_data);
109extern void bpf_iter_fini_seq_net(void *priv_data);
110
108#ifdef CONFIG_PROC_PID_ARCH_STATUS111#ifdef CONFIG_PROC_PID_ARCH_STATUS
109/*112/*
110 * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must113 * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t