Hi all,
Today's linux-next merge of the tip tree got a conflict in
include/uapi/linux/bpf.h between commit 96be4325f443 ("ebpf: add
sched_cls_type and map it to sk_filter's verifier ops"), 03e69b508b6f
("ebpf: add prandom helper for packet sampling"), c04167ce2ca0 ("ebpf:
add helper for obtaining current processor id"), 94caee8c312d ("ebpf:
add sched_act_type and map it to sk_filter's verifier ops"),
608cd71a9c7c ("tc: bpf: generalize pedit action") and 91bc4822c3d6
("tc: bpf: add checksum helpers") from the net-next tree and commit
2541517c32be ("tracing, perf: Implement BPF programs attached to
kprobes"), d9847d310ab4 ("tracing: Allow BPF programs to call
bpf_ktime_get_ns()") and 9c959c863f82 ("tracing: Allow BPF programs to
call bpf_trace_printk()") from the tip tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell [email protected]
diff --cc include/uapi/linux/bpf.h
index 23df3e7f8e7d,cc47ef41076a..000000000000
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@@ -118,12 -118,9 +118,13 @@@ enum bpf_map_type
enum bpf_prog_type {
BPF_PROG_TYPE_UNSPEC,
BPF_PROG_TYPE_SOCKET_FILTER,
+ BPF_PROG_TYPE_SCHED_CLS,
+ BPF_PROG_TYPE_SCHED_ACT,
+ BPF_PROG_TYPE_KPROBE,
};
+#define BPF_PSEUDO_MAP_FD 1
+
/* flags for BPF_MAP_UPDATE_ELEM command */
#define BPF_ANY 0 /* create new element or update existing */
#define BPF_NOEXIST 1 /* create new element if it didn't exist */
@@@ -166,45 -164,9 +168,48 @@@ enum bpf_func_id
BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
+ BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
+ BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
+
+ /**
+ * skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
+ * @skb: pointer to skb
+ * @offset: offset within packet from skb->data
+ * @from: pointer where to copy bytes from
+ * @len: number of bytes to store into packet
+ * @flags: bit 0 - if true, recompute skb->csum
+ * other bits - reserved
+ * Return: 0 on success
+ */
+ BPF_FUNC_skb_store_bytes,
+
+ /**
+ * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
+ * @skb: pointer to skb
+ * @offset: offset within packet where IP checksum is located
+ * @from: old value of header field
+ * @to: new value of header field
+ * @flags: bits 0-3 - size of header field
+ * other bits - reserved
+ * Return: 0 on success
+ */
+ BPF_FUNC_l3_csum_replace,
+
+ /**
+ * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
+ * @skb: pointer to skb
+ * @offset: offset within packet where TCP/UDP checksum is located
+ * @from: old value of header field
+ * @to: new value of header field
+ * @flags: bits 0-3 - size of header field
+ * bit 4 - is pseudo header
+ * other bits - reserved
+ * Return: 0 on success
+ */
+ BPF_FUNC_l4_csum_replace,
+ BPF_FUNC_probe_read, /* int bpf_probe_read(void *dst, int size, void *src) */
+ BPF_FUNC_ktime_get_ns, /* u64 bpf_ktime_get_ns(void) */
+ BPF_FUNC_trace_printk, /* int bpf_trace_printk(const char *fmt, int fmt_size, ...) */
__BPF_FUNC_MAX_ID,
};
On 04/07/2015 09:11 AM, Stephen Rothwell wrote:
...
> Today's linux-next merge of the tip tree got a conflict in
> include/uapi/linux/bpf.h between commit 96be4325f443 ("ebpf: add
> sched_cls_type and map it to sk_filter's verifier ops"), 03e69b508b6f
> ("ebpf: add prandom helper for packet sampling"), c04167ce2ca0 ("ebpf:
> add helper for obtaining current processor id"), 94caee8c312d ("ebpf:
> add sched_act_type and map it to sk_filter's verifier ops"),
> 608cd71a9c7c ("tc: bpf: generalize pedit action") and 91bc4822c3d6
> ("tc: bpf: add checksum helpers") from the net-next tree and commit
> 2541517c32be ("tracing, perf: Implement BPF programs attached to
> kprobes"), d9847d310ab4 ("tracing: Allow BPF programs to call
> bpf_ktime_get_ns()") and 9c959c863f82 ("tracing: Allow BPF programs to
> call bpf_trace_printk()") from the tip tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
Looks good to me, thanks!
On 4/7/15 12:11 AM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the tip tree got a conflict in
> include/uapi/linux/bpf.h between commit 96be4325f443 ("ebpf: add
> sched_cls_type and map it to sk_filter's verifier ops"), 03e69b508b6f
> ("ebpf: add prandom helper for packet sampling"), c04167ce2ca0 ("ebpf:
> add helper for obtaining current processor id"), 94caee8c312d ("ebpf:
> add sched_act_type and map it to sk_filter's verifier ops"),
> 608cd71a9c7c ("tc: bpf: generalize pedit action") and 91bc4822c3d6
> ("tc: bpf: add checksum helpers") from the net-next tree and commit
> 2541517c32be ("tracing, perf: Implement BPF programs attached to
> kprobes"), d9847d310ab4 ("tracing: Allow BPF programs to call
> bpf_ktime_get_ns()") and 9c959c863f82 ("tracing: Allow BPF programs to
> call bpf_trace_printk()") from the tip tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
>
Looks good. Thanks!