Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-22 Thread Vasiliy Tolstov
2014-07-22 0:49 GMT+04:00 Samuel Thibault :
> Alternatively, you can track the parameters branch, which I don't
> regenerate.


Thanks. Now all works fine.

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Samuel Thibault, le Mon 21 Jul 2014 22:30:40 +0200, a écrit :
> Vasiliy Tolstov, le Tue 22 Jul 2014 00:19:46 +0400, a écrit :
> > 2014-07-22 0:13 GMT+04:00 Samuel Thibault :
> > > It is related to the patch.  I have fixed it, and pushed a newer
> > > tosubmit branch.
> > 
> > Nothing new in tosubmit branch
> 
> I have regenerated the branch, you need to check it out again.

Alternatively, you can track the parameters branch, which I don't
regenerate.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Tue 22 Jul 2014 00:19:46 +0400, a écrit :
> 2014-07-22 0:13 GMT+04:00 Samuel Thibault :
> > It is related to the patch.  I have fixed it, and pushed a newer
> > tosubmit branch.
> 
> Nothing new in tosubmit branch

I have regenerated the branch, you need to check it out again.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-22 0:13 GMT+04:00 Samuel Thibault :
> It is related to the patch.  I have fixed it, and pushed a newer
> tosubmit branch.


Nothing new in tosubmit branch

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Tue 22 Jul 2014 00:12:23 +0400, a écrit :
> 2014-07-21 23:49 GMT+04:00 Samuel Thibault :
> > There's no current support for this, but that could be useful to add
> > indeed.
> 
> 
> I hit another issue, but may be not related to the patch. In centos 7
> (test another boxes) i have running qemu with:
> /usr/bin/qemu-system-x86_64 -device virtio-scsi-pci,id=scsi0 -device
> scsi-hd,bus=scsi0.0,drive=drive0 -device virtio-net,netdev=user.0
> -drive 
> if=none,cache=unsafe,id=drive0,discard=unmap,file=output/centos-7-x86_64-qemu/centos-7-x86_64.raw
> -display none -netdev user,id=user.0 -boot once=d -redir tcp:3213::22
> -m size=1024Mib -name centos-7-x86_64 -machine type=pc-1.0,accel=kvm
> -cdrom 
> /home/vtolstov/devel/vtolstov/packer-builder/templates/centos/packer_cache/cffdc67bdc73fef02507fdcaff2d9fb7cbc8780ac3c17e862a5451ddbf8bf39d.iso
> -vnc 0.0.0.0:47
> 
> and try to ssh to localhost -p 3213, but get timeout. in tcpdump i
> have send packets but not recieved. inside qemu vm listen for 22 port
> on ipv4 and ipv6. Inside vm i see in tcpdump incoming packets but not
> outcoming.

It is related to the patch.  I have fixed it, and pushed a newer
tosubmit branch.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 23:49 GMT+04:00 Samuel Thibault :
> There's no current support for this, but that could be useful to add
> indeed.


I hit another issue, but may be not related to the patch. In centos 7
(test another boxes) i have running qemu with:
/usr/bin/qemu-system-x86_64 -device virtio-scsi-pci,id=scsi0 -device
scsi-hd,bus=scsi0.0,drive=drive0 -device virtio-net,netdev=user.0
-drive 
if=none,cache=unsafe,id=drive0,discard=unmap,file=output/centos-7-x86_64-qemu/centos-7-x86_64.raw
-display none -netdev user,id=user.0 -boot once=d -redir tcp:3213::22
-m size=1024Mib -name centos-7-x86_64 -machine type=pc-1.0,accel=kvm
-cdrom 
/home/vtolstov/devel/vtolstov/packer-builder/templates/centos/packer_cache/cffdc67bdc73fef02507fdcaff2d9fb7cbc8780ac3c17e862a5451ddbf8bf39d.iso
-vnc 0.0.0.0:47

and try to ssh to localhost -p 3213, but get timeout. in tcpdump i
have send packets but not recieved. inside qemu vm listen for 22 port
on ipv4 and ipv6. Inside vm i see in tcpdump incoming packets but not
outcoming.

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Mon 21 Jul 2014 23:22:39 +0400, a écrit :
> 2014-07-21 18:52 GMT+04:00 Samuel Thibault :
> > For instance, yes, but you probably want to try my patch before.
> 
> 
> Yes, patch fix issue. And now all works fine. Last question - is that
> possible to enable/disable ipv4/ipv6 slirp stacks? This is very useful
> feature to check dual stack and single stack apps.

There's no current support for this, but that could be useful to add
indeed.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 18:52 GMT+04:00 Samuel Thibault :
> For instance, yes, but you probably want to try my patch before.


Yes, patch fix issue. And now all works fine. Last question - is that
possible to enable/disable ipv4/ipv6 slirp stacks? This is very useful
feature to check dual stack and single stack apps.

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Mon 21 Jul 2014 18:47:00 +0400, a écrit :
> 2014-07-21 18:29 GMT+04:00 Samuel Thibault :
> > A gdb backtrace would also be useful.
> 
> Can you provide me info how can i get it from running qemu? As i
> understand i need to gdb load-symbol and specify debuging simbols (i
> have stripped it)
> after that i need to attach PID...
> ?

For instance, yes, but you probably want to try my patch before.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Samuel Thibault, le Mon 21 Jul 2014 16:47:09 +0200, a écrit :
> Samuel Thibault, le Mon 21 Jul 2014 16:29:34 +0200, a écrit :
> > Vasiliy Tolstov, le Mon 21 Jul 2014 18:19:17 +0400, a écrit :
> > > 2014-07-21 16:06 GMT+04:00 Samuel Thibault :
> > > > I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
> > > > the tosubmit branch.
> > > 
> > > 
> > > Inside packer (i'm try to build some centos 7 boxes) i have errors
> > > Qemu stderr: qemu-system-x86_64: slirp/tcp_input.c:1543: tcp_mss:
> > > Assertion `0' failed.
> > 
> > Uh?!  Does the switch statement properly have both AF_INET and AF_INET6
> > cases?
> > 
> > A gdb backtrace would also be useful.
> 
> Mmm, I guess this is coming through tcp_connect().  Could you try the
> attached patch?

Sorry, I should have tested the build before sending, here it is.

Samuel
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index a1f060b..7fa6173 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -439,6 +439,7 @@ void tcp_connect(struct socket *inso)
 return;
 }
 so->lhost = inso->lhost;
+so->so_ffamily = inso->so_ffamily;
 }
 
 tcp_mss(sototcpcb(so), 0);
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 18:29 GMT+04:00 Samuel Thibault :
> A gdb backtrace would also be useful.


Can you provide me info how can i get it from running qemu? As i
understand i need to gdb load-symbol and specify debuging simbols (i
have stripped it)
after that i need to attach PID...
?

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Samuel Thibault, le Mon 21 Jul 2014 16:29:34 +0200, a écrit :
> Vasiliy Tolstov, le Mon 21 Jul 2014 18:19:17 +0400, a écrit :
> > 2014-07-21 16:06 GMT+04:00 Samuel Thibault :
> > > I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
> > > the tosubmit branch.
> > 
> > 
> > Inside packer (i'm try to build some centos 7 boxes) i have errors
> > Qemu stderr: qemu-system-x86_64: slirp/tcp_input.c:1543: tcp_mss:
> > Assertion `0' failed.
> 
> Uh?!  Does the switch statement properly have both AF_INET and AF_INET6
> cases?
> 
> A gdb backtrace would also be useful.

Mmm, I guess this is coming through tcp_connect().  Could you try the
attached patch?

Samuel
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index a1f060b..feae861 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -439,6 +439,7 @@ void tcp_connect(struct socket *inso)
 return;
 }
 so->lhost = inso->lhost;
+so->ffamily = inso->so_ffamily;
 }
 
 tcp_mss(sototcpcb(so), 0);
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 18:29 GMT+04:00 Samuel Thibault :
> Uh?!  Does the switch statement properly have both AF_INET and AF_INET6
> cases?
>
> A gdb backtrace would also be useful.


I'm compile 2.1.0-rc2 with
./configure --cc=x86_64-pc-linux-gnu-gcc --prefix=/usr
--libdir=/usr/lib64 --localstatedir=/var --python=/usr/bin/python2
--sysconfdir=/etc --enable-cap-ng --enable-curl --enable-curses
--enable-fdt --enable-guest-agent --enable-guest-base --enable-kvm
--enable-linux-user --enable-modules --enable-seccomp
--enable-stack-protector --enable-system --enable-tcg-interpreter
--enable-tpm --enable-user --enable-uuid --enable-vhdx
--enable-vhost-net --enable-vhost-scsi --disable-brlapi
--disable-glusterfs --disable-rdma --disable-sparse --disable-strip
--disable-werror --disable-xen --disable-xen-pci-passthrough
--disable-xfsctl --with-system-pixman --without-vss-sdk
--without-win-sdk --iasl=/usr/bin/iasl --enable-lzo --enable-snappy
--enable-linux-aio --enable-virtio-blk-data-plane --disable-bluez
--enable-vnc-tls --enable-vnc-ws --disable-libiscsi --enable-vnc-jpeg
--disable-netmap --disable-libnfs --disable-glx --enable-vnc-png
--disable-quorum --disable-rbd --disable-vnc-sasl --disable-sdl
--disable-smartcard-nss --enable-spice --disable-libssh2
--disable-libusb --enable-usb-redir --disable-vde --enable-virtfs
--enable-attr --disable-debug-info --disable-gtk --audio-drv-list=
--target-list=x86_64-linux-user,x86_64-softmmu,i386-linux-user,i386-softmmu

Yes, tcp_mss function have both:
  switch (so->so_ffamily) {
  case AF_INET:
  mss = min(IF_MTU, IF_MRU) - sizeof(struct tcphdr)
+ sizeof(struct ip);
  break;
  case AF_INET6:
  mss = min(IF_MTU, IF_MRU) - sizeof(struct tcphdr)
+ sizeof(struct ip6);
  break;
  default:
  assert(0);
  break;
  }


-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Mon 21 Jul 2014 18:19:17 +0400, a écrit :
> 2014-07-21 16:06 GMT+04:00 Samuel Thibault :
> > I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
> > the tosubmit branch.
> 
> 
> Inside packer (i'm try to build some centos 7 boxes) i have errors
> Qemu stderr: qemu-system-x86_64: slirp/tcp_input.c:1543: tcp_mss:
> Assertion `0' failed.

Uh?!  Does the switch statement properly have both AF_INET and AF_INET6
cases?

A gdb backtrace would also be useful.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 16:06 GMT+04:00 Samuel Thibault :
> I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
> the tosubmit branch.


Inside packer (i'm try to build some centos 7 boxes) i have errors
Qemu stderr: qemu-system-x86_64: slirp/tcp_input.c:1543: tcp_mss:
Assertion `0' failed.
I'm disable debug when patching. Does i need to reenable it and send
some debug output?

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Hello,

Vasiliy Tolstov, le Mon 21 Jul 2014 15:34:16 +0400, a écrit :
> Hello. I have now slirp qemu network with ipv4 address, but for tests
> i need also ipv6 addresses in slirp network. How can i provide this
> args for qemu via libvirt or (best) via qemu args?
> I found some commits about ipv6 slirp network but can't find args
> needed to enable it.

? The support was submitted to the list, but not commited.
You can find the patches on
http://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05731.html
and later.
Unfortunately, nobody has yet found the time to review them.
Documentation is added by patch 18, you can choose the prefix being
exposed to userland just like with ipv4.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Mon 21 Jul 2014 15:42:54 +0400, a écrit :
> 2014-07-21 15:41 GMT+04:00 Samuel Thibault :
> > ? The support was submitted to the list, but not commited.
> > You can find the patches on
> > http://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05731.html
> > and later.
> > Unfortunately, nobody has yet found the time to review them.
> > Documentation is added by patch 18, you can choose the prefix being
> > exposed to userland just like with ipv4.
> 
> In case of ipv4 i have some default settings like network, dns and so.
> In case of ipv6 does i have some default?

Yes, see the added documentation:

+@item ip6-net=@var{addr}[/@var{int}]
+Set IPv6 network address the guest will see. Optionally specify the prefix
+size, as number of valid top-most bits. Default is fec0::/64.
+ 
+@item ip6-host=@var{addr}
+Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 in
+the guest network, i.e. ::2.

+@item ip6-dns=@var{addr}
+Specify the guest-visible address of the IPv6 virtual nameserver. The address
+must be different from the host address. Default is the 3rd IP in the guest
+network, i.e. ::3.

Most probably you'll want to set ip6-net to something else than
fec0::/64 since OSes usually prefer IPv4 over fec0::/64.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Samuel Thibault
Vasiliy Tolstov, le Mon 21 Jul 2014 15:59:53 +0400, a écrit :
> Does it possible to get this patches via git branch or by another way?
> As i see i can't get it via email because of html contents =(

I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
the tosubmit branch.

Samuel

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 16:06 GMT+04:00 Samuel Thibault :
> I have pushed it to http://dept-info.labri.fr/~thibault/qemu-ipv6 , in
> the tosubmit branch.


Thanks!

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
Does it possible to get this patches via git branch or by another way?
As i see i can't get it via email because of html contents =(

2014-07-21 15:55 GMT+04:00 Vasiliy Tolstov :
> 2014-07-21 15:49 GMT+04:00 Samuel Thibault :
>> Yes, see the added documentation:
>>
>> +@item ip6-net=@var{addr}[/@var{int}]
>> +Set IPv6 network address the guest will see. Optionally specify the prefix
>> +size, as number of valid top-most bits. Default is fec0::/64.
>> +
>> +@item ip6-host=@var{addr}
>> +Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 
>> in
>> +the guest network, i.e. ::2.
>>
>> +@item ip6-dns=@var{addr}
>> +Specify the guest-visible address of the IPv6 virtual nameserver. The 
>> address
>> +must be different from the host address. Default is the 3rd IP in the guest
>> +network, i.e. ::3.
>>
>> Most probably you'll want to set ip6-net to something else than
>> fec0::/64 since OSes usually prefer IPv4 over fec0::/64.
>
>
> Big thanks! I'm try apply patches and check.
>
> --
> Vasiliy Tolstov,
> e-mail: v.tols...@selfip.ru
> jabber: v...@selfip.ru



-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 15:49 GMT+04:00 Samuel Thibault :
> Yes, see the added documentation:
>
> +@item ip6-net=@var{addr}[/@var{int}]
> +Set IPv6 network address the guest will see. Optionally specify the prefix
> +size, as number of valid top-most bits. Default is fec0::/64.
> +
> +@item ip6-host=@var{addr}
> +Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 
> in
> +the guest network, i.e. ::2.
>
> +@item ip6-dns=@var{addr}
> +Specify the guest-visible address of the IPv6 virtual nameserver. The address
> +must be different from the host address. Default is the 3rd IP in the guest
> +network, i.e. ::3.
>
> Most probably you'll want to set ip6-net to something else than
> fec0::/64 since OSes usually prefer IPv4 over fec0::/64.


Big thanks! I'm try apply patches and check.

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [Qemu-devel] ipv6 slirp network

2014-07-21 Thread Vasiliy Tolstov
2014-07-21 15:41 GMT+04:00 Samuel Thibault :
> ? The support was submitted to the list, but not commited.
> You can find the patches on
> http://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05731.html
> and later.
> Unfortunately, nobody has yet found the time to review them.
> Documentation is added by patch 18, you can choose the prefix being
> exposed to userland just like with ipv4.


In case of ipv4 i have some default settings like network, dns and so.
In case of ipv6 does i have some default?

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list