Hello Vpp Tem

An initial port of vpp stable/1807 onto yocto master is available on
github. Feedback is greatly appreciated.

Following is a quick start with both yocto and building/bringup of vpp
image with dpdk under KVM.


Thanks,
Babak

The layer can be accessed via:

https://github.com/zbsarashki/meta-vpp.git

To build and load a minimal image:

# Install build system and yocto layers
mkdir prj
cd prj
git clone git://git.yoctoproject.org/poky.git -b sumo
git clone git://git.yoctoproject.org/meta-intel -b sumo
git clone git://git.yoctoproject.org/meta-dpdk -b sumo
git clone git://git.openembedded.org/meta-openembedded -b sumo
git clone https://github.com/zbsarashki/meta-vpp.git

# create and setup project
cd poky
source ./oe-init-build-env $PWD/../build
bitbake-layers add-layer $PWD/../meta-intel
bitbake-layers add-layer $PWD/../meta-dpdk
bitbake-layers add-layer $PWD/../meta-openembedded/meta-oe
bitbake-layers add-layer $PWD/../meta-openembedded/meta-python
bitbake-layers add-layer $PWD/../meta-openembedded/meta-networking
bitbake-layers add-layer $PWD/../meta-vpp

# Edit conf/local.conf with:

cat >> conf/local.conf << EOF

MACHINE = "intel-corei7-64"
DISTRO = "poky-lsb"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
IMAGE_INSTALL_append = "packagegroup-vpp"
IMAGE_INSTALL_append = " vpp-core-plugin-dpdk"
EOF

# Build the project:

bitbake core-image-minimal

# To test the image with kvm:
cd tmp/work/images/intel-corei7-64/
kvm -kernel bzImage -drive
file=./core-image-minimal-intel-corei7-64.ext4,if=virtio,format=raw \
-device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 \
-net nic,model=e1000,netdev=net1 -netdev
tap,id=net1,ifname=tap1,script=no,downscript=no \
-net nic,model=e1000,netdev=net2 -netdev
tap,id=net2,ifname=tap2,script=no,downscript=no \
-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -serial
telnet::2456,server,wait  \
 -cpu host -m 4096 -append 'root=/dev/vda rw ip=none
console=ttyS0,115200n8  ' -daemonize
...
# Access the serial interface
telnet localhost 2456
...
login: root
...
Edit /etc/vpp/startup.conf and add

dpdk {
        socket-mem 1024
        dev 0000:00:03.0 # Check ethtool -i <interface> for businfo
}
..
# Start vpp with
modprobe igb_uio
/etc/rc.local
...
root@intel-corei7-64:/usr# /etc/rc.local
vlib_plugin_early_init:361: plugin path
/usr/lib/vpp_plugins:/usr/lib64/vpp_plugins
load_one_plugin:189: Loaded plugin: acl_plugin.so (Access Control Lists)
load_one_plugin:189: Loaded plugin: dpdk_plugin.so (Data Plane Development
Kit (DPDK))
root@intel-corei7-64:/usr# igb_uio 0000:00:03.0: mapping 1K dma=0x6f055000
host=000000008ac5b6ad
igb_uio 0000:00:03.0: unmapping 1K dma=0x6f055000 host=000000008ac5b6ad
igb_uio 0000:00:03.0: uio device registered with irq 11

root@intel-corei7-64:~# vppctl
    _______    _        _   _____  ___
 __/ __/ _ \  (_)__    | | / / _ \/ _ \
 _/ _// // / / / _ \   | |/ / ___/ ___/
 /_/ /____(_)_/\___/   |___/_/  /_/

vpp# set interface state GigabitEthernet0/3/0 up
vpp# set interface ip address GigabitEthernet0/3/0 192.168.7.14/24
vpp# ping 192.168.7.3
64 bytes from 192.168.7.3: icmp_seq=2 ttl=64 time=.1533 ms
64 bytes from 192.168.7.3: icmp_seq=3 ttl=64 time=.1228 ms
64 bytes from 192.168.7.3: icmp_seq=4 ttl=64 time=.1185 ms
64 bytes from 192.168.7.3: icmp_seq=5 ttl=64 time=.1167 ms
vpp# show hardware
              Name                Idx   Link  Hardware
GigabitEthernet0/3/0               1     up   GigabitEthernet0/3/0
  Ethernet address 52:54:00:12:34:56
  Intel 82540EM (e1000)
    carrier up full duplex speed 1000 mtu 9202
    flags: admin-up pmd maybe-multiseg tx-offload intel-phdr-cksum
    rx queues 1, rx desc 1024, tx queues 1, tx desc 1024
    cpu socket 0

    tx frames ok                                           6
    tx bytes ok                                          494
    rx frames ok                                          32
    rx bytes ok                                         6178
    rx errors                                              2
    extended stats:
      rx good packets                                     32
      tx good packets                                      6
      rx good bytes                                     6178
      tx good bytes                                      494
      rx errors                                            2
local0                             0    down  local0
  local
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10761): https://lists.fd.io/g/vpp-dev/message/10761
Mute This Topic: https://lists.fd.io/mt/26844053/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to