1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * OpenvSwitch drop reason list. 4 */ 5 6 #ifndef OPENVSWITCH_DROP_H 7 #define OPENVSWITCH_DROP_H 8 #include <linux/skbuff.h> 9 #include <net/dropreason.h> 10 11 #define OVS_DROP_REASONS(R) \ 12 R(OVS_DROP_LAST_ACTION) \ 13 R(OVS_DROP_ACTION_ERROR) \ 14 R(OVS_DROP_EXPLICIT) \ 15 R(OVS_DROP_EXPLICIT_WITH_ERROR) \ 16 R(OVS_DROP_METER) \ 17 R(OVS_DROP_RECURSION_LIMIT) \ 18 R(OVS_DROP_DEFERRED_LIMIT) \ 19 R(OVS_DROP_FRAG_L2_TOO_LONG) \ 20 R(OVS_DROP_FRAG_INVALID_PROTO) \ 21 R(OVS_DROP_CONNTRACK) \ 22 R(OVS_DROP_IP_TTL) \ 23 /* deliberate comment for trailing \ */ 24 25 enum ovs_drop_reason { 26 __OVS_DROP_REASON = SKB_DROP_REASON_SUBSYS_OPENVSWITCH << 27 SKB_DROP_REASON_SUBSYS_SHIFT, 28 #define ENUM(x) x, 29 OVS_DROP_REASONS(ENUM) 30 #undef ENUM 31 32 OVS_DROP_MAX, 33 }; 34 35 static inline void ovs_kfree_skb_reason(struct sk_buff * skb,enum ovs_drop_reason reason)36ovs_kfree_skb_reason(struct sk_buff *skb, enum ovs_drop_reason reason) 37 { 38 kfree_skb_reason(skb, (u32)reason); 39 } 40 41 #endif /* OPENVSWITCH_DROP_H */ 42