From: Hangbin Liu <liuhangbin@gmail.com> To: bpf@vger.kernel.org Cc: netdev@vger.kernel.org, "Toke Høiland-Jørgensen" <toke@redhat.com>, "Jiri Benc" <jbenc@redhat.com>, "Jesper Dangaard Brouer" <brouer@redhat.com>, "Eelco Chaudron" <echaudro@redhat.com>, ast@kernel.org, "Daniel Borkmann" <daniel@iogearbox.net>, "Lorenzo Bianconi" <lorenzo.bianconi@redhat.com>, "David Ahern" <dsahern@gmail.com>, "Andrii Nakryiko" <andrii.nakryiko@gmail.com>, "Alexei Starovoitov" <alexei.starovoitov@gmail.com>, "John Fastabend" <john.fastabend@gmail.com>, "Maciej Fijalkowski" <maciej.fijalkowski@intel.com>, "Hangbin Liu" <liuhangbin@gmail.com> Subject: [PATCHv16 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Date: Fri, 22 Jan 2021 15:46:50 +0800 Message-ID: <20210122074652.2981711-5-liuhangbin@gmail.com> (raw) In-Reply-To: <20210122074652.2981711-1-liuhangbin@gmail.com> This is a sample for xdp multicast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> --- v15: use bpf_object__find_program_by_name() instead of bpf_object__find_program_by_title() v13-v14: no update, only rebase the code v12: add devmap xdp_prog on egress support v10-v11: no update v9: use NULL directly for arg2 and redefine the maps with btf format v5: add a null_map as we have strict the arg2 to ARG_CONST_MAP_PTR. Move the testing part to bpf selftest in next patch. v4: no update. v3: add rxcnt map to show the packet transmit speed. v2: no update. --- samples/bpf/Makefile | 3 + samples/bpf/xdp_redirect_map_multi_kern.c | 87 +++++++ samples/bpf/xdp_redirect_map_multi_user.c | 302 ++++++++++++++++++++++ 3 files changed, 392 insertions(+) create mode 100644 samples/bpf/xdp_redirect_map_multi_kern.c create mode 100644 samples/bpf/xdp_redirect_map_multi_user.c diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 26fc96ca619e..200029fcf53c 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -41,6 +41,7 @@ tprogs-y += test_map_in_map tprogs-y += per_socket_stats_example tprogs-y += xdp_redirect tprogs-y += xdp_redirect_map +tprogs-y += xdp_redirect_map_multi tprogs-y += xdp_redirect_cpu tprogs-y += xdp_monitor tprogs-y += xdp_rxq_info @@ -99,6 +100,7 @@ test_map_in_map-objs := test_map_in_map_user.o per_socket_stats_example-objs := cookie_uid_helper_example.o xdp_redirect-objs := xdp_redirect_user.o xdp_redirect_map-objs := xdp_redirect_map_user.o +xdp_redirect_map_multi-objs := xdp_redirect_map_multi_user.o xdp_redirect_cpu-objs := xdp_redirect_cpu_user.o xdp_monitor-objs := xdp_monitor_user.o xdp_rxq_info-objs := xdp_rxq_info_user.o @@ -160,6 +162,7 @@ always-y += tcp_tos_reflect_kern.o always-y += tcp_dumpstats_kern.o always-y += xdp_redirect_kern.o always-y += xdp_redirect_map_kern.o +always-y += xdp_redirect_map_multi_kern.o always-y += xdp_redirect_cpu_kern.o always-y += xdp_monitor_kern.o always-y += xdp_rxq_info_kern.o diff --git a/samples/bpf/xdp_redirect_map_multi_kern.c b/samples/bpf/xdp_redirect_map_multi_kern.c new file mode 100644 index 000000000000..e422340d1251 --- /dev/null +++ b/samples/bpf/xdp_redirect_map_multi_kern.c @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0 +#define KBUILD_MODNAME "foo" +#include <uapi/linux/bpf.h> +#include <linux/in.h> +#include <linux/if_ether.h> +#include <linux/ip.h> +#include <linux/ipv6.h> +#include <bpf/bpf_helpers.h> + +struct { + __uint(type, BPF_MAP_TYPE_DEVMAP_HASH); + __uint(key_size, sizeof(int)); + __uint(value_size, sizeof(int)); + __uint(max_entries, 32); +} forward_map_general SEC(".maps"); + +struct { + __uint(type, BPF_MAP_TYPE_DEVMAP_HASH); + __uint(key_size, sizeof(int)); + __uint(value_size, sizeof(struct bpf_devmap_val)); + __uint(max_entries, 32); +} forward_map_native SEC(".maps"); + +struct { + __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); + __type(key, u32); + __type(value, long); + __uint(max_entries, 1); +} rxcnt SEC(".maps"); + +/* map to store egress interfaces mac addresses, set the + * max_entries to 1 and extend it in user sapce prog. + */ +struct { + __uint(type, BPF_MAP_TYPE_ARRAY); + __type(key, u32); + __type(value, __be64); + __uint(max_entries, 1); +} mac_map SEC(".maps"); + +static int xdp_redirect_map(struct xdp_md *ctx, void *forward_map) +{ + long *value; + u32 key = 0; + + /* count packet in global counter */ + value = bpf_map_lookup_elem(&rxcnt, &key); + if (value) + *value += 1; + + return bpf_redirect_map_multi(forward_map, NULL, BPF_F_EXCLUDE_INGRESS); +} + +SEC("xdp_redirect_general") +int xdp_redirect_map_general(struct xdp_md *ctx) +{ + return xdp_redirect_map(ctx, &forward_map_general); +} + +SEC("xdp_redirect_native") +int xdp_redirect_map_native(struct xdp_md *ctx) +{ + return xdp_redirect_map(ctx, &forward_map_native); +} + +SEC("xdp_devmap/map_prog") +int xdp_devmap_prog(struct xdp_md *ctx) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data = (void *)(long)ctx->data; + u32 key = ctx->egress_ifindex; + struct ethhdr *eth = data; + __be64 *mac; + u64 nh_off; + + nh_off = sizeof(*eth); + if (data + nh_off > data_end) + return XDP_DROP; + + mac = bpf_map_lookup_elem(&mac_map, &key); + if (mac) + __builtin_memcpy(eth->h_source, mac, ETH_ALEN); + + return XDP_PASS; +} + +char _license[] SEC("license") = "GPL"; diff --git a/samples/bpf/xdp_redirect_map_multi_user.c b/samples/bpf/xdp_redirect_map_multi_user.c new file mode 100644 index 000000000000..84cdbbed20b7 --- /dev/null +++ b/samples/bpf/xdp_redirect_map_multi_user.c @@ -0,0 +1,302 @@ +// SPDX-License-Identifier: GPL-2.0 +#include <linux/bpf.h> +#include <linux/if_link.h> +#include <assert.h> +#include <errno.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <net/if.h> +#include <unistd.h> +#include <libgen.h> +#include <sys/resource.h> +#include <sys/ioctl.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> + +#include "bpf_util.h" +#include <bpf/bpf.h> +#include <bpf/libbpf.h> + +#define MAX_IFACE_NUM 32 + +static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; +static int ifaces[MAX_IFACE_NUM] = {}; +static int rxcnt_map_fd; + +static void int_exit(int sig) +{ + __u32 prog_id = 0; + int i; + + for (i = 0; ifaces[i] > 0; i++) { + if (bpf_get_link_xdp_id(ifaces[i], &prog_id, xdp_flags)) { + printf("bpf_get_link_xdp_id failed\n"); + exit(1); + } + if (prog_id) + bpf_set_link_xdp_fd(ifaces[i], -1, xdp_flags); + } + + exit(0); +} + +static void poll_stats(int interval) +{ + unsigned int nr_cpus = bpf_num_possible_cpus(); + __u64 values[nr_cpus], prev[nr_cpus]; + + memset(prev, 0, sizeof(prev)); + + while (1) { + __u64 sum = 0; + __u32 key = 0; + int i; + + sleep(interval); + assert(bpf_map_lookup_elem(rxcnt_map_fd, &key, values) == 0); + for (i = 0; i < nr_cpus; i++) + sum += (values[i] - prev[i]); + if (sum) + printf("Forwarding %10llu pkt/s\n", sum / interval); + memcpy(prev, values, sizeof(values)); + } +} + +static int get_mac_addr(unsigned int ifindex, void *mac_addr) +{ + char ifname[IF_NAMESIZE]; + struct ifreq ifr; + int fd, ret = -1; + + fd = socket(AF_INET, SOCK_DGRAM, 0); + if (fd < 0) + return ret; + + if (!if_indextoname(ifindex, ifname)) + goto err_out; + + strcpy(ifr.ifr_name, ifname); + + if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) + goto err_out; + + memcpy(mac_addr, ifr.ifr_hwaddr.sa_data, 6 * sizeof(char)); + ret = 0; + +err_out: + close(fd); + return ret; +} + +static int update_mac_map(struct bpf_object *obj) +{ + int i, ret = -1, mac_map_fd; + unsigned char mac_addr[6]; + unsigned int ifindex; + + mac_map_fd = bpf_object__find_map_fd_by_name(obj, "mac_map"); + if (mac_map_fd < 0) { + printf("find mac map fd failed\n"); + return ret; + } + + for (i = 0; ifaces[i] > 0; i++) { + ifindex = ifaces[i]; + + ret = get_mac_addr(ifindex, mac_addr); + if (ret < 0) { + printf("get interface %d mac failed\n", ifindex); + return ret; + } + + ret = bpf_map_update_elem(mac_map_fd, &ifindex, mac_addr, 0); + if (ret) { + perror("bpf_update_elem mac_map_fd"); + return ret; + } + } + + return 0; +} + +static void usage(const char *prog) +{ + fprintf(stderr, + "usage: %s [OPTS] <IFNAME|IFINDEX> <IFNAME|IFINDEX> ...\n" + "OPTS:\n" + " -S use skb-mode\n" + " -N enforce native mode\n" + " -F force loading prog\n" + " -X load xdp program on egress\n", + prog); +} + +int main(int argc, char **argv) +{ + int i, ret, opt, forward_map_fd, max_ifindex = 0; + struct bpf_program *ingress_prog, *egress_prog; + int ingress_prog_fd, egress_prog_fd = 0; + struct bpf_devmap_val devmap_val; + bool attach_egress_prog = false; + char ifname[IF_NAMESIZE]; + struct bpf_map *mac_map; + struct bpf_object *obj; + unsigned int ifindex; + char filename[256]; + + while ((opt = getopt(argc, argv, "SNFX")) != -1) { + switch (opt) { + case 'S': + xdp_flags |= XDP_FLAGS_SKB_MODE; + break; + case 'N': + /* default, set below */ + break; + case 'F': + xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; + break; + case 'X': + attach_egress_prog = true; + break; + default: + usage(basename(argv[0])); + return 1; + } + } + + if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) { + xdp_flags |= XDP_FLAGS_DRV_MODE; + } else if (attach_egress_prog) { + printf("Load xdp program on egress with SKB mode not supported yet\n"); + return 1; + } + + if (optind == argc) { + printf("usage: %s <IFNAME|IFINDEX> <IFNAME|IFINDEX> ...\n", argv[0]); + return 1; + } + + printf("Get interfaces"); + for (i = 0; i < MAX_IFACE_NUM && argv[optind + i]; i++) { + ifaces[i] = if_nametoindex(argv[optind + i]); + if (!ifaces[i]) + ifaces[i] = strtoul(argv[optind + i], NULL, 0); + if (!if_indextoname(ifaces[i], ifname)) { + perror("Invalid interface name or i"); + return 1; + } + + /* Find the largest index number */ + if (ifaces[i] > max_ifindex) + max_ifindex = ifaces[i]; + + printf(" %d", ifaces[i]); + } + printf("\n"); + + snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); + + obj = bpf_object__open(filename); + if (libbpf_get_error(obj)) { + printf("ERROR: opening BPF object file failed\n"); + obj = NULL; + goto err_out; + } + + /* Reset the map size to max ifindex + 1 */ + if (attach_egress_prog) { + mac_map = bpf_object__find_map_by_name(obj, "mac_map"); + ret = bpf_map__resize(mac_map, max_ifindex + 1); + if (ret < 0) { + printf("ERROR: reset mac map size failed\n"); + goto err_out; + } + } + + /* load BPF program */ + if (bpf_object__load(obj)) { + printf("ERROR: loading BPF object file failed\n"); + goto err_out; + } + + if (xdp_flags & XDP_FLAGS_SKB_MODE) { + ingress_prog = bpf_object__find_program_by_name(obj, "xdp_redirect_map_general"); + forward_map_fd = bpf_object__find_map_fd_by_name(obj, "forward_map_general"); + } else { + ingress_prog = bpf_object__find_program_by_name(obj, "xdp_redirect_map_native"); + forward_map_fd = bpf_object__find_map_fd_by_name(obj, "forward_map_native"); + } + if (!ingress_prog || forward_map_fd < 0) { + printf("finding ingress_prog/forward_map in obj file failed\n"); + goto err_out; + } + + ingress_prog_fd = bpf_program__fd(ingress_prog); + if (ingress_prog_fd < 0) { + printf("find ingress_prog fd failed\n"); + goto err_out; + } + + rxcnt_map_fd = bpf_object__find_map_fd_by_name(obj, "rxcnt"); + if (rxcnt_map_fd < 0) { + printf("bpf_object__find_map_fd_by_name failed\n"); + goto err_out; + } + + if (attach_egress_prog) { + /* Update mac_map with all egress interfaces' mac addr */ + if (update_mac_map(obj) < 0) { + printf("Error: update mac map failed"); + goto err_out; + } + + /* Find egress prog fd */ + egress_prog = bpf_object__find_program_by_name(obj, "xdp_devmap_prog"); + if (!egress_prog) { + printf("finding egress_prog in obj file failed\n"); + goto err_out; + } + egress_prog_fd = bpf_program__fd(egress_prog); + if (egress_prog_fd < 0) { + printf("find egress_prog fd failed\n"); + goto err_out; + } + } + + /* Remove attached program when program is interrupted or killed */ + signal(SIGINT, int_exit); + signal(SIGTERM, int_exit); + + /* Init forward multicast groups */ + for (i = 0; ifaces[i] > 0; i++) { + ifindex = ifaces[i]; + + /* bind prog_fd to each interface */ + ret = bpf_set_link_xdp_fd(ifindex, ingress_prog_fd, xdp_flags); + if (ret) { + printf("Set xdp fd failed on %d\n", ifindex); + goto err_out; + } + + /* Add all the interfaces to forward group and attach + * egress devmap programe if exist + */ + devmap_val.ifindex = ifindex; + devmap_val.bpf_prog.fd = egress_prog_fd; + ret = bpf_map_update_elem(forward_map_fd, &ifindex, &devmap_val, 0); + if (ret) { + perror("bpf_map_update_elem forward_map"); + goto err_out; + } + } + + poll_stats(2); + + return 0; + +err_out: + return 1; +} -- 2.26.2
next prev parent reply index Thread overview: 219+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-15 8:54 [RFC PATCH bpf-next 0/2] xdp: add dev map multicast support Hangbin Liu 2020-04-15 8:54 ` [RFC PATCH bpf-next 1/2] " Hangbin Liu 2020-04-20 9:52 ` Hangbin Liu 2020-04-15 8:54 ` [RFC PATCH bpf-next 2/2] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-04-24 8:56 ` [RFC PATCHv2 bpf-next 0/2] xdp: add dev map multicast support Hangbin Liu 2020-04-24 8:56 ` [RFC PATCHv2 bpf-next 1/2] xdp: add a new helper for " Hangbin Liu 2020-04-24 14:19 ` Lorenzo Bianconi 2020-04-28 11:09 ` Eelco Chaudron 2020-05-06 9:35 ` Hangbin Liu 2020-04-24 14:34 ` Toke Høiland-Jørgensen 2020-05-06 9:14 ` Hangbin Liu 2020-05-06 10:00 ` Toke Høiland-Jørgensen 2020-05-08 8:53 ` Hangbin Liu 2020-05-08 14:58 ` Toke Høiland-Jørgensen 2020-05-18 8:45 ` Hangbin Liu 2020-05-19 10:15 ` Jesper Dangaard Brouer 2020-05-20 1:24 ` Hangbin Liu 2020-04-24 8:56 ` [RFC PATCHv2 bpf-next 2/2] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-04-24 14:21 ` Lorenzo Bianconi 2020-05-23 6:05 ` [PATCHv3 bpf-next 0/2] xdp: add dev map multicast support Hangbin Liu 2020-05-23 6:05 ` [PATCHv3 bpf-next 1/2] xdp: add a new helper for " Hangbin Liu 2020-05-26 7:34 ` kbuild test robot 2020-05-23 6:05 ` [PATCHv3 bpf-next 2/2] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-05-26 14:05 ` [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support Hangbin Liu 2020-05-26 14:05 ` [PATCHv4 bpf-next 1/2] xdp: add a new helper for " Hangbin Liu 2020-05-27 10:29 ` Toke Høiland-Jørgensen 2020-06-10 10:18 ` Jesper Dangaard Brouer 2020-06-12 8:54 ` Hangbin Liu 2020-06-16 8:55 ` Jesper Dangaard Brouer 2020-06-16 10:11 ` Hangbin Liu 2020-06-16 14:38 ` Jesper Dangaard Brouer 2020-06-10 10:21 ` Jesper Dangaard Brouer 2020-06-10 10:29 ` Toke Høiland-Jørgensen 2020-06-16 9:04 ` Jesper Dangaard Brouer 2020-05-26 14:05 ` [PATCHv4 bpf-next 2/2] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-05-27 10:21 ` [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support Toke Høiland-Jørgensen 2020-05-27 10:32 ` Eelco Chaudron 2020-05-27 12:38 ` Hangbin Liu 2020-05-27 15:04 ` Toke Høiland-Jørgensen 2020-06-16 9:09 ` Jesper Dangaard Brouer 2020-06-16 9:47 ` Hangbin Liu 2020-06-03 2:40 ` Hangbin Liu 2020-06-03 11:05 ` Toke Høiland-Jørgensen 2020-06-04 4:09 ` Hangbin Liu 2020-06-04 9:44 ` Toke Høiland-Jørgensen 2020-06-04 12:12 ` Hangbin Liu 2020-06-04 12:37 ` Toke Høiland-Jørgensen 2020-06-04 14:41 ` Hangbin Liu 2020-06-04 16:02 ` Toke Høiland-Jørgensen 2020-06-05 6:26 ` Hangbin Liu 2020-06-08 15:32 ` Toke Høiland-Jørgensen 2020-06-09 3:03 ` Hangbin Liu 2020-06-09 20:31 ` Toke Høiland-Jørgensen 2020-06-10 2:35 ` Hangbin Liu 2020-06-10 10:03 ` Jesper Dangaard Brouer 2020-07-01 4:19 ` [PATCHv5 bpf-next 0/3] xdp: add a new helper for " Hangbin Liu 2020-07-01 4:19 ` [PATCHv5 bpf-next 1/3] " Hangbin Liu 2020-07-01 5:09 ` Andrii Nakryiko 2020-07-01 6:51 ` Hangbin Liu 2020-07-01 18:33 ` kernel test robot 2020-07-01 4:19 ` [PATCHv5 bpf-next 2/3] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-07-01 4:19 ` [PATCHv5 bpf-next 3/3] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-07-09 1:30 ` [PATCHv6 bpf-next 0/3] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-07-09 1:30 ` [PATCHv6 bpf-next 1/3] " Hangbin Liu 2020-07-09 16:33 ` David Ahern 2020-07-10 6:55 ` Hangbin Liu 2020-07-10 13:46 ` David Ahern 2020-07-11 0:26 ` Hangbin Liu 2020-07-11 16:09 ` David Ahern 2020-07-09 1:30 ` [PATCHv6 bpf-next 2/3] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-07-09 22:40 ` Daniel Borkmann 2020-07-10 6:41 ` Hangbin Liu 2020-07-10 14:32 ` Daniel Borkmann 2020-07-11 0:21 ` Hangbin Liu 2020-07-09 1:30 ` [PATCHv6 bpf-next 3/3] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-07-09 22:37 ` [PATCHv6 bpf-next 0/3] xdp: add a new helper for dev map multicast support Daniel Borkmann 2020-07-10 7:36 ` Hangbin Liu 2020-07-10 15:02 ` Daniel Borkmann 2020-07-10 16:52 ` David Ahern 2020-07-14 6:32 ` [PATCHv7 " Hangbin Liu 2020-07-14 6:32 ` [PATCHv7 bpf-next 1/3] " Hangbin Liu 2020-07-14 21:52 ` Toke Høiland-Jørgensen 2020-07-15 12:25 ` Hangbin Liu 2020-07-14 6:32 ` [PATCHv7 bpf-next 2/3] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-07-14 6:32 ` [PATCHv7 bpf-next 3/3] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-07-14 12:29 ` [PATCHv7 bpf-next 0/3] xdp: add a new helper for dev map multicast support Toke Høiland-Jørgensen 2020-07-14 17:12 ` David Ahern 2020-07-14 21:53 ` Toke Høiland-Jørgensen 2020-07-15 12:31 ` Hangbin Liu 2020-07-15 3:45 ` Hangbin Liu 2020-07-15 13:08 ` [PATCHv8 " Hangbin Liu 2020-07-15 13:08 ` [PATCHv8 bpf-next 1/3] " Hangbin Liu 2020-07-15 13:08 ` [PATCHv8 bpf-next 2/3] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-07-15 13:08 ` [PATCHv8 bpf-next 3/3] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-08-26 13:19 ` [PATCHv9 bpf-next 0/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-08-26 13:19 ` [PATCHv9 bpf-next 1/5] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-08-28 21:56 ` Daniel Borkmann 2020-09-03 9:15 ` Hangbin Liu 2020-08-26 13:19 ` [PATCHv9 bpf-next 2/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-08-28 22:05 ` Daniel Borkmann 2020-08-26 13:20 ` [PATCHv9 bpf-next 3/5] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-08-26 13:20 ` [PATCHv9 bpf-next 4/5] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-08-26 13:20 ` [PATCHv9 bpf-next 5/5] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-09-03 10:26 ` [PATCHv10 bpf-next 0/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-09-03 10:26 ` [PATCHv10 bpf-next 1/5] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-09-04 14:26 ` Daniel Borkmann 2020-09-03 10:26 ` [PATCHv10 bpf-next 2/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-09-04 14:22 ` Daniel Borkmann 2020-09-03 10:26 ` [PATCHv10 bpf-next 3/5] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-09-03 10:27 ` [PATCHv10 bpf-next 4/5] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-09-03 10:27 ` [PATCHv10 bpf-next 5/5] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-09-07 8:27 ` [PATCHv11 bpf-next 0/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-09-07 8:27 ` [PATCHv11 bpf-next 1/5] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-09-07 8:27 ` [PATCHv11 bpf-next 2/5] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-09-09 21:52 ` Alexei Starovoitov 2020-09-10 2:35 ` Hangbin Liu 2020-09-10 3:30 ` David Ahern 2020-09-10 5:35 ` Alexei Starovoitov 2020-09-10 9:44 ` Toke Høiland-Jørgensen 2020-09-10 15:39 ` Alexei Starovoitov 2020-09-10 17:50 ` Jesper Dangaard Brouer 2020-09-10 18:35 ` David Ahern 2020-09-11 7:58 ` Jesper Dangaard Brouer 2020-09-15 16:12 ` David Ahern 2020-09-07 8:27 ` [PATCHv11 bpf-next 3/5] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-09-07 8:27 ` [PATCHv11 bpf-next 4/5] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-09-07 8:27 ` [PATCHv11 bpf-next 5/5] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2020-12-17 16:07 ` David Ahern 2020-12-18 9:43 ` Hangbin Liu 2020-12-21 8:38 ` Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-12-16 14:30 ` [PATCHv12 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2020-12-21 12:34 ` [PATCHv13 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2020-12-21 12:35 ` [PATCHv13 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2021-01-14 14:23 ` [PATCHv14 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-14 14:23 ` [PATCHv14 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2021-01-17 22:57 ` John Fastabend 2021-01-18 10:07 ` Hangbin Liu 2021-01-21 14:33 ` Jesper Dangaard Brouer 2021-01-14 14:23 ` [PATCHv14 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-14 14:23 ` [PATCHv14 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-18 0:10 ` John Fastabend 2021-01-18 8:44 ` Hangbin Liu 2021-01-18 10:47 ` Toke Høiland-Jørgensen 2021-01-18 15:14 ` John Fastabend 2021-01-14 14:23 ` [PATCHv14 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2021-01-14 14:23 ` [PATCHv14 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-14 14:23 ` [PATCHv14 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2021-01-20 22:42 ` Maciej Fijalkowski 2021-01-21 3:54 ` Hangbin Liu 2021-01-21 13:35 ` Maciej Fijalkowski 2021-01-20 2:25 ` [PATCHv15 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-20 2:25 ` [PATCHv15 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2021-01-22 7:46 ` [PATCHv16 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-22 7:46 ` [PATCHv16 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2021-01-22 10:50 ` Maciej Fijalkowski 2021-01-22 13:38 ` Toke Høiland-Jørgensen 2021-01-25 3:30 ` Hangbin Liu 2021-01-25 11:21 ` Toke Høiland-Jørgensen 2021-01-25 12:29 ` Maciej Fijalkowski 2021-01-22 7:46 ` [PATCHv16 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-22 7:46 ` [PATCHv16 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-25 12:27 ` Maciej Fijalkowski 2021-01-26 1:17 ` Hangbin Liu 2021-01-27 22:13 ` John Fastabend 2021-01-22 7:46 ` Hangbin Liu [this message] 2021-01-22 7:46 ` [PATCHv16 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-22 7:46 ` [PATCHv16 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2021-01-22 13:43 ` [PATCHv16 bpf-next 0/6] xdp: add a new helper for dev map multicast support Toke Høiland-Jørgensen 2021-01-25 12:45 ` [PATCHv17 " Hangbin Liu 2021-01-25 12:45 ` [PATCHv17 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2021-01-27 7:37 ` John Fastabend 2021-01-27 9:41 ` Toke Høiland-Jørgensen 2021-01-27 12:20 ` Maciej Fijalkowski 2021-01-27 15:00 ` Jesper Dangaard Brouer 2021-01-27 15:52 ` John Fastabend 2021-01-27 16:05 ` Toke Høiland-Jørgensen 2021-01-27 15:58 ` Jesper Dangaard Brouer 2021-01-25 12:45 ` [PATCHv17 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-27 21:50 ` John Fastabend 2021-01-25 12:45 ` [PATCHv17 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-01-25 12:45 ` [PATCHv17 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2021-01-25 12:45 ` [PATCHv17 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-01-27 22:24 ` John Fastabend 2021-01-28 3:53 ` Hangbin Liu 2021-01-28 23:14 ` John Fastabend 2021-01-25 12:45 ` [PATCHv17 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu 2021-01-28 23:37 ` John Fastabend 2021-01-29 1:46 ` Hangbin Liu 2021-02-04 0:14 ` [PATCHv17 bpf-next 0/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-02-04 2:53 ` John Fastabend 2021-02-04 3:12 ` Hangbin Liu 2021-02-04 11:00 ` Toke Høiland-Jørgensen 2021-02-04 12:09 ` Maciej Fijalkowski 2021-02-04 13:33 ` Hangbin Liu 2021-02-04 17:03 ` Jakub Kicinski 2021-02-05 3:07 ` Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 " Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 3/6] xdp: add a new helper for dev map multicast support Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL Hangbin Liu 2021-02-04 14:03 ` [PATCHv18 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test Hangbin Liu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210122074652.2981711-5-liuhangbin@gmail.com \ --to=liuhangbin@gmail.com \ --cc=alexei.starovoitov@gmail.com \ --cc=andrii.nakryiko@gmail.com \ --cc=ast@kernel.org \ --cc=bpf@vger.kernel.org \ --cc=brouer@redhat.com \ --cc=daniel@iogearbox.net \ --cc=dsahern@gmail.com \ --cc=echaudro@redhat.com \ --cc=jbenc@redhat.com \ --cc=john.fastabend@gmail.com \ --cc=lorenzo.bianconi@redhat.com \ --cc=maciej.fijalkowski@intel.com \ --cc=netdev@vger.kernel.org \ --cc=toke@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
BPF Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \ bpf@vger.kernel.org public-inbox-index bpf Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.bpf AGPL code for this site: git clone https://public-inbox.org/public-inbox.git