Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-31 Thread Anton Ivanov
if (iovcnt > MAX_L2TPV3_IOVCNT - 1) { size_t size = iov_size(iov, iovcnt); uint8_t *buf; buf = g_malloc(size); iov_to_buf(iov, iovcnt, 0, buf, size); ret = net_l2tpv3_receive_dgram(nc, buf, size); g_free(buf); return ret; } iov_to_buf is a memcpy of the data

Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-27 Thread Anton Ivanov
On 27/03/14 18:25, Stefan Hajnoczi wrote: > On Thu, Mar 27, 2014 at 4:53 PM, Anton Ivanov (antivano) > wrote: >> On 27/03/14 12:30, Stefan Hajnoczi wrote: >>> On Wed, Mar 26, 2014 at 11:08:41AM +, anton.iva...@kot-begemot.co.uk >>> wrote: +static ssize_t net_l2tpv3_receive_dgram_iov(NetC

Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-27 Thread Stefan Hajnoczi
On Thu, Mar 27, 2014 at 4:53 PM, Anton Ivanov (antivano) wrote: > On 27/03/14 12:30, Stefan Hajnoczi wrote: >> On Wed, Mar 26, 2014 at 11:08:41AM +, anton.iva...@kot-begemot.co.uk >> wrote: >>> +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, >>> +const str

Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-27 Thread Anton Ivanov (antivano)
On 27/03/14 12:30, Stefan Hajnoczi wrote: > On Wed, Mar 26, 2014 at 11:08:41AM +, anton.iva...@kot-begemot.co.uk > wrote: >> +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, >> +const struct iovec *iov, >> +int iovcnt) >> +{ >> +NetL2

Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-27 Thread Eric Blake
On 03/26/2014 05:08 AM, anton.iva...@kot-begemot.co.uk wrote: > From: Anton Ivanov > > This transport allows to connect a QEMU nic to a static Ethernet > over L2TPv3 tunnel. The transport supports all options present > in the Linux kernel implementation. It allows QEMU to connect > to any Linux h

Re: [Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-27 Thread Stefan Hajnoczi
On Wed, Mar 26, 2014 at 11:08:41AM +, anton.iva...@kot-begemot.co.uk wrote: > +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, > +const struct iovec *iov, > +int iovcnt) > +{ > +NetL2TPV3State *s = DO_UPCAST(NetL2TPV3State, nc, nc); >

[Qemu-devel] [PATCH v6] net: L2TPv3 transport

2014-03-26 Thread anton . ivanov
From: Anton Ivanov This transport allows to connect a QEMU nic to a static Ethernet over L2TPv3 tunnel. The transport supports all options present in the Linux kernel implementation. It allows QEMU to connect to any Linux host running kernel 3.3+, most routers and network devices as well as other