From: Christos Sfakianakis csfakian@redhat.com
All devices that have "to_guest" label are actually tap devices. They are renamed to 'tap' instead of 'eth' to avoid confusion.
Christos Sfakianakis (1): lnst.Recipes.ENRT: modify naming for tap devices
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 32 +++++++------- .../ENRT/VirtualBridgeVlanInGuestRecipe.py | 16 +++---- .../VirtualBridgeVlanInHostMirroredRecipe.py | 44 +++++++++---------- .../ENRT/VirtualBridgeVlanInHostRecipe.py | 22 +++++----- .../ENRT/VirtualBridgeVlansOverBondRecipe.py | 28 ++++++------ 5 files changed, 71 insertions(+), 71 deletions(-)
From: Christos Sfakianakis csfakian@redhat.com
Rename all devices that have "to_guest" label to tap[0-9] instead of eth[0-9] to avoid confusion.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- .../VirtualBridgeVlanInGuestMirroredRecipe.py | 32 +++++++------- .../ENRT/VirtualBridgeVlanInGuestRecipe.py | 16 +++---- .../VirtualBridgeVlanInHostMirroredRecipe.py | 44 +++++++++---------- .../ENRT/VirtualBridgeVlanInHostRecipe.py | 22 +++++----- .../ENRT/VirtualBridgeVlansOverBondRecipe.py | 28 ++++++------ 5 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py index d349d5b..60a30fa 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py @@ -12,17 +12,17 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch") - host1.eth1 = DeviceReq(label="to_guest1") + host1.tap0 = DeviceReq(label="to_guest1")
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch") - host2.eth1 = DeviceReq(label="to_guest2") + host2.tap0 = DeviceReq(label="to_guest2")
guest1 = HostReq() - guest1.eth0 = DeviceReq(label="to_guest1") + guest1.tap0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.eth0 = DeviceReq(label="to_guest2") + guest2.tap0 = DeviceReq(label="to_guest2")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -35,22 +35,22 @@ class VirtualBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2
host1.eth0.down() - host1.eth1.down() + host1.tap0.down() host1.br0 = BridgeDevice() host1.br0.slave_add(host1.eth0) - host1.br0.slave_add(host1.eth1) + host1.br0.slave_add(host1.tap0)
host2.eth0.down() - host2.eth1.down() + host2.tap0.down() host2.br0 = BridgeDevice() host2.br0.slave_add(host2.eth0) - host2.br0.slave_add(host2.eth1) + host2.br0.slave_add(host2.tap0)
- guest1.eth0.down() - guest1.vlan1 = VlanDevice(realdev=guest1.eth0, vlan_id=10) + guest1.tap0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10)
- guest2.eth0.down() - guest2.vlan1 = VlanDevice(realdev=guest2.eth0, vlan_id=10) + guest2.tap0.down() + guest2.vlan1 = VlanDevice(realdev=guest2.tap0, vlan_id=10)
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen @@ -75,14 +75,14 @@ class VirtualBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): guest2.vlan1.ip_add(ipaddress(net_addr6_1 + "::4/64"))
host1.eth0.up() - host1.eth1.up() + host1.tap0.up() host1.br0.up() host2.eth0.up() - host2.eth1.up() + host2.tap0.up() host2.br0.up() - guest1.eth0.up() + guest1.tap0.up() guest1.vlan1.up() - guest2.eth0.up() + guest2.tap0.up() guest2.vlan1.up()
#TODO better service handling through HostAPI diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py index 4a90a1b..736117f 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestRecipe.py @@ -12,13 +12,13 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInGuestRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch") - host1.eth1 = DeviceReq(label="to_guest") + host1.tap0 = DeviceReq(label="to_guest")
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch")
guest1 = HostReq() - guest1.eth0 = DeviceReq(label="to_guest") + guest1.tap0 = DeviceReq(label="to_guest")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -31,16 +31,16 @@ class VirtualBridgeVlanInGuestRecipe(BaseEnrtRecipe): host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1
host1.eth0.down() - host1.eth1.down() + host1.tap0.down() host1.br0 = BridgeDevice() host1.br0.slave_add(host1.eth0) - host1.br0.slave_add(host1.eth1) + host1.br0.slave_add(host1.tap0)
host2.eth0.down() host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id=10)
- guest1.eth0.down() - guest1.vlan1 = VlanDevice(realdev=guest1.eth0, vlan_id=10) + guest1.tap0.down() + guest1.vlan1 = VlanDevice(realdev=guest1.tap0, vlan_id=10)
#Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen @@ -63,11 +63,11 @@ class VirtualBridgeVlanInGuestRecipe(BaseEnrtRecipe): guest1.vlan1.ip_add(ipaddress(net_addr6_1 + "::3/64"))
host1.eth0.up() - host1.eth1.up() + host1.tap0.up() host1.br0.up() host2.eth0.up() host2.vlan1.up() - guest1.eth0.up() + guest1.tap0.up() guest1.vlan1.up()
#TODO better service handling through HostAPI diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py index e85b54c..2078920 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostMirroredRecipe.py @@ -12,17 +12,17 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch") - host1.eth1 = DeviceReq(label="to_guest1") + host1.tap0 = DeviceReq(label="to_guest1")
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch") - host2.eth1 = DeviceReq(label="to_guest2") + host2.tap0 = DeviceReq(label="to_guest2")
guest1 = HostReq() - guest1.eth0 = DeviceReq(label="to_guest1") + guest1.tap0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.eth0 = DeviceReq(label="to_guest2") + guest2.tap0 = DeviceReq(label="to_guest2")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -35,53 +35,53 @@ class VirtualBridgeVlanInHostMirroredRecipe(BaseEnrtRecipe): host1, host2, guest1, guest2 = self.matched.host1, self.matched.host2, self.matched.guest1, self.matched.guest2
host1.eth0.down() - host1.eth1.down() + host1.tap0.down() host1.vlan1 = VlanDevice(realdev=host1.eth0, vlan_id=10) host1.br0 = BridgeDevice() host1.br0.slave_add(host1.vlan1) - host1.br0.slave_add(host1.eth1) + host1.br0.slave_add(host1.tap0)
host2.eth0.down() - host2.eth1.down() + host2.tap0.down() host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id=10) host2.br0 = BridgeDevice() host2.br0.slave_add(host2.vlan1) - host2.br0.slave_add(host2.eth1) + host2.br0.slave_add(host2.tap0)
- guest1.eth0.down() + guest1.tap0.down()
- guest2.eth0.down() + guest2.tap0.down()
configuration = EnrtConfiguration() - configuration.endpoint1 = guest1.eth0 - configuration.endpoint2 = guest2.eth0 + configuration.endpoint1 = guest1.tap0 + configuration.endpoint2 = guest2.tap0
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host2.br0.mtu = self.params.mtu - guest1.eth0.mtu = self.params.mtu - guest2.eth0.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu + guest2.tap0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr6_1 = "fc00:0:0:1"
host1.br0.ip_add(ipaddress(net_addr_1 + ".1/24")) host2.br0.ip_add(ipaddress(net_addr_1 + ".2/24")) - guest1.eth0.ip_add(ipaddress(net_addr_1 + ".3/24")) - guest1.eth0.ip_add(ipaddress(net_addr6_1 + "::3/64")) - guest2.eth0.ip_add(ipaddress(net_addr_1 + ".4/24")) - guest2.eth0.ip_add(ipaddress(net_addr6_1 + "::4/64")) + guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest2.tap0.ip_add(ipaddress(net_addr_1 + ".4/24")) + guest2.tap0.ip_add(ipaddress(net_addr6_1 + "::4/64"))
host1.eth0.up() - host1.eth1.up() + host1.tap0.up() host1.vlan1.up() host1.br0.up() host2.eth0.up() - host2.eth1.up() + host2.tap0.up() host2.vlan1.up() host2.br0.up() - guest1.eth0.up() - guest2.eth0.up() + guest1.tap0.up() + guest2.tap0.up()
#TODO better service handling through HostAPI host1.run("service irqbalance stop") diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py index 1382b2b..4332767 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInHostRecipe.py @@ -12,13 +12,13 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInHostRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch") - host1.eth1 = DeviceReq(label="to_guest") + host1.tap0 = DeviceReq(label="to_guest")
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch")
guest1 = HostReq() - guest1.eth0 = DeviceReq(label="to_guest") + guest1.tap0 = DeviceReq(label="to_guest")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"), @@ -31,25 +31,25 @@ class VirtualBridgeVlanInHostRecipe(BaseEnrtRecipe): host1, host2, guest1 = self.matched.host1, self.matched.host2, self.matched.guest1
host1.eth0.down() - host1.eth1.down() + host1.tap0.down() host1.vlan1 = VlanDevice(realdev=host1.eth0, vlan_id=10) host1.br0 = BridgeDevice() host1.br0.slave_add(host1.vlan1) - host1.br0.slave_add(host1.eth1) + host1.br0.slave_add(host1.tap0)
host2.eth0.down() host2.vlan1 = VlanDevice(realdev=host2.eth0, vlan_id=10)
- guest1.eth0.down() + guest1.tap0.down()
configuration = EnrtConfiguration() - configuration.endpoint1 = guest1.eth0 + configuration.endpoint1 = guest1.tap0 configuration.endpoint2 = host2.vlan1
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host2.vlan1.mtu = self.params.mtu - guest1.eth0.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr6_1 = "fc00:0:0:1" @@ -57,16 +57,16 @@ class VirtualBridgeVlanInHostRecipe(BaseEnrtRecipe): host1.br0.ip_add(ipaddress(net_addr_1 + ".1/24")) host2.vlan1.ip_add(ipaddress(net_addr_1 + ".2/24")) host2.vlan1.ip_add(ipaddress(net_addr6_1 + "::2/64")) - guest1.eth0.ip_add(ipaddress(net_addr_1 + ".3/24")) - guest1.eth0.ip_add(ipaddress(net_addr6_1 + "::3/64")) + guest1.tap0.ip_add(ipaddress(net_addr_1 + ".3/24")) + guest1.tap0.ip_add(ipaddress(net_addr6_1 + "::3/64"))
host1.eth0.up() - host1.eth1.up() + host1.tap0.up() host1.vlan1.up() host1.br0.up() host2.eth0.up() host2.vlan1.up() - guest1.eth0.up() + guest1.tap0.up()
#TODO better service handling through HostAPI host1.run("service irqbalance stop") diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py index 587bd95..d9de4dd 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlansOverBondRecipe.py @@ -14,26 +14,26 @@ class VirtualBridgeVlansOverBondRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch") host1.eth1 = DeviceReq(label="to_switch") - host1.eth2 = DeviceReq(label="to_guest1") - host1.eth3 = DeviceReq(label="to_guest2") + host1.tap0 = DeviceReq(label="to_guest1") + host1.tap1 = DeviceReq(label="to_guest2")
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch") host2.eth1 = DeviceReq(label="to_switch") - host2.eth2 = DeviceReq(label="to_guest3") - host2.eth3 = DeviceReq(label="to_guest4") + host2.tap0 = DeviceReq(label="to_guest3") + host2.tap1 = DeviceReq(label="to_guest4")
guest1 = HostReq() - guest1.eth0 = DeviceReq(label="to_guest1") + guest1.tap0 = DeviceReq(label="to_guest1")
guest2 = HostReq() - guest2.eth0 = DeviceReq(label="to_guest2") + guest2.tap0 = DeviceReq(label="to_guest2")
guest3 = HostReq() - guest3.eth0 = DeviceReq(label="to_guest3") + guest3.tap0 = DeviceReq(label="to_guest3")
guest4 = HostReq() - guest4.eth0 = DeviceReq(label="to_guest4") + guest4.tap0 = DeviceReq(label="to_guest4")
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on"), @@ -70,18 +70,18 @@ class VirtualBridgeVlansOverBondRecipe(BaseEnrtRecipe): #Due to limitations in the current EnrtConfiguration #class, a single vlan test pair is chosen configuration = EnrtConfiguration() - configuration.endpoint1 = guest1.eth0 - configuration.endpoint2 = guest3.eth0 + configuration.endpoint1 = guest1.tap0 + configuration.endpoint2 = guest3.tap0
if "mtu" in self.params: host1.br0.mtu = self.params.mtu host1.br1.mtu = self.params.mtu host2.br0.mtu = self.params.mtu host1.br1.mtu = self.params.mtu - guest1.eth0.mtu = self.params.mtu - guest2.eth0.mtu = self.params.mtu - guest3.eth0.mtu = self.params.mtu - guest4.eth0.mtu = self.params.mtu + guest1.tap0.mtu = self.params.mtu + guest2.tap0.mtu = self.params.mtu + guest3.tap0.mtu = self.params.mtu + guest4.tap0.mtu = self.params.mtu
net_addr_1 = "192.168.10" net_addr_2 = "192.168.20"
Hello Christos. Could you please make one more change. I should have been more specific previously, sorry for that.
The thing is that devices labeled with "to_guest" are visible as tap devices from host and as ordinary eth devices from inside the guest.
This applies to phase2 recipes changes in your another patchset.
See the proposal below ...
Fri, Oct 26, 2018 at 10:22:23AM CEST, csfakian@redhat.com wrote:
From: Christos Sfakianakis csfakian@redhat.com
Rename all devices that have "to_guest" label to tap[0-9] instead of eth[0-9] to avoid confusion.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 32 +++++++------- .../ENRT/VirtualBridgeVlanInGuestRecipe.py | 16 +++---- .../VirtualBridgeVlanInHostMirroredRecipe.py | 44 +++++++++---------- .../ENRT/VirtualBridgeVlanInHostRecipe.py | 22 +++++----- .../ENRT/VirtualBridgeVlansOverBondRecipe.py | 28 ++++++------ 5 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py index d349d5b..60a30fa 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py @@ -12,17 +12,17 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch")
- host1.eth1 = DeviceReq(label="to_guest1")
- host1.tap0 = DeviceReq(label="to_guest1")a
This is ok, host1 sees the guest's interface as tap device.
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch")
- host2.eth1 = DeviceReq(label="to_guest2")
- host2.tap0 = DeviceReq(label="to_guest2")
This is ok, host2 sees the guest's interface as tap device.
guest1 = HostReq()
- guest1.eth0 = DeviceReq(label="to_guest1")
- guest1.tap0 = DeviceReq(label="to_guest1")
Here it should go like because from guest point of view it's an ethernet device: guest1.eth0 = DeviceReq(label="to_guest1")
guest2 = HostReq()
- guest2.eth0 = DeviceReq(label="to_guest2")
- guest2.tap0 = DeviceReq(label="to_guest2")
Same here ^^^
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"),
----- Original Message -----
From: "Jan Tluka" jtluka@redhat.com To: csfakian@redhat.com Cc: lnst-developers@lists.fedorahosted.org Sent: Thursday, November 1, 2018 1:29:20 PM Subject: Re: [PATCH-next 1/1] lnst.Recipes.ENRT: modify naming for tap devices
Hello Christos. Could you please make one more change. I should have been more specific previously, sorry for that.
No issue; I am sending v2 right now
The thing is that devices labeled with "to_guest" are visible as tap devices from host and as ordinary eth devices from inside the guest.
This applies to phase2 recipes changes in your another patchset.
See the proposal below ...
Fri, Oct 26, 2018 at 10:22:23AM CEST, csfakian@redhat.com wrote:
From: Christos Sfakianakis csfakian@redhat.com
Rename all devices that have "to_guest" label to tap[0-9] instead of eth[0-9] to avoid confusion.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 32 +++++++------- .../ENRT/VirtualBridgeVlanInGuestRecipe.py | 16 +++---- .../VirtualBridgeVlanInHostMirroredRecipe.py | 44 +++++++++---------- .../ENRT/VirtualBridgeVlanInHostRecipe.py | 22 +++++----- .../ENRT/VirtualBridgeVlansOverBondRecipe.py | 28 ++++++------ 5 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py index d349d5b..60a30fa 100644 --- a/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py +++ b/lnst/Recipes/ENRT/VirtualBridgeVlanInGuestMirroredRecipe.py @@ -12,17 +12,17 @@ from lnst.Devices import BridgeDevice class VirtualBridgeVlanInGuestMirroredRecipe(BaseEnrtRecipe): host1 = HostReq() host1.eth0 = DeviceReq(label="to_switch")
- host1.eth1 = DeviceReq(label="to_guest1")
- host1.tap0 = DeviceReq(label="to_guest1")a
This is ok, host1 sees the guest's interface as tap device.
host2 = HostReq() host2.eth0 = DeviceReq(label="to_switch")
- host2.eth1 = DeviceReq(label="to_guest2")
- host2.tap0 = DeviceReq(label="to_guest2")
This is ok, host2 sees the guest's interface as tap device.
guest1 = HostReq()
- guest1.eth0 = DeviceReq(label="to_guest1")
- guest1.tap0 = DeviceReq(label="to_guest1")
Here it should go like because from guest point of view it's an ethernet device: guest1.eth0 = DeviceReq(label="to_guest1")
guest2 = HostReq()
- guest2.eth0 = DeviceReq(label="to_guest2")
- guest2.tap0 = DeviceReq(label="to_guest2")
Same here ^^^
offload_combinations = Param(default=( dict(gro="on", gso="on", tso="on", tx="on", rx="on"),
LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedorahos...
On Fri, Oct 26, 2018 at 10:22:23AM +0200, csfakian@redhat.com wrote:
From: Christos Sfakianakis csfakian@redhat.com
Rename all devices that have "to_guest" label to tap[0-9] instead of eth[0-9] to avoid confusion.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com
btw, you don't have to create a cover letter for every patchset. It makes sense for longer patchsets that maybe have a common theme or multiple themes that aren't immediatelly understood from the individual commit messages. But if you're just sending a single patch it's unlikely that it needs more explanation than what the commit message already contains.
Not an issue, just saying you can save yourself some work next time :).
-Ondrej
lnst-developers@lists.fedorahosted.org