History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Daniel Borkmann says: ==================== The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add the ability to use unaligned chunks in the AF_XDP umem. By relaxing where the chunks can be placed, it allows to use an arbitrary buffer size and place whenever there is a free address in the umem. Helps more seamless DPDK AF_XDP driver integration. Support for i40e, ixgbe and mlx5e, from Kevin and Maxim. 2) Addition of a wakeup flag for AF_XDP tx and fill rings so the application can wake up the kernel for rx/tx processing which avoids busy-spinning of the latter, useful when app and driver is located on the same core. Support for i40e, ixgbe and mlx5e, from Magnus and Maxim. 3) bpftool fixes for printf()-like functions so compiler can actually enforce checks, bpftool build system improvements for custom output directories, and addition of 'bpftool map freeze' command, from Quentin. 4) Support attaching/detaching XDP programs from 'bpftool net' command, from Daniel. 5) Automatic xskmap cleanup when AF_XDP socket is released, and several barrier/{read,write}_once fixes in AF_XDP code, from Björn. 6) Relicense of bpf_helpers.h/bpf_endian.h for future libbpf inclusion as well as libbpf versioning improvements, from Andrii. 7) Several new BPF kselftests for verifier precision tracking, from Alexei. 8) Several BPF kselftest fixes wrt endianess to run on s390x, from Ilya. 9) And more BPF kselftest improvements all over the place, from Stanislav. 10) Add simple BPF map op cache for nfp driver to batch dumps, from Jakub. 11) AF_XDP socket umem mapping improvements for 32bit archs, from Ivan. 12) Add BPF-to-BPF call and BTF line info support for s390x JIT, from Yauheni. 13) Small optimization in arm64 JIT to spare 1 insns for BPF_MOD, from Jerin. 14) Fix an error check in bpf_tcp_gen_syncookie() helper, from Petar. 15) Various minor fixes and cleanups, from Nathan, Masahiro, Masanari, Peter, Wei, Yue. ====================

David S. Miller committed 7 years ago

Commit 1e46c092 parents f9bcfe2 593f191124 files · +3489 −698Browse files

Showing the changes to include/linux (4 of 124 files). Show all

Unified · Split

4 files
  1. include/linux/bpf.h +5 −0
  2. include/linux/bpf_verifier.h +1 −0
  3. include/linux/netdevice.h +12 −2
  4. include/linux/tnum.h +6 −0
include/linux/bpf.h+5−0
@@ -24,6 +24,9 @@ struct seq_file; · 23 unmodified lines
24struct btf;24struct btf;
25struct btf_type;25struct btf_type;
26 26
27extern struct idr btf_idr;
28extern spinlock_t btf_idr_lock;
29
27/* map is generic key/value storage optionally accesible by eBPF programs */30/* map is generic key/value storage optionally accesible by eBPF programs */
28struct bpf_map_ops {31struct bpf_map_ops {
29 /* funcs callable from userspace (via syscall) */32 /* funcs callable from userspace (via syscall) */
@@ -647,6 +650,8 @@ void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock); · 617 unmodified lines
647struct bpf_map *bpf_map_get_with_uref(u32 ufd);650struct bpf_map *bpf_map_get_with_uref(u32 ufd);
648struct bpf_map *__bpf_map_get(struct fd f);651struct bpf_map *__bpf_map_get(struct fd f);
649struct bpf_map * __must_check bpf_map_inc(struct bpf_map *map, bool uref);652struct bpf_map * __must_check bpf_map_inc(struct bpf_map *map, bool uref);
653struct bpf_map * __must_check bpf_map_inc_not_zero(struct bpf_map *map,
654 bool uref);
650void bpf_map_put_with_uref(struct bpf_map *map);655void bpf_map_put_with_uref(struct bpf_map *map);
651void bpf_map_put(struct bpf_map *map);656void bpf_map_put(struct bpf_map *map);
652int bpf_map_charge_memlock(struct bpf_map *map, u32 pages);657int bpf_map_charge_memlock(struct bpf_map *map, u32 pages);
include/linux/bpf_verifier.h+1−0
@@ -355,6 +355,7 @@ struct bpf_verifier_env { · 354 unmodified lines
355 struct bpf_verifier_stack_elem *head; /* stack of verifier states to be processed */355 struct bpf_verifier_stack_elem *head; /* stack of verifier states to be processed */
356 int stack_size; /* number of states to be processed */356 int stack_size; /* number of states to be processed */
357 bool strict_alignment; /* perform strict pointer alignment checks */357 bool strict_alignment; /* perform strict pointer alignment checks */
358 bool test_state_freq; /* test verifier with different pruning frequency */
358 struct bpf_verifier_state *cur_state; /* current verifier state */359 struct bpf_verifier_state *cur_state; /* current verifier state */
359 struct bpf_verifier_state_list **explored_states; /* search pruning optimization */360 struct bpf_verifier_state_list **explored_states; /* search pruning optimization */
360 struct bpf_verifier_state_list *free_list;361 struct bpf_verifier_state_list *free_list;
include/linux/netdevice.h+12−2
@@ -901,6 +901,10 @@ struct netdev_bpf { · 900 unmodified lines
901 };901 };
902};902};
903 903
904/* Flags for ndo_xsk_wakeup. */
905#define XDP_WAKEUP_RX (1 << 0)
906#define XDP_WAKEUP_TX (1 << 1)
907
904#ifdef CONFIG_XFRM_OFFLOAD908#ifdef CONFIG_XFRM_OFFLOAD
905struct xfrmdev_ops {909struct xfrmdev_ops {
906 int (*xdo_dev_state_add) (struct xfrm_state *x);910 int (*xdo_dev_state_add) (struct xfrm_state *x);
@@ -1227,6 +1231,12 @@ struct tlsdev_ops; · 320 unmodified lines
1227 * that got dropped are freed/returned via xdp_return_frame().1231 * that got dropped are freed/returned via xdp_return_frame().
1228 * Returns negative number, means general error invoking ndo, meaning1232 * Returns negative number, means general error invoking ndo, meaning
1229 * no frames were xmit'ed and core-caller will free all frames.1233 * no frames were xmit'ed and core-caller will free all frames.
1234 * int (*ndo_xsk_wakeup)(struct net_device *dev, u32 queue_id, u32 flags);
1235 * This function is used to wake up the softirq, ksoftirqd or kthread
1236 * responsible for sending and/or receiving packets on a specific
1237 * queue id bound to an AF_XDP socket. The flags field specifies if
1238 * only RX, only Tx, or both should be woken up using the flags
1239 * XDP_WAKEUP_RX and XDP_WAKEUP_TX.
1230 * struct devlink_port *(*ndo_get_devlink_port)(struct net_device *dev);1240 * struct devlink_port *(*ndo_get_devlink_port)(struct net_device *dev);
1231 * Get devlink port instance associated with a given netdev.1241 * Get devlink port instance associated with a given netdev.
1232 * Called with a reference on the netdevice and devlink locks only,1242 * Called with a reference on the netdevice and devlink locks only,
@@ -1426,8 +1436,8 @@ struct net_device_ops { · 193 unmodified lines
1426 int (*ndo_xdp_xmit)(struct net_device *dev, int n,1436 int (*ndo_xdp_xmit)(struct net_device *dev, int n,
1427 struct xdp_frame **xdp,1437 struct xdp_frame **xdp,
1428 u32 flags);1438 u32 flags);
1429 int (*ndo_xsk_async_xmit)(struct net_device *dev,1439 int (*ndo_xsk_wakeup)(struct net_device *dev,
1430 u32 queue_id);1440 u32 queue_id, u32 flags);
1431 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);1441 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);
1432};1442};
1433 1443
include/linux/tnum.h+6−0
@@ -5,6 +5,10 @@ · 4 unmodified lines
5 * propagate the unknown bits such that the tnum result represents all the5 * propagate the unknown bits such that the tnum result represents all the
6 * possible results for possible values of the operands.6 * possible results for possible values of the operands.
7 */7 */
8
9#ifndef _LINUX_TNUM_H
10#define _LINUX_TNUM_H
11
8#include <linux/types.h>12#include <linux/types.h>
9 13
10struct tnum {14struct tnum {
@@ -81,3 +85,5 @@ bool tnum_in(struct tnum a, struct tnum b); · 70 unmodified lines
81int tnum_strn(char *str, size_t size, struct tnum a);85int tnum_strn(char *str, size_t size, struct tnum a);
82/* Format a tnum as tristate binary expansion */86/* Format a tnum as tristate binary expansion */
83int tnum_sbin(char *str, size_t size, struct tnum a);87int tnum_sbin(char *str, size_t size, struct tnum a);
88
89#endif /* _LINUX_TNUM_H */

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