]> Git Repo - J-linux.git/blob - net/core/netmem_priv.h
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / net / core / netmem_priv.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef __NETMEM_PRIV_H
4 #define __NETMEM_PRIV_H
5
6 static inline unsigned long netmem_get_pp_magic(netmem_ref netmem)
7 {
8         return __netmem_clear_lsb(netmem)->pp_magic;
9 }
10
11 static inline void netmem_or_pp_magic(netmem_ref netmem, unsigned long pp_magic)
12 {
13         __netmem_clear_lsb(netmem)->pp_magic |= pp_magic;
14 }
15
16 static inline void netmem_clear_pp_magic(netmem_ref netmem)
17 {
18         __netmem_clear_lsb(netmem)->pp_magic = 0;
19 }
20
21 static inline void netmem_set_pp(netmem_ref netmem, struct page_pool *pool)
22 {
23         __netmem_clear_lsb(netmem)->pp = pool;
24 }
25
26 static inline void netmem_set_dma_addr(netmem_ref netmem,
27                                        unsigned long dma_addr)
28 {
29         __netmem_clear_lsb(netmem)->dma_addr = dma_addr;
30 }
31 #endif
This page took 0.028536 seconds and 4 git commands to generate.