4dba3e7852
Introduce xdp_features tool in order to test XDP features supported by the NIC and match them against advertised ones. In order to test supported/advertised XDP features, xdp_features must run on the Device Under Test (DUT) and on a Tester device. xdp_features opens a control TCP channel between DUT and Tester devices to send control commands from Tester to the DUT and a UDP data channel where the Tester sends UDP 'echo' packets and the DUT is expected to reply back with the same packet. DUT installs multiple XDP programs on the NIC to test XDP capabilities and reports back to the Tester some XDP stats. Currently xdp_features supports the following XDP features: - XDP_DROP - XDP_ABORTED - XDP_PASS - XDP_TX - XDP_REDIRECT - XDP_NDO_XMIT Co-developed-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/7c1af8e7e6ef0614cf32fa9e6bdaa2d8d605f859.1675245258.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
21 lines
353 B
C
21 lines
353 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* test commands */
|
|
enum test_commands {
|
|
CMD_STOP, /* CMD */
|
|
CMD_START, /* CMD */
|
|
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;
|
|
__u8 data[];
|
|
};
|