Re: [PATCH v4 bpf-next 8/8] selftests/bpf: introduce XDP compliance test tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 28, 2023 at 6:07 AM Lorenzo Bianconi <lorenzo@xxxxxxxxxx> 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?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux