[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [DRAFT v2] XenSock protocol design document



On Wed, 13 Jul 2016, Andrew Cooper wrote:
> On 13/07/16 16:47, Stefano Stabellini wrote:
> > Hi all,
> >
> > This is the design document of the XenSock protocol. You can find
> > prototypes of the Linux frontend and backend drivers here:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/sstabellini/xen.git xensock-2
> >
> > To use them, make sure to enable CONFIG_XENSOCK in your kernel config
> > and add "xensock=1" to the command line of your DomU Linux kernel. You
> > also need the toolstack to create the initial xenstore nodes for the
> > protocol. To do that, please apply the attached patch to libxl (the
> > patch is based on Xen 4.7.0-rc3) and add "xensock=1" to your DomU config
> > file.
> 
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index 9e48199..478eb0a 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -120,6 +120,7 @@
>  #include <linux/mroute.h>
>  #endif
>  #include <net/l3mdev.h>
> +#include <net/xensock.h>
>  
>  
>  /* The inetsw table contains everything that inet_create needs to
> @@ -1775,6 +1776,11 @@ static int __init inet_init(void)
>      for (r = &inetsw[0]; r < &inetsw[SOCK_MAX]; ++r)
>          INIT_LIST_HEAD(r);
>  
> +    if (xensock) {
> +        pr_info("Enabling xensock for AF_INET SOCK_STREAM\n");
> +        inetsw_array[0].ops = &xensock_stream_ops;
> +    }
> +
>      for (q = inetsw_array; q < &inetsw_array[INETSW_ARRAY_LEN]; ++q)
>          inet_register_protosw(q);
>  
> 
> I am curious as to how you plan to persuade Dave Miller to take this patch?
>
> What is your planned mitigation for the fact that INET sockets stop
> behaving like INET sockets.

Let me premise that obviously those 4 lines of code are unlikely to be
the way this code will actually be merged in Linux. As I said these are
just prototypes. But they are far better than the very first version I
had :-)

That's the chicken and egg problem: I cannot really have a proper
conversation about it on the LKML until the protocol is, if not
accepted, at least a bit farther down the review process. In my
experience discussing about design docs on the LKML doesn't work well --
they want to see the code first. Once the design is somewhat "settled",
I'll engage with netdev. They are the ones with the best expertize on
how to integrate this work in Linux.

I did have informal conversations with two or three Linux maintainers
(but not Dave Miller) -- they seemed positive about it and they thought
XenSock is useful. We'll have to see.

At the end of the day, if the Linux drivers are no-go, the protocol can
still be used for fully userspace implementations or other OSes.


> Are there any plans for IPv6?

I don't have any at the moment, but I would be happy to see that
happening.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.