1*7f678defSVasily Averin /* SPDX-License-Identifier: GPL-2.0-or-later */ 2*7f678defSVasily Averin #ifndef _NET_CORE_SOCK_DESTRUCTOR_H 3*7f678defSVasily Averin #define _NET_CORE_SOCK_DESTRUCTOR_H 4*7f678defSVasily Averin #include <net/tcp.h> 5*7f678defSVasily Averin is_skb_wmem(const struct sk_buff * skb)6*7f678defSVasily Averinstatic inline bool is_skb_wmem(const struct sk_buff *skb) 7*7f678defSVasily Averin { 8*7f678defSVasily Averin return skb->destructor == sock_wfree || 9*7f678defSVasily Averin skb->destructor == __sock_wfree || 10*7f678defSVasily Averin (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree); 11*7f678defSVasily Averin } 12*7f678defSVasily Averin #endif 13