diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2021-08-09 15:49:03 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-09 15:49:03 -0700 |
| commit | 4ef3960ea19c3b2bced37405b251f05fd4b35545 (patch) | |
| tree | fb1db736814d35a40e4289c93d153873afa0a56e /include/linux | |
| parent | 2a2b6e3640c43a808dcb5226963e2cc0669294b1 (diff) | |
| parent | 93188e9642c3ce11d11b2663905b703dfe89e349 (diff) | |
| download | cachepc-linux-4ef3960ea19c3b2bced37405b251f05fd4b35545.tar.gz cachepc-linux-4ef3960ea19c3b2bced37405b251f05fd4b35545.zip | |
Merge branch 'add-frag-page-support-in-page-pool'
Yunsheng Lin says:
====================
add frag page support in page pool
This patchset adds frag page support in page pool and
enable skb's page frag recycling based on page pool in
hns3 drvier.
====================
Link: https://lore.kernel.org/r/1628217982-53533-1-git-send-email-linyunsheng@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm_types.h | 18 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 4 |
2 files changed, 14 insertions, 8 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 52bbd2b7cb46..7f8ee09c711f 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -103,11 +103,19 @@ struct page { unsigned long pp_magic; struct page_pool *pp; unsigned long _pp_mapping_pad; - /** - * @dma_addr: might require a 64-bit value on - * 32-bit architectures. - */ - unsigned long dma_addr[2]; + unsigned long dma_addr; + union { + /** + * dma_addr_upper: might require a 64-bit + * value on 32-bit architectures. + */ + unsigned long dma_addr_upper; + /** + * For frag page support, not supported in + * 32-bit architectures with 64-bit DMA. + */ + atomic_long_t pp_frag_count; + }; }; struct { /* slab, slob and slub */ union { diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 783cc2368bb1..6bdb0db3e825 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -4712,11 +4712,9 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb) } #ifdef CONFIG_PAGE_POOL -static inline void skb_mark_for_recycle(struct sk_buff *skb, struct page *page, - struct page_pool *pp) +static inline void skb_mark_for_recycle(struct sk_buff *skb) { skb->pp_recycle = 1; - page_pool_store_mem_info(page, pp); } #endif |
