File: xdp_metadata.h

package info (click to toggle)
linux 6.17.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,734,892 kB
  • sloc: ansic: 26,684,085; asm: 271,195; sh: 147,401; python: 75,980; makefile: 57,306; perl: 36,943; xml: 19,562; cpp: 5,899; yacc: 4,909; lex: 2,943; awk: 1,556; sed: 29; ruby: 25
file content (52 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* SPDX-License-Identifier: GPL-2.0 */
#pragma once

#ifndef ETH_P_IP
#define ETH_P_IP 0x0800
#endif

#ifndef ETH_P_IPV6
#define ETH_P_IPV6 0x86DD
#endif

#ifndef ETH_P_8021Q
#define ETH_P_8021Q 0x8100
#endif

#ifndef ETH_P_8021AD
#define ETH_P_8021AD 0x88A8
#endif

#ifndef BIT
#define BIT(nr)			(1 << (nr))
#endif

/* Non-existent checksum status */
#define XDP_CHECKSUM_MAGIC	BIT(2)

enum xdp_meta_field {
	XDP_META_FIELD_TS	= BIT(0),
	XDP_META_FIELD_RSS	= BIT(1),
	XDP_META_FIELD_VLAN_TAG	= BIT(2),
};

struct xdp_meta {
	union {
		__u64 rx_timestamp;
		__s32 rx_timestamp_err;
	};
	__u64 xdp_timestamp;
	__u32 rx_hash;
	union {
		__u32 rx_hash_type;
		__s32 rx_hash_err;
	};
	union {
		struct {
			__be16 rx_vlan_proto;
			__u16 rx_vlan_tci;
		};
		__s32 rx_vlan_tag_err;
	};
	enum xdp_meta_field hint_valid;
};