[Drbd-dev] [PATCH 3/4] net: add paged frag destructor support to kernel_sendpage.

Michał Mirosław mirqus at gmail.com
Wed Nov 9 19:02:44 CET 2011


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


More information about the drbd-dev mailing list