Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Daniel Borkmann says:

====================
pull-request: bpf 2018-08-05

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) Fix bpftool percpu_array dump by using correct roundup to next
multiple of 8 for the value size, from Yonghong.

2) Fix in AF_XDP's __xsk_rcv_zc() to not returning frames back to
allocator since driver will recycle frame anyway in case of an
error, from Jakub.

3) Fix up BPF test_lwt_seg6local test cases to final iproute2
syntax, from Mathieu.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+13 -11
+1 -3
net/xdp/xsk.c
··· 84 84 { 85 85 int err = xskq_produce_batch_desc(xs->rx, (u64)xdp->handle, len); 86 86 87 - if (err) { 88 - xdp_return_buff(xdp); 87 + if (err) 89 88 xs->rx_dropped++; 90 - } 91 89 92 90 return err; 93 91 }
+9 -5
tools/bpf/bpftool/map.c
··· 36 36 #include <assert.h> 37 37 #include <errno.h> 38 38 #include <fcntl.h> 39 + #include <linux/kernel.h> 39 40 #include <stdbool.h> 40 41 #include <stdio.h> 41 42 #include <stdlib.h> ··· 91 90 static void *alloc_value(struct bpf_map_info *info) 92 91 { 93 92 if (map_is_per_cpu(info->type)) 94 - return malloc(info->value_size * get_possible_cpus()); 93 + return malloc(round_up(info->value_size, 8) * 94 + get_possible_cpus()); 95 95 else 96 96 return malloc(info->value_size); 97 97 } ··· 163 161 jsonw_name(json_wtr, "value"); 164 162 print_hex_data_json(value, info->value_size); 165 163 } else { 166 - unsigned int i, n; 164 + unsigned int i, n, step; 167 165 168 166 n = get_possible_cpus(); 167 + step = round_up(info->value_size, 8); 169 168 170 169 jsonw_name(json_wtr, "key"); 171 170 print_hex_data_json(key, info->key_size); ··· 179 176 jsonw_int_field(json_wtr, "cpu", i); 180 177 181 178 jsonw_name(json_wtr, "value"); 182 - print_hex_data_json(value + i * info->value_size, 179 + print_hex_data_json(value + i * step, 183 180 info->value_size); 184 181 185 182 jsonw_end_object(json_wtr); ··· 210 207 211 208 printf("\n"); 212 209 } else { 213 - unsigned int i, n; 210 + unsigned int i, n, step; 214 211 215 212 n = get_possible_cpus(); 213 + step = round_up(info->value_size, 8); 216 214 217 215 printf("key:\n"); 218 216 fprint_hex(stdout, key, info->key_size, " "); ··· 221 217 for (i = 0; i < n; i++) { 222 218 printf("value (CPU %02d):%c", 223 219 i, info->value_size > 16 ? '\n' : ' '); 224 - fprint_hex(stdout, value + i * info->value_size, 220 + fprint_hex(stdout, value + i * step, 225 221 info->value_size, " "); 226 222 printf("\n"); 227 223 }
+3 -3
tools/testing/selftests/bpf/test_lwt_seg6local.sh
··· 115 115 ip netns exec ns2 ip -6 route add fd00::1 dev veth3 via fb00::43 scope link 116 116 117 117 ip netns exec ns3 ip -6 route add fc42::1 dev veth5 via fb00::65 118 - ip netns exec ns3 ip -6 route add fd00::1 encap seg6local action End.BPF obj test_lwt_seg6local.o sec add_egr_x dev veth4 118 + ip netns exec ns3 ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec add_egr_x dev veth4 119 119 120 - ip netns exec ns4 ip -6 route add fd00::2 encap seg6local action End.BPF obj test_lwt_seg6local.o sec pop_egr dev veth6 120 + ip netns exec ns4 ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec pop_egr dev veth6 121 121 ip netns exec ns4 ip -6 addr add fc42::1 dev lo 122 122 ip netns exec ns4 ip -6 route add fd00::3 dev veth7 via fb00::87 123 123 124 124 ip netns exec ns5 ip -6 route add fd00::4 table 117 dev veth9 via fb00::109 125 - ip netns exec ns5 ip -6 route add fd00::3 encap seg6local action End.BPF obj test_lwt_seg6local.o sec inspect_t dev veth8 125 + ip netns exec ns5 ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec inspect_t dev veth8 126 126 127 127 ip netns exec ns6 ip -6 addr add fb00::6/16 dev lo 128 128 ip netns exec ns6 ip -6 addr add fd00::4/16 dev lo