From: "Anton Ivanov (antivano)" <antivano@cisco.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Qemu-devel@nongnu.org" <Qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport
Date: Tue, 4 Mar 2014 15:22:17 +0000 [thread overview]
Message-ID: <5315EFA6.1010600@cisco.com> (raw)
In-Reply-To: <5315EEFE.6060605@cisco.com>
[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]
Apologies, missed to diff the json definitions.
Attached.
On 04/03/14 15:19, Anton Ivanov wrote:
> Attached is a revised version.
>
> * I am still keeping the sendmsg instead of iov_send because I
> have not had the time to review udp.c in the kernel and do the
> relevant regression testing to see if they connect() still breaks
> bind() on multihomed hosts as it did in 2.6. We can revisit that at a
> later date, without doing the proper investigation I am not
> comfortable trying this.
>
> * I have killed completely parse6 and replaced that by a common
> getaddrinfo() with a selectable address family based on the boolean
> flags. This also allows to force a specific v4 or v6 address choice
> for dst.
>
> * addresses now are specified separately from ports and ports are
> deliberately strings so you can specify them as a protocol.
>
> * mode bitmask is gone it is all booleans now - both for option
> invocation and internally in the code.
>
> * I have added the extra offset back in so it is feature by
> feature compatible with linux kernel implementation.
>
> * All mallocs are now to exact size and
>
> * Indentation, style, debug, etc are all as requested now.
>
> * l2tpv3.h has become surplus to requirements and is gone now.
>
> * it now has proper cleanup.
>
> * I have tested it for a few setups (mostly v4) and it works as
> advertised. I need to rewrite my tests scripts for the new options
> names to give it a full test. I would not expect that to show any
> problems though - core send/receive logic is unchanged from the
> original version.
>
> * I have not yet addressed the page size and page alignment of
> buffers items - leaving that open for an RFC on how to get the max
> performance there and how to make it expandable lately so one can
> re-configure it for large MTU/jumbo frames.
>
> Example magic incantation to invoke it with the new options:
>
> #!/bin/sh
>
> kvm -hda kvm.img -m 1024 \
> -net nic,vlan=0,model=virtio,macaddr=0a:98:fc:96:83:01 \
> -net
> l2tpv3,vlan=0,udp,src=192.168.63.1,srcport=1700,dst=192.168.63.1,dstport=1701,cookie64,txcookie=0x0123456789abcdef,rxcookie=0xfedcba9876543210,rxsession=0xffffffff,txsession=0xffffffff,counter
>
> A.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: l2tpv3-json.diff --]
[-- Type: text/x-patch; name="l2tpv3-json.diff", Size: 2053 bytes --]
diff --git a/qapi-schema.json b/qapi-schema.json
index 83fa485..56eac6d 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2940,6 +2940,62 @@
'*localaddr': 'str',
'*udp': 'str' } }
+# @NetdevL2TPv3Options
+#
+# Connect the VLAN to Ethernet over L2TPv3 Static tunnel
+#
+# @ipv6: #bool, use ipv6
+#
+# @udp: #bool use the udp version of the L2TPv3 encapsulation
+#
+# @cookie64 : #use 64 bit cookies
+#
+# @offset : #extra offset
+#
+# @counter : #have sequence counter
+#
+# @fd: #optional file descriptor of an already opened socket
+#
+# @src: #source address
+#
+# @srcport: #source port - mandatory for udp, optional for ip
+#
+# @dst: #destination address
+#
+# @dstport: #destination port - mandatory for udp, optional for ip
+#
+# @txcookie: #optional 32 or 64 bit tx cookie for the tunnel
+#
+# @rxcookie: #optional 32 or 64 bit rx cookie for the tunnel
+#
+# @txsession: #tx 32 bit session
+#
+# @rxsession: #rx 32 bit session - if unset value for txsession is used
+#
+#
+# Since 1.2
+##
+##
+{ 'type': 'NetdevL2TPv3Options',
+ 'data': {
+ '*fd': 'str',
+ 'src': 'str',
+ 'dst': 'str',
+ '*srcport': 'str',
+ '*dstport': 'str',
+ '*ipv6': 'bool',
+ '*udp': 'bool',
+ '*cookie64': 'bool',
+ '*counter': 'bool',
+ '*txcookie': 'uint64',
+ '*rxcookie': 'uint64',
+ 'txsession': 'uint32',
+ '*rxsession': 'uint32',
+ '*offset': 'uint32'
+
+} }
+
+##
##
# @NetdevVdeOptions
#
@@ -3014,13 +3070,16 @@
# A discriminated record of network device traits.
#
# Since 1.2
-##
+#
+# Added in 2.0 - l2tpv3
+#
{ 'union': 'NetClientOptions',
'data': {
'none': 'NetdevNoneOptions',
'nic': 'NetLegacyNicOptions',
'user': 'NetdevUserOptions',
'tap': 'NetdevTapOptions',
+ 'l2tpv3': 'NetdevL2TPv3Options',
'socket': 'NetdevSocketOptions',
'vde': 'NetdevVdeOptions',
'dump': 'NetdevDumpOptions',
next prev parent reply other threads:[~2014-03-04 15:22 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 8:28 [Qemu-devel] Contribution - L2TPv3 transport Anton Ivanov (antivano)
2014-02-28 10:02 ` Paolo Bonzini
2014-02-28 11:17 ` Anton Ivanov (antivano)
2014-02-28 11:36 ` Paolo Bonzini
2014-02-28 12:59 ` Anton Ivanov (antivano)
2014-02-28 13:55 ` Anton Ivanov (antivano)
2014-03-04 15:19 ` Anton Ivanov (antivano)
2014-03-04 15:22 ` Anton Ivanov (antivano) [this message]
2014-03-04 15:53 ` Eric Blake
2014-03-04 16:05 ` Anton Ivanov (antivano)
2014-03-05 8:49 ` Anton Ivanov (antivano)
2014-03-05 11:38 ` Peter Maydell
2014-03-04 15:41 ` Eric Blake
2014-03-04 15:58 ` Anton Ivanov (antivano)
2014-03-04 16:04 ` Paolo Bonzini
2014-03-04 16:33 ` Eric Blake
2014-03-04 16:48 ` Anton Ivanov (antivano)
2014-03-04 16:55 ` Paolo Bonzini
2014-03-04 17:28 ` Anton Ivanov (antivano)
2014-03-04 17:30 ` Paolo Bonzini
2014-02-28 13:40 ` Eric Blake
2014-02-28 13:52 ` Anton Ivanov (antivano)
2014-02-28 13:57 ` Eric Blake
2014-02-28 14:03 ` Anton Ivanov (antivano)
2014-02-28 14:00 ` Paolo Bonzini
2014-02-28 15:06 ` Eric Blake
2014-02-28 15:20 ` Paolo Bonzini
2014-03-03 13:27 ` Stefan Hajnoczi
2014-03-03 14:01 ` Anton Ivanov (antivano)
2014-03-04 9:36 ` Stefan Hajnoczi
2014-03-04 9:47 ` Anton Ivanov (antivano)
2014-03-05 8:59 ` Stefan Hajnoczi
2014-03-05 9:13 ` Vincenzo Maffione
2014-03-03 14:53 ` Stefan Hajnoczi
2014-03-04 11:32 ` Anton Ivanov (antivano)
2014-03-05 9:07 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5315EFA6.1010600@cisco.com \
--to=antivano@cisco.com \
--cc=Qemu-devel@nongnu.org \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).