Slackware-current FDIO VPP

Ongoing work to get VPP working on slackware-current …. draft draft draft

Warnings:

VPP won’t compile on Slackware ( and probably other distrib ) running on the latest GLIBC 2.27.

I’ve been able to build VPP on GLIBC 2.26.

I did not check on 14.2 which still runs 2.23.

https://lists.fd.io/g/vpp-dev/topic/10852663#8168

Test Setups:

  • Slackware-current: latest kernel available is 4.14.17
  • Intel Xeon D -1540 ( 8cores/16threads @ 2.00gHz )
  • 2* 10G baseT ports based on intel X552/X557-AT ( integrated to motherboard )
  • 2* 1G baseT ports based on intel I350 ( integrated to motherboard )

Another test config:

  • Slackware-current: latest kernel available is 4.14.17
  • Intel C2750 ( 8cores/8threads @ 2.40gHz )
  • 4*1G baseT ports based on intel I354 ( integrated to motherboard )

Dependencies:

Clone VPP repo

git clone https://github.com/FDio/vpp.git

I took the latest stable to build VPP, v18.01 and tried to test the compilation ( try to `make` alone will print you all possible option ).

Got error about numa.h not found

:~/dev/vpp (master) # git checkout v18.01
:~/dev/vpp ((v18.01)) #
:~/dev/vpp ((v18.01)) # make test
ake -C /root/dev/vpp/build-root PLATFORM=vpp TAG=vpp vpp-install
make[1]: Entering directory '/root/dev/vpp/build-root'
@@@@ Arch for platform 'vpp' is native @@@@
@@@@ Finding source for dpdk @@@@
<---- output suppressed ---->
== Build lib/librte_compat
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/eal
  CC eal_memory.o
/root/dev/vpp/build-root/build-vpp-native/dpdk/dpdk-17.11/lib/librte_eal/linuxapp/eal/eal_memory.c:56:10: fatal error: numa.h: No such file or directory
 #include <numa.h>
          ^~~~~~~~
compilation terminated.
make[11]: *** [/root/dev/vpp/build-root/build-vpp-native/dpdk/dpdk-17.11/mk/internal/rte.compile-pre.mk:138: eal_memory.o] Error 1

Okay, I’m missing libnuma

Let’s built it from slackbuilds.org where you can find numactl – which contains libnuma. ( need probably a way to build libnuma alone ? )

https://slackbuilds.org/repository/14.2/system/numactl/?search=libnuma

Next error after libnuma install, java compiler is missing

checking for submit_job_sse in -lIPSec_MB... yes
checking for submit_job_sse in -lIPSec_MB... (cached) yes
checking for LIBRTE_MLX4_PMD in rte_config.h... no
checking for LIBRTE_MLX5_PMD in rte_config.h... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking /usr/lib64/jvm/bin for Java 8 compiler... no
checking /usr/lib64/jvm/include for Java 8 compiler... no
checking /usr/lib64/jvm/jre for Java 8 compiler... no
checking /usr/lib64/jvm/jvm-exports for Java 8 compiler... no
checking /usr/lib64/jvm/lib for Java 8 compiler... no
configure: error: Could not find Java 8 compiler
make[1]: *** [Makefile:639: vpp-configure] Error 1
make[1]: Leaving directory '/root/dev/vpp/build-root'
make: *** [Makefile:368: test] Error 2
:~/dev/vpp ((v18.01.1)) # 

Let’s go for JDK install: https://slackbuilds.org/repository/14.2/development/jdk/

Once installed, got the exact same error euh ? `which java` returned nothing…

I’ve seen in other java slackbuilds that you might need to reboot the box to have /etc/profile.d filled. I did check that much and decide to reboot …. and java was found ( yeah).

After 2nd though, I decided to take a look in /etc/profile.d/ and there are new files like jdk.sh and jdk.csh, what it bassicaly do is exporting JAVA paths -_-

I guess a source of /etc/profile.d/jdk.sh would have been enough. Maybe a logout/login also as profile.d would have been called… anyway…next time 🙂

Then after restart compilation,  got another error, about `./ylwrap` file is missing, and ask you to exec `automake –add-missing` to fix. Well got some time to figure out that you need to exec it from the `src/` directory.

 lb                      yes
  memif                   yes
  pppoe                   yes
  sixrd                   yes
  nat                     yes
  stn                     yes
  l2e                     yes
==============================================================================
@@@@ Building vpp in /root/dev/vpp/build-root/build-vpp_debug-native/vpp @@@@
make[2]: Entering directory '/root/dev/vpp/build-root/build-vpp_debug-native/vpp'
 cd /root/dev/vpp/build-data/../src && /bin/sh /root/dev/vpp/src/missing automake-1.15 --foreign
configure.ac: error: required file './ylwrap' not found
configure.ac:   'automake --add-missing' can install 'ylwrap'
make[2]: *** [Makefile:4048: /root/dev/vpp/build-data/../src/Makefile.in] Error 1
make[2]: Leaving directory '/root/dev/vpp/build-root/build-vpp_debug-native/vpp'
make[1]: *** [Makefile:686: vpp-build] Error 2
make[1]: Leaving directory '/root/dev/vpp/build-root'
make: *** [Makefile:328: build] Error 2
:~/dev/vpp ((v18.01.1)) # 
:~/dev/vpp ((v18.01.1)) # 
:~/dev/vpp ((v18.01.1)) # cd /root/dev/vpp/build-data/../src/ && /bin/sh /root/dev/vpp/src/missing automake-1.15 --add-missing
configure.ac: installing './ylwrap'
:~/dev/vpp/src ((v18.01.1)) # 

Once done, I’ve restarted the test, and another error

/root/dev/vpp/src/vpp-api/vapi/vapi_c_gen.py --prefix /root/dev/vpp/build-root/vapi_test/ fake.api.json
cc -o /root/dev/vpp/build-root/vapi_test/vapi_c_test -std=gnu99 -g -Wall -pthread -I/root/dev/vpp/src -I/root/dev/vpp/build-root/install-vpp-native//vpp/include -I/root/dev/vpp/build-root/vapi_test/ vapi_c_test.c -L/root/dev/vpp/build-root/build-vpp-native/vpp/.libs/ -L/root/dev/vpp/build-root/build-vpp-native/vpp/vpp-api/vapi/.libs/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lrt -lm -lvapiclient -lsubunit
vapi_c_test.c:24:10: fatal error: check.h: No such file or directory
 #include <check.h>
          ^~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:32: /root/dev/vpp/build-root/vapi_test/vapi_c_test] Error 1
make[2]: Leaving directory '/root/dev/vpp/test/ext'
make[1]: *** [Makefile:121: ext] Error 2
make[1]: Leaving directory '/root/dev/vpp/test'
make: *** [Makefile:368: test] Error 2

I need to find the ‘libcheck’ avail also from slackbuilds.org at https://slackbuilds.org/repository/14.2/development/check/

New error about not finding libsubunit

Finished processing dependencies for vpp-papi==1.4
make -C ext
make[2]: Entering directory '/root/dev/vpp/test/ext'
mkdir -p /root/dev/vpp/build-root/vapi_test/
/root/dev/vpp/src/vpp-api/vapi/vapi_c_gen.py --prefix /root/dev/vpp/build-root/vapi_test/ fake.api.json
cc -o /root/dev/vpp/build-root/vapi_test/vapi_c_test -std=gnu99 -g -Wall -pthread -I/root/dev/vpp/src -I/root/dev/vpp/build-root/install-vpp-native//vpp/include -I/root/dev/vpp/build-root/vapi_test/ vapi_c_test.c -L/root/dev/vpp/build-root/build-vpp-native/vpp/.libs/ -L/root/dev/vpp/build-root/build-vpp-native/vpp/vpp-api/vapi/.libs/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lrt -lm -lvapiclient -lsubunit
/usr/lib64/gcc/x86_64-slackware-linux/7.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lsubunit
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:32: /root/dev/vpp/build-root/vapi_test/vapi_c_test] Error 1
make[2]: Leaving directory '/root/dev/vpp/test/ext'
make[1]: *** [Makefile:121: ext] Error 2
make[1]: Leaving directory '/root/dev/vpp/test'
make: *** [Makefile:368: test] Error 2

From the VPP-DEV mailling list, https://lists.fd.io/pipermail/vpp-dev/2017-October/006857.html it seems that issue comes from the install of  `check` used to require lsubunit as of < 0.10 version

monkey patching the test/ext/Makefile to avoid using libsubunit for slackware on top on opensuse.

ifeq ($(OS_ID), $(filter slackware,$(OS_ID)) $(filter opensuse,$(OS_ID)),$(OS_ID))

/!\ It seems too `fall in service` somehow so need rework. /!\

then test are running but got lot of VPP crash during tests, and upon restart, not alway on the same test…  which means that stability is not fully there for VPP on my system…..

typically stuff like:

VPP subprocess died unexpectedly with returncode -6 [unknown]
==============================================================================
Basic test for IPSEC using AH transport and Tunnel mode
==============================================================================
ipsec ah v4 transport basic test                                         OK
ipsec ah v4 transport burst test                                         OK
ipsec ah 4o4 tunnel basic test                                           OK
ipsec ah 4o4 tunnel burst test                                           OK
==============================================================================
UDP Encap Test Case 
==============================================================================
01:13:06,235 VPP subprocess died unexpectedly with returncode -6 [unknown]
01:13:06,235 Core file present, debug with: gdb /root/dev/vpp/build-root/install-vpp-native/vpp/bin/vpp /tmp/vpp-unittest-TestUdpEncap-BV72B1/core
01:13:06,237 [Errno 17] File exists
UDP Encap test                                                           ERROR [ temp dir used by test case: /tmp/vpp-unittest-TestUdpEncap-BV72B1 ]
==============================================================================
CRUD Loopback
==============================================================================
test_crud (test_interface_crud.TestLoopbackInterfaceCRUD)                ERROR [ temp dir used by test case: /tmp/vpp-unittest-TestLoopbackInterfaceCRUD-j83o7s ]
01:13:13,586 [Errno 17] File exists
test_down (test_interface_crud.TestLoopbackInterfaceCRUD)                ERROR [ temp dir used by test case: /tmp/vpp-unittest-TestLoopbackInterfaceCRUD-j83o7s ]
==============================================================================

I decided to build it anyway following FDIO doc: https://wiki.fd.io/view/VPP/Build,_install,_and_test_images#Build.2C_Install.2C_and_Test_VPP_without_using_Packages

:~/dev/vpp (stable/1801) # make build-release

Seems to build fine then…..couple of warning but not critical to fail the build.

Following the doc after a succesfull build

:~ # mkdir dev/sandbox/vpp -p
:~ # cat dev/sandbox/vpp/vpp.sh # script adapted from FDIO doc.

#!/usr/bin/bash

T=/root/dev/vpp/build-root/install-vpp-native/vpp

echo 'removing old stuff'
sudo /bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || return

echo 'loading module uio_pci_generic'
sudo /sbin/modprobe uio_pci_generic || return

echo 'starting VPP with its config file'
sudo $T/bin/vpp -c /etc/vpp/startup.conf


:~/dev/vpp (stable/1801) # mkdir /etc/vpp
:~/dev/vpp (stable/1801) # cp src/vpp/conf/startup.conf /etc/vpp/startup.conf

you might have thgis kind of warning:

:~ # source dev/sandbox/vpp/vpp.sh 
vlib_plugin_early_init:356: plugin path /usr/lib/vpp_plugins
api_segment_config: group vpp does not exist
Aborted

that can be easily fixed by creating the group, and adding your user to it. I work as root here, but need obviously to make it usable for a non-root user as well. As it’s POC/test at the moment, I focus on the making VPP work.

:~ # groupadd vpp
:~ # usermod -aG  vpp root

Then VPP seems to start fine 🙂

:~ # source /root/dev/sandbox/vpp/vpp.sh
removing old stuff
loading module uio_pci_generic
starting VPP with its config file
vlib_plugin_early_init:356: plugin path /root/dev/vpp/build-root/build-vpp-native/vpp/plugins/

in another terminal: use `vppctl` to get to the VPP prompt, you probably want to add the path ( or symlink ) to the correct executable path.

:~/dev/vpp/build-root/build-vpp-native/vpp/bin (stable/1801) # ls
summary_stats_client*  vpp*  vpp_get_metrics*  vppctl*
:~/dev/vpp/build-root/build-vpp-native/vpp/bin (stable/1801) # ./vppctl
    _______    _        _   _____  ___ 
 __/ __/ _ \  (_)__    | | / / _ \/ _ \
 _/ _// // / / / _ \   | |/ / ___/ ___/
 /_/ /____(_)_/\___/   |___/_/  /_/    

vpp# 
vpp# 
vpp# 
vpp# quit
:~/dev/vpp/build-root/build-vpp-native/vpp/bin (stable/1801) #

 

 

 

 

 

 

 

 

 

Slackware-current kernel 4.14.15 and VMware workstation 12.5. vmnet/vmmon modules issues

Since my recent kernel upgrades to the 4.14. tree, got troubles using vmware workstation. Especially logs about unable to build kernels modules, VMNET and VMMON.

First… the UI would not start after install of WS12.5.9.  From logs, got the `Unable to load libfontconfig.so.1` classic problem.

Solution found here several month ago, and it’s still works: https://malisa.wordpress.com/2017/07/06/vmware-workstation-12-5-7-on-slackware-14-2-current-kernel-4-9-35/

# cd /usr/lib/vmware/lib/libz.so.1
# mv libz.so.1 libz.so.1.old
# ln -s /usr/lib64/libz.so.1 .

Then I could start the  Workstation GUI, but with my new kernel, got a message about rebuilding kernel modules, makes sense:

Tested on VMware Workstation 12.5.7 and latest 12.5.9 ( got no license for 14.1 )

From net searches, seems to be related to kernel code change since 4.13 tree. It’s fixed in workstation 14.0/1 from the VMware release notes, but it’s not backported in 12.5….

To fix, got no credit but I hope to make you save some time…

Found a lot of discussion on VMware forum, with various patches and so on, finally, I ended up just cloning the repos from mkubecek on github: https://github.com/mkubecek/vmware-host-modules

It has done magic for me, cause it just worked out of the box  🙂

#clone repos
:~/vmware # git clone https://github.com/mkubecek/vmware-host-modules.git
Cloning into 'vmware-host-modules'...
remote: Counting objects: 639, done.
remote: Total 639 (delta 0), reused 0 (delta 0), pack-reused 639
Receiving objects: 100% (639/639), 657.40 KiB | 1.46 MiB/s, done.
Resolving deltas: 100% (445/445), done.
:~/vmware #
:~/vmware # cd vmware-host-modules/
:~/vmware/vmware-host-modules (master) #

# checkout the branch matching your release.
:~/vmware/vmware-host-modules (master) # git checkout origin/workstation-12.5.9
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # ls
LICENSE README vmmon-only/ vmnet-only/
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) #

I’ve been to vmnet-only and vmmon-only directory then try to `make` module ( if  it won’t build here, it will not build as well with vmware tool – it was building fine 😉 )

If it builds okay, then you can replace the vmnet/vmmom from upstream.

# build the archive
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # tar cf vmmon.tar vmmon-only
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # tar cf vmnet.tar vmnet-only

# backup the old module source ( just in case.. )
cp /usr/lib/vmware/modules/source/vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar.12.5.9.bk
cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar.12.5.9.bk

# replace upstream module source
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # cp vmmon.tar /usr/lib/vmware/modules/source/
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # cp vmnet.tar /usr/lib/vmware/modules/source/

 

Then you can try to build and install the modules with the vmware-modconfig utility

# vmware-modconfig --console --install-all

vmare-modconfig restart vmware services at the end of the module install, all green

<SNIP>
Starting VMware services:
   Virtual machine monitor                  [ OK ]
   Virtual machine communication interface  [ OK ]
   VM communication interface socket family [ OK ]
   Blocking file system                     [ OK ]
   Virtual ethernet                         [ OK ]
   VMware Authentication Daemon             [ OK ]
   Shared Memory Available                  [ OK ]
:/usr/lib/vmware/modules/source #

Then you can start vmware, the GUI popped up for me 🙂

 

Enjoy!

 

 

 

LILO Warning: Video adapter does not support VESA BIOS extensions needed for display of 256 colors

I was struggling with that warning when running LILO and the bitmap menu.
I could not find the reason why and choose to fallback to the classic text menu, here is how

I couldn’t remember how long I got the message from LILO warning me about my video card not supporting the correct VESA BIOS extension, but it was annoying.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<--- SNIP --->

Reading boot sector from /dev/sda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/slack.bmp
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.

<--- SNIP --->

One warning was issued.
#

Falling back to TEXT only  will show  you at each boot the LILO boot: prompt.

LILO prompt

If you wait or press [ENTER] it will boot the default kernel, [TAB] will show the different entries available in lilo’s config.

I wanted something more “user friendly” and if I can’t have my beloved Slackware logo, so be it : I’ll go back to the classic LILO menu. Which looks like a redish ncurses menu <3.

Here is my lilo config –  nothing fancy – I just needed to comment the bitmap option to enable the Standard LILO menu.

# LILO configuration file                                                                                                                                                                                                                                                        
# generated by 'liloconfig'                                                                                                                                                                                                                                                      
#                                                                                                                                                                                                                                                                                
# Start LILO global section                                                                                                                                                                                                                                                      
# Append any additional kernel parameters:                                                                                                                                                                                                                                       
append=" "                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                 
boot = /dev/sda                                                                                                                                                                                                                                                                  
#compact        # faster, but won't work on all systems.                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                 
lba32                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                 
# Default kernel to boot: usually the latest generic in-tree kernel                                                                                                                                                                                                              
default=gen-4.14.12                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                 
# Boot BMP Image.                                                                                                                                                                                                                                                                
# Bitmap in BMP format: 640x480x8                                                                                                                                                                                                                                                
#  bitmap = /boot/slack.bmp                                                                                                                                                                                                                                                      
# Menu colors (foreground, background, shadow, highlighted                                                                                                                                                                                                                       
# foreground, highlighted background, highlighted shadow):                                                                                                                                                                                                                       
#  bmp-colors = 255,0,255,0,255,0                                                                                                                                                                                                                                                
# Location of the option table: location x, location y, number of                                                                                                                                                                                                                
# columns, lines per column (max 15), "spill" (this is how many                                                                                                                                                                                                                  
# entries must be in the first column before the next begins to                                                                                                                                                                                                                  
# be used.  We don't specify it here, as there's just one column.                                                                                                                                                                                                                
#  bmp-table = 60,6,1,16                                                                                                                                                                                                                                                         
# Timer location x, timer location y, foreground color,                                                                                                                                                                                                                          
# background color, shadow color.                                                                                                                                                                                                                                                
#  bmp-timer = 65,27,0,255                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                 
# Standard menu.                                                                                                                                                                                                                                                                 
# Or, you can comment out the bitmap menu above and                                                                                                                                                                                                                              
# use a boot message with the standard menu:                                                                                                                                                                                                                                     
#message = /boot/boot_message.txt                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                 
# Wait until the timeout to boot (if commented out, boot the                                                                                                                                                                                                                     
# first entry immediately):                                                                                                                                                                                                                                                      
prompt

<--- SNIP --->

When running lilo -v with this config, the Warning disappears.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<---  SNIP --->

Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data

<---  SNIP --->

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
#

You can operationally un-comment the message option which is pointing to a simple text file, the file used as a message is shown while running lilo.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<---  SNIP --->

Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

<---  SNIP --->

#

This message will appear under the LILO menu, don’t make it to ‘long’ as it can make your screen scroll and you won’t see the menu entirely.

I took the default message from /boot/boot_message.txt  but I’ve removed all the lines that makes reference to each kernels/partitions.

# cat /boot/boot_message.txt

Welcome to the LILO Boot Loader!

Please enter the name of the partition you would like to boot
at the prompt below.
#

Here is the result:

LILO all time classic menu