mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
rxrpc: Do zerocopy using MSG_SPLICE_PAGES and page frags
Switch from keeping the transmission buffers in the rxrpc_txbuf struct and allocated from the slab, to allocating them using page fragment allocators (which uses raw pages), thereby allowing them to be passed to MSG_SPLICE_PAGES and avoid copying into the UDP buffers. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: "David S. Miller" <davem@davemloft.net> cc: Eric Dumazet <edumazet@google.com> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org
This commit is contained in:
@@ -452,6 +452,9 @@ void rxrpc_destroy_local(struct rxrpc_local *local)
|
||||
#endif
|
||||
rxrpc_purge_queue(&local->rx_queue);
|
||||
rxrpc_purge_client_connections(local);
|
||||
if (local->tx_alloc.va)
|
||||
__page_frag_cache_drain(virt_to_page(local->tx_alloc.va),
|
||||
local->tx_alloc.pagecnt_bias);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user