skb: make drop reason booleanable
We have a number of cases where function returns drop/no drop decision as a boolean. Now that we want to report the reason code as well we have to pass extra output arguments. We can make the reason code evaluate correctly as bool. I believe we're good to reorder the reasons as they are reported to user space as strings. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1163319993
commit
1330b6ef33
@@ -314,6 +314,7 @@ struct sk_buff;
|
||||
* used to translate the reason to string.
|
||||
*/
|
||||
enum skb_drop_reason {
|
||||
SKB_NOT_DROPPED_YET = 0,
|
||||
SKB_DROP_REASON_NOT_SPECIFIED, /* drop reason is not specified */
|
||||
SKB_DROP_REASON_NO_SOCKET, /* socket not found */
|
||||
SKB_DROP_REASON_PKT_TOO_SMALL, /* packet size is too small */
|
||||
|
||||
Reference in New Issue
Block a user