[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251121040047.71921-3-byungchul@sk.com>
Date: Fri, 21 Nov 2025 13:00:47 +0900
From: Byungchul Park <byungchul@...com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
kernel_team@...ynix.com,
harry.yoo@...cle.com,
hawk@...nel.org,
andrew+netdev@...n.ch,
david@...hat.com,
lorenzo.stoakes@...cle.com,
Liam.Howlett@...cle.com,
vbabka@...e.cz,
ziy@...dia.com,
willy@...radead.org,
toke@...hat.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org,
asml.silence@...il.com,
axboe@...nel.dk,
ncardwell@...gle.com,
kuniyu@...gle.com,
dsahern@...nel.org,
almasrymina@...gle.com,
sdf@...ichev.me,
dw@...idwei.uk,
ap420073@...il.com,
dtatulea@...dia.com,
shivajikant@...gle.com,
io-uring@...r.kernel.org
Subject: [PATCH net-next 3/3] 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@...com>
---
include/net/netmem.h | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
diff --git a/include/net/netmem.h b/include/net/netmem.h
index 9e10f4ac50c3..46def457dc65 100644
--- a/include/net/netmem.h
+++ b/include/net/netmem.h
@@ -93,23 +93,7 @@ enum net_iov_type {
* supported.
*/
struct net_iov {
- union {
- struct netmem_desc desc;
-
- /* XXX: The following part should be removed once all
- * the references to them are converted so as to be
- * accessed via netmem_desc e.g. niov->desc.pp instead
- * of niov->pp.
- */
- struct {
- unsigned long _flags;
- unsigned long pp_magic;
- struct page_pool *pp;
- unsigned long _pp_mapping_pad;
- unsigned long dma_addr;
- atomic_long_t pp_ref_count;
- };
- };
+ struct netmem_desc desc;
struct net_iov_area *owner;
enum net_iov_type type;
};
@@ -123,26 +107,6 @@ struct net_iov_area {
unsigned long base_virtual;
};
-/* net_iov is union'ed with struct netmem_desc mirroring struct page, so
- * the page_pool can access these fields without worrying whether the
- * underlying fields are accessed via netmem_desc or directly via
- * net_iov, until all the references to them are converted so as to be
- * accessed via netmem_desc e.g. niov->desc.pp instead of niov->pp.
- *
- * The non-net stack fields of struct page are private to the mm stack
- * and must never be mirrored to net_iov.
- */
-#define NET_IOV_ASSERT_OFFSET(desc, iov) \
- static_assert(offsetof(struct netmem_desc, desc) == \
- offsetof(struct net_iov, iov))
-NET_IOV_ASSERT_OFFSET(_flags, _flags);
-NET_IOV_ASSERT_OFFSET(pp_magic, pp_magic);
-NET_IOV_ASSERT_OFFSET(pp, pp);
-NET_IOV_ASSERT_OFFSET(_pp_mapping_pad, _pp_mapping_pad);
-NET_IOV_ASSERT_OFFSET(dma_addr, dma_addr);
-NET_IOV_ASSERT_OFFSET(pp_ref_count, pp_ref_count);
-#undef NET_IOV_ASSERT_OFFSET
-
static inline struct net_iov_area *net_iov_owner(const struct net_iov *niov)
{
return niov->owner;
--
2.17.1
Powered by blists - more mailing lists