Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

netmem: remove the pp fields from net_iov

Now that the pp fields in net_iov have no users, remove them from
net_iov and clean up.

Signed-off-by: Byungchul Park <byungchul@sk.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/20260224061424.11219-1-byungchul@sk.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Byungchul Park and committed by
Jakub Kicinski
fd6dad4e aebf15e8

+1 -37
+1 -37
include/net/netmem.h
··· 93 93 * supported. 94 94 */ 95 95 struct net_iov { 96 - union { 97 - struct netmem_desc desc; 98 - 99 - /* XXX: The following part should be removed once all 100 - * the references to them are converted so as to be 101 - * accessed via netmem_desc e.g. niov->desc.pp instead 102 - * of niov->pp. 103 - */ 104 - struct { 105 - unsigned long _flags; 106 - unsigned long pp_magic; 107 - struct page_pool *pp; 108 - unsigned long _pp_mapping_pad; 109 - unsigned long dma_addr; 110 - atomic_long_t pp_ref_count; 111 - }; 112 - }; 96 + struct netmem_desc desc; 113 97 struct net_iov_area *owner; 114 98 enum net_iov_type type; 115 99 }; ··· 106 122 /* Offset into the dma-buf where this chunk starts. */ 107 123 unsigned long base_virtual; 108 124 }; 109 - 110 - /* net_iov is union'ed with struct netmem_desc mirroring struct page, so 111 - * the page_pool can access these fields without worrying whether the 112 - * underlying fields are accessed via netmem_desc or directly via 113 - * net_iov, until all the references to them are converted so as to be 114 - * accessed via netmem_desc e.g. niov->desc.pp instead of niov->pp. 115 - * 116 - * The non-net stack fields of struct page are private to the mm stack 117 - * and must never be mirrored to net_iov. 118 - */ 119 - #define NET_IOV_ASSERT_OFFSET(desc, iov) \ 120 - static_assert(offsetof(struct netmem_desc, desc) == \ 121 - offsetof(struct net_iov, iov)) 122 - NET_IOV_ASSERT_OFFSET(_flags, _flags); 123 - NET_IOV_ASSERT_OFFSET(pp_magic, pp_magic); 124 - NET_IOV_ASSERT_OFFSET(pp, pp); 125 - NET_IOV_ASSERT_OFFSET(_pp_mapping_pad, _pp_mapping_pad); 126 - NET_IOV_ASSERT_OFFSET(dma_addr, dma_addr); 127 - NET_IOV_ASSERT_OFFSET(pp_ref_count, pp_ref_count); 128 - #undef NET_IOV_ASSERT_OFFSET 129 125 130 126 static inline struct net_iov_area *net_iov_owner(const struct net_iov *niov) 131 127 {