Skip to contentSkip to conversation

Test netmap on FreeBSD

PATCH In review Thomas Huth 4 participants 6 messages Oct 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Test netmap on FreeBSD

FreeBSD offers a package for "netmap", thus let's install it in our FreeBSD tests to get some compile test coverage for net/netmap.c, too.

---
 .cirrus.yml      | 2 +-
 tests/vm/freebsd | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +1 -1
index 8326a3a4b1..44fea2c29e 100644
@@ -8,7 +8,7 @@ freebsd_12_task:
     memory: 8G
   install_script: pkg install -y
     bash bison curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    netmap nettle perl5 pixman pkgconf png usbredir
   script:
     - mkdir build
     - cd build
tests/vm/freebsd +3 -0
index 2a19461a90..45821702bd 100755
@@ -54,6 +54,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: network
+        "netmap",
     ]
 
     BUILD_SCRIPT = """
Signature · 1 line
2.18.1
#1 lore raw

Hi Thomas,

Quoted 29 lines · Thomas Huth

FreeBSD offers a package for "netmap", thus let's install it in our FreeBSD tests to get some compile test coverage for net/netmap.c, too.

---
 .cirrus.yml      | 2 +-
 tests/vm/freebsd | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +1 -1
index 8326a3a4b1..44fea2c29e 100644
@@ -8,7 +8,7 @@ freebsd_12_task:
     memory: 8G
   install_script: pkg install -y
     bash bison curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    netmap nettle perl5 pixman pkgconf png usbredir
 
   script:
     - mkdir build

- cd build

tests/vm/freebsd +0 -0
index 2a19461a90..45821702bd 100755

tests/vm/freebsd class FreeBSDVM(basevm.BaseVM): · line 59

Quoted 6 lines
tests/vm/freebsd +3 -0
@@ -54,6 +54,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: network
+        "netmap",

IIRC netmap is shipped with the FreeBSD kernel, so we shouldn't need to install it.

I tried to understand what is the 'netmap' pkg and I found the following in my FreeBSD 12 VM:

    # pkg search netmap
    netmap-0.1.3_1         Make a graphical representation of the surrounding network

I don't think we are installing the right 'netmap' (I know, it is a bit confusing :) )

I'll tried "make vm-build-freebsd" without this patch and I noticed
"netmap support yes" in the configure output. So I think we're
already compiling the netmap backend in the 'vm-buil-freebsd' target and maybe also in cirrus.

Maybe Ed and Li-Wen can confirm (or not).

Thanks,
Stefano

#2 lore raw
Quoted 52 lines · Stefano Garzarella

Hi Thomas,

Quoted 29 lines · Thomas Huth

FreeBSD offers a package for "netmap", thus let's install it in our FreeBSD tests to get some compile test coverage for net/netmap.c, too.

---
 .cirrus.yml      | 2 +-
 tests/vm/freebsd | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +1 -1
index 8326a3a4b1..44fea2c29e 100644
@@ -8,7 +8,7 @@ freebsd_12_task:
     memory: 8G
   install_script: pkg install -y
     bash bison curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    netmap nettle perl5 pixman pkgconf png usbredir
 
   script:
     - mkdir build

- cd build

tests/vm/freebsd +0 -0
index 2a19461a90..45821702bd 100755

tests/vm/freebsd class FreeBSDVM(basevm.BaseVM): · line 59

Quoted 6 lines
tests/vm/freebsd +3 -0
@@ -54,6 +54,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: network
+        "netmap",

IIRC netmap is shipped with the FreeBSD kernel, so we shouldn't need to install it.

I tried to understand what is the 'netmap' pkg and I found the following in my FreeBSD 12 VM:

    # pkg search netmap
    netmap-0.1.3_1         Make a graphical representation of the surrounding network

I don't think we are installing the right 'netmap' (I know, it is a bit confusing :) )

Quoted 6 lines

I'll tried "make vm-build-freebsd" without this patch and I noticed
"netmap support yes" in the configure output. So I think we're
already compiling the netmap backend in the 'vm-buil-freebsd' target and maybe also in cirrus.

Maybe Ed and Li-Wen can confirm (or not).

Yes netmap(4) is a built-in and default feature on FreeBSD. netmap package from ports is not related to it.

BTW, I haven't tried qemu's netmap feature on FreeBSD. Is there anything we can test this more?

Best,
Li-Wen

#5 lore raw
In reply to Stefano Garzarella
Quoted 48 lines · Stefano Garzarella

Hi Thomas,

Quoted 29 lines · Thomas Huth

FreeBSD offers a package for "netmap", thus let's install it in our FreeBSD tests to get some compile test coverage for net/netmap.c, too.

---
 .cirrus.yml      | 2 +-
 tests/vm/freebsd | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +1 -1
index 8326a3a4b1..44fea2c29e 100644
@@ -8,7 +8,7 @@ freebsd_12_task:
     memory: 8G
   install_script: pkg install -y
     bash bison curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    netmap nettle perl5 pixman pkgconf png usbredir
 
   script:
     - mkdir build

- cd build

tests/vm/freebsd +0 -0
index 2a19461a90..45821702bd 100755

tests/vm/freebsd class FreeBSDVM(basevm.BaseVM): · line 59

Quoted 6 lines
tests/vm/freebsd +3 -0
@@ -54,6 +54,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: network
+        "netmap",

IIRC netmap is shipped with the FreeBSD kernel, so we shouldn't need to install it.

I tried to understand what is the 'netmap' pkg and I found the following in my FreeBSD 12 VM:

    # pkg search netmap
    netmap-0.1.3_1         Make a graphical representation of the surrounding network
Quoted 7 lines

I don't think we are installing the right 'netmap' (I know, it is a bit confusing :) )

I'll tried "make vm-build-freebsd" without this patch and I noticed
"netmap support yes" in the configure output. So I think we're
already compiling the netmap backend in the 'vm-buil-freebsd' target and maybe also in cirrus.

Oops, I think you're right. I just checked an older build on cirrus-ci
(without this patch), and indeed, it also says "netmap support yes"
in the output of "configure". So we already have a compile test for netmap :-)

Thus, please disregard this patch, it's not necessary indeed.

Thomas

#3 lore raw
In reply to Li-Wen Hsu

Il giorno mar 8 ott 2019 alle ore 11:53 Li-Wen Hsu <[email protected]> ha scritto:

Quoted 60 lines
Quoted 43 lines · Stefano Garzarella

Hi Thomas,

Quoted 29 lines · Thomas Huth

FreeBSD offers a package for "netmap", thus let's install it in our FreeBSD tests to get some compile test coverage for net/netmap.c, too.

---
 .cirrus.yml      | 2 +-
 tests/vm/freebsd | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +1 -1
index 8326a3a4b1..44fea2c29e 100644
@@ -8,7 +8,7 @@ freebsd_12_task:
     memory: 8G
   install_script: pkg install -y
     bash bison curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    netmap nettle perl5 pixman pkgconf png usbredir
 
   script:
     - mkdir build

- cd build

tests/vm/freebsd +0 -0
index 2a19461a90..45821702bd 100755

tests/vm/freebsd class FreeBSDVM(basevm.BaseVM): · line 59

Quoted 6 lines
tests/vm/freebsd +3 -0
@@ -54,6 +54,9 @@ class FreeBSDVM(basevm.BaseVM):
         # libs: opengl
         "libepoxy",
         "mesa-libs",
+
+        # libs: network
+        "netmap",

IIRC netmap is shipped with the FreeBSD kernel, so we shouldn't need to install it.

Quoted 5 lines

I tried to understand what is the 'netmap' pkg and I found the following in my FreeBSD 12 VM:

    # pkg search netmap
    netmap-0.1.3_1         Make a graphical representation of the

surrounding network

Quoted 9 lines

I don't think we are installing the right 'netmap' (I know, it is a bit confusing :) )

I'll tried "make vm-build-freebsd" without this patch and I noticed
"netmap support yes" in the configure output. So I think we're
already compiling the netmap backend in the 'vm-buil-freebsd' target and maybe also in cirrus.

Quoted 8 lines
Quoted 1 line

Maybe Ed and Li-Wen can confirm (or not).

Yes netmap(4) is a built-in and default feature on FreeBSD. netmap package from ports is not related to it.

BTW, I haven't tried qemu's netmap feature on FreeBSD. Is there anything we can test this more?

This is an example command line for a qemu VM with a vtnet interface connected to a port of a VALE switch called 'vale1':

qemu-system-x86_64 fbsd-head.qcow2 -smp 2 -m 2G -vga std -device e1000,netdev=mgmt,mac=00:AA:BB:CC:0a:99 -netdev user,id=mgmt,hostfwd=tcp::20010-:22 -device virtio-net-pci,netdev=data10,mac=00:AA:BB:CC:0a:0a,ioeventfd=on,mrg_rxbuf=on -netdev netmap,ifname=vale1:10,id=data10

Cheers,
Vincenzo

Quoted 4 lines

Best,
Li-Wen

#4 lore raw
In reply to Li-Wen Hsu

This is an example command line for a qemu VM with a vtnet interface connected to a port of a VALE switch called 'vale1':

qemu-system-x86_64 fbsd-head.qcow2 -smp 2 -m 2G -vga std -device e1000,netdev=mgmt,mac=00:AA:BB:CC:0a:99 -netdev user,id=mgmt,hostfwd=tcp::20010-:22 -device virtio-net-pci,netdev=data10,mac=00:AA:BB:CC:0a:0a,ioeventfd=on,mrg_rxbuf=on -netdev netmap,ifname=vale1:10,id=data10

Cheers,
Vincenzo