[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQJhdxM6eqvxRZ7JjxEc+fDG5CwnV_FAGs+H+djNye0e=w@mail.gmail.com>
Date: Sat, 28 Jan 2023 13:34:52 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: bpf <bpf@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Marek Majtyka <alardam@...il.com>,
Saeed Mahameed <saeedm@...dia.com>, anthony.l.nguyen@...el.com,
Andy Gospodarek <gospo@...adcom.com>, vladimir.oltean@....com,
Felix Fietkau <nbd@....name>, john@...ozen.org,
Leon Romanovsky <leon@...nel.org>,
Simon Horman <simon.horman@...igine.com>,
Ariel Elior <aelior@...vell.com>,
christophe.jaillet@...adoo.fr, ecree.xilinx@...il.com,
"Michael S. Tsirkin" <mst@...hat.com>,
Björn Töpel <bjorn@...nel.org>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>,
"Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
Lorenzo Bianconi <lorenzo.bianconi@...hat.com>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Stanislav Fomichev <sdf@...gle.com>
Subject: Re: [PATCH v4 bpf-next 8/8] selftests/bpf: introduce XDP compliance
test tool
On Sat, Jan 28, 2023 at 6:07 AM Lorenzo Bianconi <lorenzo@...nel.org> wrote:
> diff --git a/tools/testing/selftests/bpf/xdp_features.h b/tools/testing/selftests/bpf/xdp_features.h
> new file mode 100644
> index 000000000000..28d7614c4f02
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/xdp_features.h
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +/* test commands */
> +enum test_commands {
> + CMD_STOP, /* CMD */
> + CMD_START, /* CMD + xdp feature */
> + CMD_ECHO, /* CMD */
> + CMD_ACK, /* CMD + data */
> + CMD_GET_XDP_CAP, /* CMD */
> + CMD_GET_STATS, /* CMD */
> +};
> +
> +#define DUT_CTRL_PORT 12345
> +#define DUT_ECHO_PORT 12346
> +
> +struct tlv_hdr {
> + __be16 type;
> + __be16 len;
> + __be32 data[];
> +};
> +
> +enum {
> + XDP_FEATURE_ABORTED,
> + XDP_FEATURE_DROP,
> + XDP_FEATURE_PASS,
> + XDP_FEATURE_TX,
> + XDP_FEATURE_REDIRECT,
> + XDP_FEATURE_NDO_XMIT,
> + XDP_FEATURE_XSK_ZEROCOPY,
> + XDP_FEATURE_HW_OFFLOAD,
> + XDP_FEATURE_RX_SG,
> + XDP_FEATURE_NDO_XMIT_SG,
> +};
This doesn't match the kernel.
How did you test this?
What should be the way to prevent such mistakes in the future?
Powered by blists - more mailing lists