Michał Mirosław
2011-Nov-09 18:02 UTC
[Ocfs2-devel] [PATCH 3/4] net: add paged frag destructor support to kernel_sendpage.
2011/11/9 Ian Campbell <ian.campbell at citrix.com>:> This requires adding a new argument to various sendpage hooks up and down the > stack. At the moment this parameter is always NULL.[...]> --- a/include/linux/net.h > +++ b/include/linux/net.h > @@ -203,6 +204,7 @@ struct proto_ops { > ? ? ? ?ssize_t ? ? ? ? (*sendpage) ?(struct socket *sock, struct page *page, > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct skb_frag_destructor *destroy, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int offset, size_t size, int flags);Maybe you could instead add new op like sendfrag() that would get already prepared skb_frag_struct? In the end all page data ends up described in skb_frag_struct, so this would reduce copying this information all over network stack. This might be a bigger change, though. Best Regards, Micha? Miros?aw