xref: /freebsd/sys/compat/linuxkpi/common/include/net/page_pool/helpers.h (revision df21a004be237a1dccd03c7b47254625eea62fa9)
1 /*-
2  * Copyright (c) 2023-2025 Bjoern A. Zeeb
3  *
4  * SPDX-License-Identifier: BSD-2-Clause
5  */
6 
7 #ifndef	_LINUXKPI_NET_PAGE_POOL_HELPERS_H
8 #define	_LINUXKPI_NET_PAGE_POOL_HELPERS_H
9 
10 #include <linux/kernel.h>	/* pr_debug */
11 #include <linux/types.h>
12 #include <linux/dma-mapping.h>
13 #include <net/page_pool/types.h>
14 
15 static inline struct page_pool *
16 page_pool_create(const struct page_pool_params *ppparams)
17 {
18 
19 	pr_debug("%s: TODO\n", __func__);
20 	return (NULL);
21 }
22 
23 static inline void
24 page_pool_destroy(struct page_pool *ppool)
25 {
26 
27 	pr_debug("%s: TODO\n", __func__);
28 }
29 
30 static inline struct page *
31 page_pool_dev_alloc_frag(struct page_pool *ppool, uint32_t *offset,
32     size_t size)
33 {
34 
35 	pr_debug("%s: TODO\n", __func__);
36 	return (NULL);
37 }
38 
39 static inline dma_addr_t
40 page_pool_get_dma_addr(struct page *page)
41 {
42 
43 	pr_debug("%s: TODO\n", __func__);
44 	return (0);
45 }
46 
47 static inline enum dma_data_direction
48 page_pool_get_dma_dir(const struct page_pool *ppool)
49 {
50 
51 	pr_debug("%s: TODO\n", __func__);
52 	return (DMA_BIDIRECTIONAL);
53 }
54 
55 static inline void
56 page_pool_put_full_page(struct page_pool *ppool, struct page *page,
57     bool allow_direct)
58 {
59 
60 	pr_debug("%s: TODO\n", __func__);
61 }
62 
63 static inline int
64 page_pool_ethtool_stats_get_count(void)
65 {
66 
67 	pr_debug("%s: TODO\n", __func__);
68 	return (0);
69 }
70 
71 static inline uint8_t *
72 page_pool_ethtool_stats_get_strings(uint8_t *x)
73 {
74 
75 	pr_debug("%s: TODO\n", __func__);
76 	return (x);
77 }
78 
79 #endif	/* _LINUXKPI_NET_PAGE_POOL_HELPERS_H */
80