All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqemu: support multiple NICs
@ 2020-03-04  8:14 Freihofer, Adrian
  2020-03-04  8:32 ` ✗ patchtest: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Freihofer, Adrian @ 2020-03-04  8:14 UTC (permalink / raw)
  To: openembedded-core

Emulating more than one network interface with runqemu is sometimes a
bit tricky, but possible. For example, this leads to an emulated device
with eth0 and eth1:

QB_NETWORK_DEVICE_prepend = " \
    -device virtio-neti-device,mac=52:54:00:12:34:03 \
"

On some emulated NIC types, Qemu and the kernel enumerate the eths in
the guest in reverse order to how the device parameters are passed to
Qemu. So in this case it is important that the additional NICs are
prepended to the -device parameter, which gets automatically added by
Qemu. Otherwise, the interface eth1 will be connected to the host, but
eth0 will be assigned the IP address 192.168.7.x, which obviously does
not work.

When booting Qemu with two NICs, but only one set of network
configuration parameters passed to the kernel, the kernel seems to
search for a configuration for all NICs. This delays the boot process
for a very long time.

This change solves the timeout problem. Tested with:
 oe-selftest --run-tests runqemu
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index dd0aa4b28f..d34f8eec25 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1147,7 +1147,7 @@ class BaseConfig(object):
         client = gateway + 1
         if self.fstype == 'nfs':
             self.setup_nfs()
-        netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0" %
(client, gateway)
+        netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0::eth0" %
(client, gateway)
         logger.info("Network configuration: %s", netconf)
         self.kernel_cmdline_script += " ip=%s" % netconf
         mac = "%s%02x" % (self.mac_tap, client)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for runqemu: support multiple NICs
  2020-03-04  8:14 [PATCH] runqemu: support multiple NICs Freihofer, Adrian
@ 2020-03-04  8:32 ` Patchwork
  2020-03-04  8:33 ` [PATCH v2] " Freihofer, Adrian
  2020-03-04  9:02 ` ✗ patchtest: failure for runqemu: support multiple NICs (rev2) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2020-03-04  8:32 UTC (permalink / raw)
  To: Adrian Freihofer; +Cc: openembedded-core

== Series Details ==

Series: runqemu: support multiple NICs
Revision: 1
URL   : https://patchwork.openembedded.org/series/23080/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series cannot be parsed correctly due to malformed diff lines [test_mbox_format] 
  Suggested fix    Create the series again using git-format-patch and ensure it can be applied using git am
  Diff line        (client, gateway)


* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at d6b1809e8c)

* Patch            runqemu: support multiple NICs
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] runqemu: support multiple NICs
  2020-03-04  8:14 [PATCH] runqemu: support multiple NICs Freihofer, Adrian
  2020-03-04  8:32 ` ✗ patchtest: failure for " Patchwork
@ 2020-03-04  8:33 ` Freihofer, Adrian
  2020-03-04  9:02 ` ✗ patchtest: failure for runqemu: support multiple NICs (rev2) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Freihofer, Adrian @ 2020-03-04  8:33 UTC (permalink / raw)
  To: openembedded-core

Emulating more than one network interface with runqemu is sometimes a
bit tricky, but possible. For example, this leads to an emulated device
with eth0 and eth1:

QB_NETWORK_DEVICE_prepend = " \
    -device virtio-neti-device,mac=52:54:00:12:34:03 \
"

On some emulated NIC types, Qemu and the kernel enumerate the eths in
the guest in reverse order to how the device parameters are passed to
Qemu. So in this case it is important that the additional NICs are
prepended to the -device parameter, which gets automatically added by
Qemu. Otherwise, the interface eth1 will be connected to the host, but
eth0 will be assigned the IP address 192.168.7.x, which obviously does
not work.

When booting Qemu with two NICs, but only one set of network
configuration parameters passed to the kernel, the kernel seems to
search for a configuration for all NICs. This delays the boot process
for a very long time.

This change solves the timeout problem. Tested with:
 oe-selftest --run-tests runqemu

Signed-off-by: Adrian Freihofer <adrian.freihofer at siemens.com>
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index dd0aa4b28f..d34f8eec25 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1147,7 +1147,7 @@ class BaseConfig(object):
         client = gateway + 1
         if self.fstype == 'nfs':
             self.setup_nfs()
-        netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0" %
(client, gateway)
+        netconf = "192.168.7.%s::192.168.7.%s:255.255.255.0::eth0" %
(client, gateway)
         logger.info("Network configuration: %s", netconf)
         self.kernel_cmdline_script += " ip=%s" % netconf
         mac = "%s%02x" % (self.mac_tap, client)
-- 

Siemens Schweiz AG, Smart Infrastructure
SI BP R&D ZG FW CCP
Theilerstrasse 1a
6300 Zug, Switzerland
Mobile: +41 796819596



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for runqemu: support multiple NICs (rev2)
  2020-03-04  8:14 [PATCH] runqemu: support multiple NICs Freihofer, Adrian
  2020-03-04  8:32 ` ✗ patchtest: failure for " Patchwork
  2020-03-04  8:33 ` [PATCH v2] " Freihofer, Adrian
@ 2020-03-04  9:02 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2020-03-04  9:02 UTC (permalink / raw)
  To: Adrian Freihofer; +Cc: openembedded-core

== Series Details ==

Series: runqemu: support multiple NICs (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/23080/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series cannot be parsed correctly due to malformed diff lines [test_mbox_format] 
  Suggested fix    Create the series again using git-format-patch and ensure it can be applied using git am
  Diff line        (client, gateway)


* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at d6b1809e8c)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-04  9:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04  8:14 [PATCH] runqemu: support multiple NICs Freihofer, Adrian
2020-03-04  8:32 ` ✗ patchtest: failure for " Patchwork
2020-03-04  8:33 ` [PATCH v2] " Freihofer, Adrian
2020-03-04  9:02 ` ✗ patchtest: failure for runqemu: support multiple NICs (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.