F-Stack/f-stack

Hello World not working as expected

moscovium115 opened this issue · 1 comments

Hi, I'm trying to use the Hello world example of F-stack since another library depends on this. After the installation proces on Amazon Linux (so this was attempted on AWS EC2) I saw the following when running Hello world:

f-stack-0: No addr6 config found.
f-stack-0: Ethernet address: 0a:2a:f3:8c:ab:a5

Maybe something is wrong with my installation process? Amazon Linux is not my preferred platform but the guide https://github.com/F-Stack/f-stack/blob/dev/doc/Launch_F-Stack_on_AWS_EC2_in_one_minute.md was tailored for that platform. Since im running on the cloud, I didn't want to sacrifice the only NIC on my machine. So I added another one which is called ens6 (using ENA)

I install in the following way:

sudo su

sudo yum install -y git gcc openssl-devel kernel-devel-$(uname -r) bc numactl-devel make cmake net-tools vim pciutils iproute pcre-devel zlib-devel elfutils-libelf-devel meson python3-pip

mkdir data
cd data
mkdir f-stack

pip3 install pyelftools --upgrade

git clone https://github.com/F-Stack/f-stack.git /root/data/f-stack

cd /root/data/f-stack/dpdk

meson -Denable_kmods=true -Ddisable_libs=flow_classify build
ninja -C build
ninja -C build install

# set hugepage	
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mkdir /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

# close ASLR; it is necessary in multiple process
echo 0 > /proc/sys/kernel/randomize_va_space

# insmod ko
modprobe uio
modprobe hwmon
insmod build/kernel/linux/igb_uio/igb_uio.ko
insmod build/kernel/linux/kni/rte_kni.ko carrier=on

# Export variables for ens6 interface
myaddr=$(ifconfig ens6 | awk '/inet / {print $2}' | cut -d ':' -f 2)
mymask=$(ifconfig ens6 | awk '/inet / {print $4}')
mybc=$(ifconfig ens6 | awk '/broadcast / {print $6}')
myhw=$(ifconfig ens6 | awk '/ether / {print $2}')
mygw=$(ip route show default | awk '/default via/ {print $3; exit}')  # Get only the first match

# Use '|' as delimiter instead of '/'
sed "s|addr=192.168.1.2|addr=${myaddr}|" -i /root/data/f-stack/config.ini
sed "s|netmask=255.255.255.0|netmask=${mymask}|" -i /root/data/f-stack/config.ini
sed "s|broadcast=192.168.1.255|broadcast=${mybc}|" -i /root/data/f-stack/config.ini
sed "s|gateway=192.168.1.1|gateway=${mygw}|" -i /root/data/f-stack/config.ini

sed "s/#\[kni\]/\[kni\]/" -i /root/data/f-stack/config.ini
sed "s/#enable=1/enable=1/" -i /root/data/f-stack/config.ini
sed "s/#method=reject/method=reject/" -i /root/data/f-stack/config.ini
sed "s/#tcp_port=80/tcp_port=80/" -i /root/data/f-stack/config.ini
sed "s/#vlanstrip=1/vlanstrip=1/" -i /root/data/f-stack/config.ini

# Upgrade pkg-config while version < 0.28
cd /root/data/
wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar xzvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --with-internal-glib
make
make install
mv /usr/bin/pkgconf /usr/bin/pkgconf.bak
ln -s /usr/local/bin/pkg-config /usr/bin/pkg-config

# Compile F-Stack lib
export FF_PATH=/root/data/f-stack
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig
cd /root/data/f-stack/lib
make
make install

ifconfig ens6 down
python3 /root/data/f-stack/dpdk/usertools/dpdk-devbind.py --bind=igb_uio ens6

cd /root/data/f-stack/example
make
mv /root/data/f-stack/config.ini /root/data/f-stack/example
./helloworld  --conf config.ini --proc-type=primary  --proc-id=0

Never Mind, after some more testing i dont think its the fault of F-stack but of the library