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