xskxceiver.h (50282fd57bcd3525c9d81eef58df8718e4337c6d) xskxceiver.h (df82d2e89c41d1dc6f02a881f0cddac8252bb441)
1/* SPDX-License-Identifier: GPL-2.0
2 * Copyright(c) 2020 Intel Corporation.
3 */
4
5#ifndef XSKXCEIVER_H_
6#define XSKXCEIVER_H_
7
8#include "xsk_xdp_progs.skel.h"

--- 21 unchanged lines hidden (view full) ---

30#define TEST_PASS 0
31#define TEST_FAILURE -1
32#define TEST_CONTINUE 1
33#define MAX_INTERFACES 2
34#define MAX_INTERFACE_NAME_CHARS 16
35#define MAX_SOCKETS 2
36#define MAX_TEST_NAME_SIZE 32
37#define MAX_TEARDOWN_ITER 10
1/* SPDX-License-Identifier: GPL-2.0
2 * Copyright(c) 2020 Intel Corporation.
3 */
4
5#ifndef XSKXCEIVER_H_
6#define XSKXCEIVER_H_
7
8#include "xsk_xdp_progs.skel.h"

--- 21 unchanged lines hidden (view full) ---

30#define TEST_PASS 0
31#define TEST_FAILURE -1
32#define TEST_CONTINUE 1
33#define MAX_INTERFACES 2
34#define MAX_INTERFACE_NAME_CHARS 16
35#define MAX_SOCKETS 2
36#define MAX_TEST_NAME_SIZE 32
37#define MAX_TEARDOWN_ITER 10
38#define PKT_HDR_SIZE (sizeof(struct ethhdr) + sizeof(struct iphdr) + \
39 sizeof(struct udphdr))
40#define MIN_ETH_PKT_SIZE 64
41#define ETH_FCS_SIZE 4
42#define MIN_PKT_SIZE (MIN_ETH_PKT_SIZE - ETH_FCS_SIZE)
43#define PKT_SIZE (MIN_PKT_SIZE)
44#define IP_PKT_SIZE (PKT_SIZE - sizeof(struct ethhdr))
45#define IP_PKT_VER 0x4
46#define IP_PKT_TOS 0x9
47#define UDP_PKT_SIZE (IP_PKT_SIZE - sizeof(struct iphdr))
48#define UDP_PKT_DATA_SIZE (UDP_PKT_SIZE - sizeof(struct udphdr))
38#define PKT_HDR_SIZE (sizeof(struct ethhdr) + 2) /* Just to align the data in the packet */
39#define MIN_PKT_SIZE 64
49#define USLEEP_MAX 10000
50#define SOCK_RECONF_CTR 10
51#define BATCH_SIZE 64
52#define POLL_TMOUT 1000
53#define THREAD_TMOUT 3
54#define DEFAULT_PKT_CNT (4 * 1024)
55#define DEFAULT_UMEM_BUFFERS (DEFAULT_PKT_CNT / 4)
56#define RX_FULL_RXQSIZE 32

--- 86 unchanged lines hidden (view full) ---

143 thread_func_t func_ptr;
144 validation_func_t validation_func;
145 struct pkt_stream *pkt_stream;
146 struct xsk_xdp_progs *xdp_progs;
147 struct bpf_map *xskmap;
148 struct bpf_program *xdp_prog;
149 enum test_mode mode;
150 int ifindex;
40#define USLEEP_MAX 10000
41#define SOCK_RECONF_CTR 10
42#define BATCH_SIZE 64
43#define POLL_TMOUT 1000
44#define THREAD_TMOUT 3
45#define DEFAULT_PKT_CNT (4 * 1024)
46#define DEFAULT_UMEM_BUFFERS (DEFAULT_PKT_CNT / 4)
47#define RX_FULL_RXQSIZE 32

--- 86 unchanged lines hidden (view full) ---

134 thread_func_t func_ptr;
135 validation_func_t validation_func;
136 struct pkt_stream *pkt_stream;
137 struct xsk_xdp_progs *xdp_progs;
138 struct bpf_map *xskmap;
139 struct bpf_program *xdp_prog;
140 enum test_mode mode;
141 int ifindex;
151 u32 dst_ip;
152 u32 src_ip;
153 u32 bind_flags;
142 u32 bind_flags;
154 u16 src_port;
155 u16 dst_port;
156 bool tx_on;
157 bool rx_on;
158 bool use_poll;
159 bool busy_poll;
160 bool use_fill_ring;
161 bool release_rx;
162 bool shared_umem;
163 bool use_metadata;

--- 28 unchanged lines hidden ---
143 bool tx_on;
144 bool rx_on;
145 bool use_poll;
146 bool busy_poll;
147 bool use_fill_ring;
148 bool release_rx;
149 bool shared_umem;
150 bool use_metadata;

--- 28 unchanged lines hidden ---