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

netmem, devmem, tcp: access pp fields through @desc in net_iov

Convert all the legacy code directly accessing the pp fields in net_iov
to access them through @desc in net_iov.

Signed-off-by: Byungchul Park <byungchul@sk.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Byungchul Park and committed by
Jakub Kicinski
df59bb5b db402985

+6 -6
+2 -2
include/linux/skbuff.h
··· 3778 3778 enum dma_data_direction dir) 3779 3779 { 3780 3780 if (skb_frag_is_net_iov(frag)) { 3781 - return netmem_to_net_iov(frag->netmem)->dma_addr + offset + 3782 - frag->offset; 3781 + return netmem_to_net_iov(frag->netmem)->desc.dma_addr + 3782 + offset + frag->offset; 3783 3783 } 3784 3784 return dma_map_page(dev, skb_frag_page(frag), 3785 3785 skb_frag_off(frag) + offset, size, dir);
+3 -3
net/core/devmem.c
··· 97 97 index = offset / PAGE_SIZE; 98 98 niov = &owner->area.niovs[index]; 99 99 100 - niov->pp_magic = 0; 101 - niov->pp = NULL; 102 - atomic_long_set(&niov->pp_ref_count, 0); 100 + niov->desc.pp_magic = 0; 101 + niov->desc.pp = NULL; 102 + atomic_long_set(&niov->desc.pp_ref_count, 0); 103 103 104 104 return niov; 105 105 }
+1 -1
net/ipv4/tcp.c
··· 2587 2587 if (err) 2588 2588 goto out; 2589 2589 2590 - atomic_long_inc(&niov->pp_ref_count); 2590 + atomic_long_inc(&niov->desc.pp_ref_count); 2591 2591 tcp_xa_pool.netmems[tcp_xa_pool.idx++] = skb_frag_netmem(frag); 2592 2592 2593 2593 sent += copy;