File: drop.h

package info (click to toggle)
linux 6.12.38-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,675,544 kB
  • sloc: ansic: 25,916,840; asm: 269,589; sh: 136,393; python: 65,219; makefile: 55,714; perl: 37,750; xml: 19,284; cpp: 5,894; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (41 lines) | stat: -rw-r--r-- 955 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
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * OpenvSwitch drop reason list.
 */

#ifndef OPENVSWITCH_DROP_H
#define OPENVSWITCH_DROP_H
#include <linux/skbuff.h>
#include <net/dropreason.h>

#define OVS_DROP_REASONS(R)			\
	R(OVS_DROP_LAST_ACTION)		        \
	R(OVS_DROP_ACTION_ERROR)		\
	R(OVS_DROP_EXPLICIT)			\
	R(OVS_DROP_EXPLICIT_WITH_ERROR)		\
	R(OVS_DROP_METER)			\
	R(OVS_DROP_RECURSION_LIMIT)		\
	R(OVS_DROP_DEFERRED_LIMIT)		\
	R(OVS_DROP_FRAG_L2_TOO_LONG)		\
	R(OVS_DROP_FRAG_INVALID_PROTO)		\
	R(OVS_DROP_CONNTRACK)			\
	R(OVS_DROP_IP_TTL)			\
	/* deliberate comment for trailing \ */

enum ovs_drop_reason {
	__OVS_DROP_REASON = SKB_DROP_REASON_SUBSYS_OPENVSWITCH <<
				SKB_DROP_REASON_SUBSYS_SHIFT,
#define ENUM(x) x,
	OVS_DROP_REASONS(ENUM)
#undef ENUM

	OVS_DROP_MAX,
};

static inline void
ovs_kfree_skb_reason(struct sk_buff *skb, enum ovs_drop_reason reason)
{
	kfree_skb_reason(skb, (u32)reason);
}

#endif /* OPENVSWITCH_DROP_H */