diff options
Diffstat (limited to 'net/core/netmem_priv.h')
-rw-r--r-- | net/core/netmem_priv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/netmem_priv.h b/net/core/netmem_priv.h index 7eadb8393e00..f33162fd281c 100644 --- a/net/core/netmem_priv.h +++ b/net/core/netmem_priv.h @@ -18,6 +18,11 @@ static inline void netmem_clear_pp_magic(netmem_ref netmem) __netmem_clear_lsb(netmem)->pp_magic = 0; } +static inline bool netmem_is_pp(netmem_ref netmem) +{ + return (netmem_get_pp_magic(netmem) & PP_MAGIC_MASK) == PP_SIGNATURE; +} + static inline void netmem_set_pp(netmem_ref netmem, struct page_pool *pool) { __netmem_clear_lsb(netmem)->pp = pool; |