From nobody Fri May 3 17:53:14 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zohomail.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com;
dmarc=fail(p=none dis=none) header.from=uniudc.com
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1544531242384343.7252134816147;
Tue, 11 Dec 2018 04:27:22 -0800 (PST)
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
[10.5.11.13])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id ED94830820F3;
Tue, 11 Dec 2018 12:27:18 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id DFCE4608F7;
Tue, 11 Dec 2018 12:27:17 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
(lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
by colo-mx.corp.redhat.com (Postfix) with ESMTP id 85F70181B9E4;
Tue, 11 Dec 2018 12:27:14 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
[10.5.11.14])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id wBBCRC1W008397 for ;
Tue, 11 Dec 2018 07:27:12 -0500
Received: by smtp.corp.redhat.com (Postfix)
id 6F75C5D977; Tue, 11 Dec 2018 12:27:12 +0000 (UTC)
Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com
[10.5.110.29])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 672895DD7A
for ; Tue, 11 Dec 2018 12:27:09 +0000 (UTC)
Received: from m21397.mail.qiye.163.com (m21397.mail.qiye.163.com
[223.252.213.97])
by mx1.redhat.com (Postfix) with ESMTP id B60C137E8F
for ; Tue, 11 Dec 2018 12:27:04 +0000 (UTC)
Received: from cvknode54.localdomain (unknown [106.37.239.65])
by m21397.mail.qiye.163.com (Hmail) with ESMTPA id DDF681445F5;
Tue, 11 Dec 2018 20:27:02 +0800 (CST)
From: luzhipeng@uniudc.com
To: libvir-list@redhat.com
Date: Tue, 11 Dec 2018 20:26:54 +0800
Message-Id: <1544531214-2080437-1-git-send-email-luzhipeng@uniudc.com>
X-HM-Spam-Status: e1kIGBQJHllBS1VLV1koWUFITzdXWS1ZQUlXWQkOFx4IWUFZMjUtOjcyP0
FLVUtZBg++
X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6K1E6CTo6LjkPHRwWVgEDNAtI
VkNPCwlVSlVKTk9PTkhKSUlISUlLVTMWGhIXVRcOARMSCx4VHDsOFRIOHxhVGBQWRVlXWRILWUFZ
SktNVUhMVUlIQlVNTllXWQgBWUFKSkNJQjcG
X-HM-Tid: 0a679d3c21f67f6bkuukddf681445f5
X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216
matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.29]); Tue, 11 Dec 2018 12:27:06 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.29]);
Tue, 11 Dec 2018 12:27:06 +0000 (UTC) for IP:'223.252.213.97'
DOMAIN:'m21397.mail.qiye.163.com'
HELO:'m21397.mail.qiye.163.com' FROM:'luzhipeng@uniudc.com' RCPT:''
X-RedHat-Spam-Score: -0.011 (RCVD_IN_DNSWL_NONE,
SPF_PASS) 223.252.213.97 m21397.mail.qiye.163.com
223.252.213.97 m21397.mail.qiye.163.com
X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-loop: libvir-list@redhat.com
Cc: ZhiPeng Lu
Subject: [libvirt] [PATCH v4 RESEND] openvswitch: Add new port VLAN mode
"dot1q-tunnel"(802.1ad double-tagged)
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]);
Tue, 11 Dec 2018 12:27:19 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
From: ZhiPeng Lu
This patch adds functionality to allow libvirt to configure the 'dot1q-tunn=
el'
modes(802.1ad double-tagged) on openvswitch networks.
For example:
Signed-off-by: ZhiPeng Lu
---
v1->v2:
1. Fix "make syntax-check" failure
v2->v3:
1. remove other_config when updating vlan
v3->v4:
1. add commit message that has a brief description of the new
feature
2. add tests for 'dot1q-tunnel' vlan mode
docs/formatdomain.html.in | 20 ++++++++++++++--=
----
docs/formatnetwork.html.in | 20 +++++++++++-----=
----
docs/schemas/networkcommon.rng | 1 +
src/conf/netdev_vlan_conf.c | 2 +-
src/util/virnetdevopenvswitch.c | 7 +++++++
src/util/virnetdevvlan.h | 1 +
tests/networkxml2xmlin/openvswitch-net.xml | 9 +++++++++
tests/networkxml2xmlout/openvswitch-net.xml | 9 +++++++++
.../openvswitch-net-modified.xml | 9 +++++++++
.../openvswitch-net-more-portgroups.xml | 9 +++++++++
.../openvswitch-net-without-alice.xml | 9 +++++++++
11 files changed, 80 insertions(+), 16 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 84259c4..ced21c0 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -6085,8 +6085,14 @@ qemu-kvm -net nic,model=3D? /dev/null
<tag id=3D'42'/><tag id=3D'123' nativeMode=3D'untagged'/></vlan>
- ...
</interface>
+ <interface type=3D'bridge'>
+ <vlan trunk=3D'yes'>
+ <tag id=3D'42'/>
+ <tag id=3D'123' nativeMode=3D'dot1q-tunnel'/>
+ </vlan>
+ </interface>
+...
</devices>
...
=20
@@ -6122,11 +6128,13 @@ qemu-kvm -net nic,model=3D? /dev/null
For network connections using Open vSwitch it is also possible
- to configure 'native-tagged' and 'native-untagged' VLAN modes
- Since 1.1.0. This is done with the
- optional nativeMode attribute on
- the <tag> subelement: nativeMode
- may be set to 'tagged' or 'untagged'. The id
+ to configure 'native-tagged' and 'native-untagged'
+ Since 1.1.0. and 'dot1q-tunnel'
+ (802.1ad double-tagged) Since 5.0.0.
+ VLAN modes This is done with the optional nativeMode
+ attribute on the <tag> subelement:
+ nativeMode may be set to 'tagged' or 'untagged' or
+ 'dot1q-tunnel'. The id
attribute of the <tag> subelement
containing nativeMode sets which VLAN is considered
to be the "native" VLAN for this interface, and
diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index 363a72b..d9ac9f7 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
@@ -688,16 +688,18 @@
For network connections using Open vSwitch it is also possible
- to configure 'native-tagged' and 'native-untagged' VLAN modes
- Since 1.1.0. This is done with the
- optional nativeMode attribute on
- the <tag> subelement: nativeMode
- may be set to 'tagged' or 'untagged'. The id
- attribute of the <tag> subelement
- containing nativeMode sets which VLAN is considered
- to be the "native" VLAN for this interface, and
+ to configure 'native-tagged' and 'native-untagged'
+ Since 1.1.0.
+ and 'dot1q-tunnel'(802.1ad double-tagged) VLAN modes.
+ Since 5.0.0. This is done with the
+ optional nativeMode attribute on the
+ <tag> subelement: nativeMode
+ may be set to 'tagged' or 'untagged' or 'dot1q-tunnel'.
+ The id attribute of the <tag>
+ subelement containing nativeMode sets which VLAN is
+ considered to be the "native" VLAN for this interface, and
the nativeMode attribute determines whether or not
- traffic for that VLAN will be tagged.
+ traffic for that VLAN will be tagged or QinQ.