[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210408205709.w6sy5rklphoyl5on@skbuf>
Date: Thu, 8 Apr 2021 23:57:09 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
lorenzo.bianconi@...hat.com, davem@...emloft.net, kuba@...nel.org,
ast@...nel.org, daniel@...earbox.net, shayagr@...zon.com,
sameehj@...zon.com, john.fastabend@...il.com, dsahern@...nel.org,
brouer@...hat.com, echaudro@...hat.com, jasowang@...hat.com,
alexander.duyck@...il.com, saeed@...nel.org,
maciej.fijalkowski@...el.com
Subject: Re: [PATCH v8 bpf-next 09/14] bpd: add multi-buffer support to xdp
copy helpers
On Thu, Apr 08, 2021 at 02:51:01PM +0200, Lorenzo Bianconi wrote:
> From: Eelco Chaudron <echaudro@...hat.com>
>
> This patch adds support for multi-buffer for the following helpers:
> - bpf_xdp_output()
> - bpf_perf_event_output()
>
> Signed-off-by: Eelco Chaudron <echaudro@...hat.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> diff --git a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> index a038e827f850..d5a5f603d252 100644
> --- a/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> +++ b/tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
> @@ -27,6 +27,7 @@ struct xdp_buff {
> void *data_hard_start;
> unsigned long handle;
> struct xdp_rxq_info *rxq;
> + __u32 frame_length;
This patch will not work without patch 10, so could you change the order?
> } __attribute__((preserve_access_index));
>
> struct meta {
> @@ -49,7 +50,7 @@ int BPF_PROG(trace_on_entry, struct xdp_buff *xdp)
> void *data = (void *)(long)xdp->data;
>
> meta.ifindex = xdp->rxq->dev->ifindex;
> - meta.pkt_len = data_end - data;
> + meta.pkt_len = xdp->frame_length;
> bpf_xdp_output(xdp, &perf_buf_map,
> ((__u64) meta.pkt_len << 32) |
> BPF_F_CURRENT_CPU,
> --
> 2.30.2
>
Powered by blists - more mailing lists