Coder Social home page Coder Social logo

userspace-cni-network-plugin's Introduction

License OpenSSF Scorecard CodeQL Go Report Card Go Reference

Summary

The Userspace CNI is a Container Network Interface (CNI) plugin designed to implement userspace networking (as opposed to kernel space networking). An example is any DPDK based applications. It is designed to run with either OVS-DPDK or VPP along with the Multus CNI plugin in Kubernetes deployments. It enhances high performance container Networking solution and Data Plane Acceleration for containers.

Links

Useful Links:

Biweekly Meeting

Join us for project discussions at K8s Network & Resource management meetings

Time: 15:00 - 16:00 GMT / 10:00-11:00 ET / 07:00-08:00 PST every other Monday

Contacts

For any questions about Userspace CNI, please reach out.

Userspace CNI Plugin

The Userspace CNI is a Container Network Interface (CNI) plugin designed to implement userspace networking (as opposed to kernel space networking), like DPDK based applications. It is designed to run with either OVS-DPDK or VPP running on the host, along with the Multus CNI plugin, which enables additional interfaces in a container.

Userspace networking requires additional considerations. For one, the interface needs to be created/configured on a local vswitch (running on the host). There may also be a desire to add the interface to a specific network on the host through the local vswitch. Second, when the interface is inserted into the container, it is not owned by the kernel, so additional work needs to be done in the container to consume the interface and add to a network within the container. The Userspace CNI is designed to work with these additional considerations by provisioning the local vswitch (OVS-DPDK/VPP), and by pushing data into the container so the interface can be consumed.

The Userspace CNI, based on the input config data, adds interfaces (memif and/or vhost-user interfaces) to a local OVS-DPDK or VPP instance running on the host. Then adds that interface to a local network, like an L2 Bridge. The Userspace CNI then processes config data intended for the container and adds that data to a Database the container can consume.

DPDK Vhostuser is new virtualization technology. Please refer to here for more information.

Vhostuser plugin

Build & Clean

This plugin is recommended to be built with Go 1.20.1 and either OVS-DPDK 2.9.0-3 or VPP 23.02. Other versions of Go, OVS-DPDK and VPP are theoretically supported, but MIGHT cause unknown issue.

The Userspace CNI requires several files from VPP in-order to build. For this reason we build userspacecni in a container.

userspacecni is built in a container and then transferred to the host. By default Docker is used to build the image

Before building be sure to modify the makefile variable IMAGE_REGISTRY. IMAGE_REGISTRY should be set to an image registry thats accessible across your cluster.

To build the docker image:

  git clone https://github.com/intel/userspace-cni-network-plugin.git
  cd userspace-cni-network-plugin
  make build

To copy the userspacecni binary to the host directory /opt/cni/bin/

  make copy

To push the image to the docker reg defined in the makefile

  make push

To deploy the userspacecni across the cluster

  make deploy

Network Configuration Reference

  • type (string, required): "userspace"
  • name (string, required): Name of the network
  • host (dictionary, required): Host based configurations. Contains userspace interface configuration data as well as host network data userspace interface should be injected into.
  • container (dictionary, optional): Container based configurations. Contains userspace interface configuration data as well as container network data userspace interface should be injected into. Defaults used when data omitted.
  • ipam (dictionary, optional): IPAM configuration to be used for this network.

Work Standalone

Given the following network configuration:

sudo cat > /etc/cni/net.d/90-userspace.conf <<EOF
{
	"cniVersion": "0.3.1",
        "type": "userspace",
        "name": "memif-network",
        "host": {
                "engine": "vpp",
                "iftype": "memif",
                "netType": "bridge",
                "memif": {
                        "role": "master",
                        "mode": "ethernet"
                },
                "bridge": {
                        "bridgeName": "4"
                }
        },
        "container": {
                "engine": "vpp",
                "iftype": "memif",
                "netType": "interface",
                "memif": {
                        "role": "slave",
                        "mode": "ethernet"
                }
        },
	"ipam": {
		"type": "host-local",
		"subnet": "10.56.217.0/24",
		"rangeStart": "10.56.217.131",
		"rangeEnd": "10.56.217.190",
		"routes": [
			{
				"dst": "0.0.0.0/0"
			}
		],
		"gateway": "10.56.217.1"
	}
}
EOF

Integrated with Multus Plugin

Integrate with the Multus plugin for a high performance container networking solution for NFV Environments. Refer to Multus (NFV based Multi - Network plugin), DPDK-SRIOV CNI plugins:

Encourage the users/developers to use Multus based Kubernetes CDR/TPR based network objects. Please follow the configuration details in the link: Usage with Kubernetes CRD/TPR based Network Objects

Please refer the Kubernetes Network SIG - Multiple Network PoC proposal for more details refer the link: K8s Multiple Network proposal

Userspace CNI with multus

Multus Configuration Details

# cat > /etc/cni/net.d/10-multus.conf <<EOF
{
    "name": "multus-demo-network",
    "type": "multus",
    "delegates": [
        {
                "type": "sriov",
                "if0": "ens786f1",
		"if0name": "net0",
		"dpdk": {
			"kernel_driver": "ixgbevf",
			"dpdk_driver": "igb_uio",
			"dpdk_tool": "/path/to/dpdk/tools/dpdk-devbind.py"
		}
	},
	{
		"cniVersion": "0.3.1",
		"type": "userspace",
		"name": "memif-network",
		"host": {
			"engine": "vpp",
			"iftype": "memif",
			"netType": "bridge",
			"memif": {
				"role": "master",
				"mode": "ethernet"
			},
			"bridge": {
				"bridgeName": "4"
			}
		},
		"container": {
			"engine": "vpp",
			"iftype": "memif",
			"netType": "interface",
			"memif": {
				"role": "slave",
				"mode": "ethernet"
			}
		},
		"ipam": {
			"type": "host-local",
			"subnet": "10.56.217.0/24",
			"rangeStart": "10.56.217.131",
			"rangeEnd": "10.56.217.190",
			"routes": [
				{
					"dst": "0.0.0.0/0"
				}
			],
			"gateway": "10.56.217.1"
		}
        },
        {
                "type": "flannel",
    		"name": "control-network",
                "masterplugin": true,
                "delegate": {
                        "isDefaultGateway": true
    		}
        }
    ]
}
EOF

Note: The Userspace CNI supports different IPAM plugins for the IP addresses management. The generated IP address information will be stored in one configuration file.

Logging Options

You may wish to enable some enhanced logging, especially to understand what is or isn't working with a particular configuration. Userspace CNI always log via STDERR, which is the standard method by which CNI plugins communicate errors, and these errors are logged by the Kubelet. This method is always enabled.

Writing to a Log File

Optionally, Userspace CNI can log to a file on the filesystem. This file will be written locally on each node where CNI is executed. Configure this via the LogFile option in the CNI configuration. By default this additional logging to a flat file is disabled.

For example in your CNI configuration, you may set:

    "logFile": "/var/log/userspace-cni.log",

Logging Level

The default logging level is set as warning -- this will log critical errors and issues detect.

The available logging level values, in increasing order of verbosity are:

  • panic
    • Code exiting immediately.
  • error
    • Unusual event occurred (invalid input or system issue), so exiting code prematurely.
  • warning
    • Unusual event occurred (invalid input or system issue), but continuing with default value.
  • info
    • Basic information, indication of major code paths.
  • debug
    • Additional information, indication of minor code branches.
  • verbose
    • Output of larger variables in code and debug of low level functions.

You may configure the logging level by using the LogLevel option in your CNI configuration. For example:

    "logLevel": "debug",

OVS CNI Library Intro

OVS CNI Library is written in GO and used by UserSpace CNI to interface with the OVS. OVS currently does not have a GO-API, though there are some external packages that are being explored. When the CNI is invoked, OVS CNI library builds up an OVS CLI command (ovs-vsctl) and executes the request.

Installing OVS

To install the DPDK-OVS, the source codes contains a document for how to install the DPDK-OVS.

Running OVS CNI Library with OVS

The Userspace CNI plugin builds the OVS CNI Library from the cniovs sub-folder. In order to run with the OVS CNI Library, the OVS python script must be installed on the system. To install the script, run make install as described in Building VPP CNI Library with OVS.

Configuring the System

DPDK-OVS is a DPDK based application, so some detailed system requirements can be found at DPDK requirements. Hugepages are the main requirement for the VHOST_USER virtual ports.

echo 'vm.nr_hugepages=2048' > /etc/sysctl.d/hugepages.conf

Or add the following configuration to the grub configuration:

default_hugepagesz=2m hugepagesz=2m hugepages=2048

VPP CNI Library Intro

VPP CNI Library is written in GO and used by UserSpace CNI to interface with the VPP GO-API. When the CNI is invoked, VPP CNI library opens a GO Channel to the local VPP instance and passes gRPC messages between the two.

As mentioned above, to build the Userspace CNI, VPP needs to be installed, or several VPP files to compile against. When VPP is installed, it copies it's json API files to /usr/share/vpp/api/. VPP CNI Libary uses these files to compile against and generate the properly versioned messages to the local VPP Instance. So to build the VPP CNI, VPP must be installed (or the proper json files must be in /usr/share/vpp/api/).

Installing VPP

There are several ways to install VPP. This code is based on a fixed release VPP (VPP 23.02), so it is best to install a released version (even though it is possible to build your own).

Prerequisites

Below are the VPP prerequisites:

  • Hugepages: VPP requires 2M Hugepages. By default, VPP uses 1024 hugepages. If hugepages are not configured, on install VPP will allocate them. This is primarily an issue if you are running in a VM that does not already have hugepage backing, especially when you reboot the VM. If you would like to change the number of hugepages VPP uses, after installing VPP, edit /etc/sysctl.d/80-vpp.conf. However, once VPP has been installed, the default value has been applied. As an example, to reduce the number of hugepages to 512, use:
   vm.nr_hugepages=512  
   vm.max_map_count=2048  
   kernel.shmmax=1073741824
  • SELinux: VPP works with SELinux enabled, but when running with containers, work still needs to be done. Set SELinux to permissive.

VPP install guide

https://s3-docs.fd.io/vpp/23.02/gettingstarted/installing/

VPP source code

https://github.com/FDio/vpp/tree/v23.02

OVS install guide

https://docs.openvswitch.org/en/latest/intro/install/

OVS source code

https://github.com/openvswitch/ovs/tree/master

Testing

Testing VPP with VPP pod as application

Its assumed that VPP has been set up on the host correctly by the user. On the server that the vpp pods get deployed (not the k8 controller) create the directories /var/run/vpp/app1 and /var/run/vpp/app2 for this example to work

kubectl create ns vpp

kubectl create -f ./examples/vpp-memif-ping/userspace-vpp-netAttach.yaml

kubectl create -n vpp configmap vpp-app-startup-config --from-file=./examples/vpp-memif-ping/startup.conf

kubectl create -n vpp configmap vpp-pod-setup-memif --from-file=./examples/vpp-memif-ping/vpp-pod-setup-memif.sh

kubectl create -f ./examples/vpp-memif-ping/vpp-app-pod-1.yaml
kubectl create -f ./examples/vpp-memif-ping/vpp-app-pod-2.yaml

kubectl exec -itn vpp vpp-app1 -- ./vpp-pod-setup-memif.sh
kubectl exec -itn vpp vpp-app2 -- ./vpp-pod-setup-memif.sh

# ping pod 2 from pod 1 (through vpp)
kubectl exec -itn vpp vpp-app1 -- vppctl "ping  192.168.1.4"

Sample output

116 bytes from 192.168.1.4: icmp_seq=1 ttl=64 time=83.4641 ms
116 bytes from 192.168.1.4: icmp_seq=2 ttl=64 time=72.0057 ms
116 bytes from 192.168.1.4: icmp_seq=3 ttl=64 time=67.9981 ms
116 bytes from 192.168.1.4: icmp_seq=4 ttl=64 time=75.9974 ms
116 bytes from 192.168.1.4: icmp_seq=5 ttl=64 time=72.0021 ms

Optional debug steps for VPP

Verify Host

To verify the local config (on host) in another window:

Before Container Started:

vppctl show interface
              Name               Idx       State          Counter          Count     
GigabitEthernet0/8/0              1        down      
GigabitEthernet0/9/0              2        down      
local0                            0        down      
   
vppctl show mode
l3 local0  
l3 GigabitEthernet0/8/0  
l3 GigabitEthernet0/9/0  
   
vppctl show memif
sockets
  id  listener    filename
  0   no          /run/vpp/memif.sock

After the container is started, on the host there should be an additional memif interface created and added to a new L2 bridge, all created by the Userspace CNI.

After vpp pod application Started:

vppctl show interface
              Name               Idx       State          Counter          Count
GigabitEthernet0/8/0              1        down
GigabitEthernet0/9/0              2        down
local0                            0        down
memif1/0                          3         up
   
vppctl show mode
l3 local0
l3 GigabitEthernet0/8/0
l3 GigabitEthernet0/9/0
l2 bridge memif1/0 bd_id 4 shg 0
   
vppctl show memif
sockets
  id  listener    filename
  0   no          /run/vpp/memif.sock
  1   yes (1)     /var/run/vpp/cni/shared/memif-79b661b189b2-net0.sock
   
interface memif1/0
  remote-name "VPP 18.07-16~gca7a68e~b66"
  remote-interface "memif1/0"
  socket-id 1 id 0 mode ethernet
  flags admin-up connected
  listener-fd 22 conn-fd 23
  num-s2m-rings 1 num-m2s-rings 1 buffer-size 0 num-regions 1
  region 0 size 4227328 fd 24
    master-to-slave ring 0:
      region 0 offset 16512 ring-size 1024 int-fd 26
      head 1024 tail 0 flags 0x0001 interrupts 0
    slave-to-master ring 0:
      region 0 offset 0 ring-size 1024 int-fd 25
      head 0 tail 0 flags 0x0001 interrupts 0

Verify Container

The container is setup to start VPP, read the config pushed by the User Space CNI, apply the data and then exit to bash. To verify the container config, in the container, run the following:

vppctl show interface
              Name               Idx       State          Counter          Count     
local0                            0        down      
memif1/0                          1         up       
   
vppctl show interface addr
local0 (dn):
memif1/0 (up):
  L3 192.168.210.45/24
   
vppctl show mode          
l3 local0  
l3 memif1/0  
   
vppctl show memif
sockets
  id  listener    filename
  0   no          /run/vpp/memif.sock
  1   no          /var/run/vpp/cni/shared/memif-05138381d803-net0.sock
   
interface memif1/0
  remote-name "VPP 18.07-rc2~11-g18bde8a"
  remote-interface "memif1/0"
  socket-id 1 id 0 mode ethernet
  flags admin-up slave connected
  listener-fd 0 conn-fd 17
  num-s2m-rings 1 num-m2s-rings 1 buffer-size 2048 num-regions 1
  region 0 size 4227328 fd 18
    slave-to-master ring 0:
      region 0 offset 0 ring-size 1024 int-fd 19
      head 0 tail 0 flags 0x0001 interrupts 0
    master-to-slave ring 0:
      region 0 offset 16512 ring-size 1024 int-fd 20
      head 1024 tail 0 flags 0x0001 interrupts 0

Ping

If a second container is started on the same host, the two containers will have L3 connectivity through an L2 bridge on the host. Because the interfaces in the host are owned by VPP, use VPP in one of the containers to ping between the two containers.

vppctl ping 192.168.210.46   
64 bytes from 192.168.210.46: icmp_seq=2 ttl=64 time=39.0119 ms
64 bytes from 192.168.210.46: icmp_seq=3 ttl=64 time=37.9991 ms
64 bytes from 192.168.210.46: icmp_seq=4 ttl=64 time=57.0304 ms
64 bytes from 192.168.210.46: icmp_seq=5 ttl=64 time=40.0044 ms
   
Statistics: 5 sent, 4 received, 20% packet loss

Testing with DPDK Testpmd Application

To follow this example you should have a system with kubernetes available and configured to support native 1 GB hugepages. You should also have multus-cni and userspace-cni-network-plugin up and running. See examples/crd-userspace-net-ovs-no-ipam.yaml for example config to use with multus. If using OVS, check that you have bridge named br0 in your OVS with ovs-vsctl show and if not, create it with ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev.

Build testpmd container image

make testpmd

Modify the nodeSelector kubernetes.io/hostname: in both ./examples/ovs-vhost/testpmd-pod-1.ymal and ./examples/ovs-vhost/testpmd-pod-2.ymal

kubectl create ns ovs
kubectl apply -f ./examples/ovs-vhost/userspace-ovs-netAttach-1.yaml
kubectl apply -f ./examples/ovs-vhost/testpmd-pod-1.yaml
kubectl apply -f ./examples/ovs-vhost/testpmd-pod-2.yaml

At this point pod 1 should be sending traffic to pod 2. By doing a kubectl logs on pod 2 you will be able to verify that the pod is receiving traffic by looking ath the RX value.

Sample output from a working environment

root@hostname:~/userspace-cni-network-plugin# kubectl logs -n ovs pod/ovs-app2 |tail -11
Port statistics ====================================
  ######################## NIC statistics for port 0  ########################
  RX-packets: 404024960  RX-missed: 0          RX-bytes:  25857597440
  RX-errors: 0
  RX-nombuf:  0
  TX-packets: 0          TX-errors: 0          TX-bytes:  0

  Throughput (since last show)
  Rx-pps:      1044345          Rx-bps:    534705080
  Tx-pps:            0          Tx-bps:            0
  ############################################################################

Unit Testing

Unit Tests Overview

The Userspace CNI networking plugin is written in GO and it uses GO Testing package for unit testing. In order to simplify unit test code, a testify toolkit is also used for assertions. Unit test files have suffix _test.go and they are located at the same directory as the production code.

For example userspace package have one source file and one file with unit tests:

   userspace/userspace.go
   userspace/userspace_test.go

In the file userspace_test.go you can find a set of test functions with the same name as functions from userspace.go with prefix Test. Each test function implements a set of tests to test production code thoroughly with different input data, etc.

Testing binary is built and tests executed by go test command at directory with test files.

For example, unit tests for userspace package with verbose output can be executed as follows:

cd userspace
go test -v

An example of verbose output of userspace unit tests:

=== RUN   TestPrintVersionString
=== RUN   TestPrintVersionString/verify_version_string
--- PASS: TestPrintVersionString (0.00s)
    --- PASS: TestPrintVersionString/verify_version_string (0.00s)
=== RUN   TestLoadNetConf
=== RUN   TestLoadNetConf/fail_to_parse_netConf_1
=== RUN   TestLoadNetConf/fail_to_parse_netConf_2
=== RUN   TestLoadNetConf/fail_to_parse_netConf_3
=== RUN   TestLoadNetConf/fail_to_parse_netConf_4
=== RUN   TestLoadNetConf/fail_to_parse_netConf_5
=== RUN   TestLoadNetConf/fail_to_parse_netConf_6
=== RUN   TestLoadNetConf/fail_to_set_default_logging_level
=== RUN   TestLoadNetConf/fail_to_set_log_file
=== RUN   TestLoadNetConf/load_correct_netConf
--- PASS: TestLoadNetConf (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_1 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_2 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_3 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_4 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_5 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_parse_netConf_6 (0.00s)
    --- PASS: TestLoadNetConf/fail_to_set_default_logging_level (0.00s)
    --- PASS: TestLoadNetConf/fail_to_set_log_file (0.00s)
    --- PASS: TestLoadNetConf/load_correct_netConf (0.00s)
...

It is possible to execute unit tests directly from the host where the code is being developed. However it is strongly recommended to execute them from within a container. It will assure that unit tests will be isolated from the host and thus avoid any collision with the host environment (e.g. k8s or OVS). Another advantage is a possibility to easily execute unit tests at various Linux OS distributions. Support of unit test execution inside containers is implemented by project Makefile and described in following paragraphs.

Unit Tests Inside Container

Project Makefile defines a set of targets suitable for unit testing inside containers. In order to build and use testing containers, both docker and gcc (C preprocessor is used to assemble Dockerfiles) have to be installed at the host.

Example of tools installation at Ubuntu:

   apt install docker.io gcc

After the installation is completed, then any of unit test specific targets can be executed in order to:

  • build test containers and update them in case that new commit is detected
  • execute unit tests
  • calculate code coverage
  • cleanup unit test container images and generated docker files

Targets for container building, unit testing and code coverage calculation are prepared in three different versions to be executed at:

  • Linux OS distribution defined by UT_OS environment variable

    e.g. execute build of container image for CentOS8

       export UT_OS=centos8
       make test-build
  • Linux OS distribution specified by target suffix

    e.g. calculate code coverage at Ubuntu 20.04

       make coverage-ubuntu20.04
  • all supported OS distributions

    e.g. execute unit tests at all supported OS distros:

       make test-all

The list of supported make targets is also documented as part of make help as follows:

Make Targets for unit testing inside containers:
 make test-clean      - Remove test container images and generated Dockerfiles.
 make test-build      - Build container image for unit tests with OS defined by UT_OS: UT_OS=ubuntu20.04
 make test            - Run unit tests inside container with OS defined by UT_OS: UT_OS=ubuntu20.04
 make coverage        - Calculate code coverage in container with OS defined by UT_OS: UT_OS=ubuntu20.04
 make test-build-<os> - Build container image for unit tests with <os>, e.g. make test-build-centos8
 make test-<os>       - Run unit tests inside container with <os>, e.g. make test-centos8
 make coverage-<os>   - Calculate code coverage inside container with <os>, e.g. make coverage-centos8
 make test-build-all  - Build container images for unit tests for all supported OS distributions
                        e.g. make -j 5 test-build-all
 make test-all        - Run unit tests inside container for all supported OS distributions
                        e.g. make -j 5 test-all
 make coverage-all    - Calculate code coverage inside container for all supported OS distributions.
                        e.g. make -j 5 coverage-all

userspace-cni-network-plugin's People

Contributors

billy99 avatar brownlow2 avatar dependabot[bot] avatar eoghan1232 avatar eoghanconlon avatar garyloug avatar johnoloughlin avatar kangasta avatar martinkennelly avatar michaeloreillyintel avatar moduspwnens avatar p00rman avatar patrickog11 avatar przemeklal avatar rkamudhan avatar step-security-bot avatar subramanian96 avatar vadorovsky avatar walshric avatar zed-0xff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

userspace-cni-network-plugin's Issues

Use of vhostuser plugin

A bit unclear from the README what the end result is for the host/container. Few questions:

  • Is the project for creating OVS-DPDK/VPP containers themselves, or interfacing containers with a OVS-DPDK/VPP instance that is installed on the bare-metal?

  • Does the vhostuser port appear as a standard interface (net0, eth0, etc) within the container?

  • Are DPDK applications (e.g. testpmd) required to utilize the port within the container?

Thanks, and looking forward to testing it out!

ovs-dpdk CNI Installation failing on Ubuntu18.04

I am trying to install ovs-dpdk userspace CNI on ubuntu 18.04, following are the steps:

  1. Followed - https://github.com/intel/userspace-cni-network-plugin
    cd $GOPATH/src/
    go get github.com/Billy99/user-space-net-plugin
    cd github.com/Billy99/user-space-net-plugin
    make install

  2. make is failing (no target set)
    ubuntu@lxxxxxxx:~/go/src/github.com/intel/userspace-cni-network-plugin$ make
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/bennyscetbun/jsongo
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/sirupsen/logrus
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/cmd/binapi-generator
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/integer
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/selection
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/gogo/protobuf/sortkeys
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/sets
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/text/transform
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/version
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/clock
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/net/context
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/homedir
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/pkg/errors
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/fields
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/safchain/ethtool
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/go-logfmt/logfmt
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/google/gofuzz
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/errors
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/glog
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/plugins/pkg/utils/sysctl
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/types
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/vishvananda/netns
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/conversion/queryparams
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/net/http2/hpack
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/json
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/text/unicode/bidi
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/plugins/pkg/utils/hwaddr
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/types
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/coreos/go-iptables/iptables
    github.com/intel/userspace-cni-network-plugin/vendor/gopkg.in/inf.v0
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/gogo/protobuf/proto
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/sys/unix
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/protobuf/proto
    github.com/intel/userspace-cni-network-plugin/vendor/gopkg.in/yaml.v2
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/google/btree
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/modern-go/concurrent
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/framer
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/pkg/version
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/gregjones/httpcache
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/connrotation
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/metrics
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/cert
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/time/rate
    github.com/intel/userspace-cni-network-plugin/logging
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/imdario/mergo
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/text/unicode/norm
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/spf13/pflag
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/api
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/lunixbochs/struc
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/adapter
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/modern-go/reflect2
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/validation/field
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/conversion
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/types/020
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/vishvananda/netlink/nl
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/runtime
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/flowcontrol
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/peterbourgon/diskv
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/wait
    github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/text/secure/bidirule
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/validation
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/types/current
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/codec
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/memif
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/interfaces
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/examples/binapi/memclnt
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/l2
    github.com/intel/userspace-cni-network-plugin/pkg/types
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/version
    github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/labels
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/gregjones/httpcache/diskcache
    github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core
    github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/invoke
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel
    github.com/intel/userspace-cni-network-plugin/vendor/github.com/vishvananda/netlink
    github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
    github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface

github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge

../cnivpp/api/bridge/bridge.go:121:3: unknown field 'PortType' in struct literal of type l2.SwInterfaceSetL2Bridge
../cnivpp/api/bridge/bridge.go:147:3: unknown field 'PortType' in struct literal of type l2.SwInterfaceSetL2Bridge
github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/net/idna
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/plugins/pkg/ns
github.com/intel/userspace-cni-network-plugin/vendor/github.com/fsnotify/fsnotify
github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/crypto/ssh/terminal
github.com/intel/userspace-cni-network-plugin/vendor/github.com/ghodss/yaml
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/adapter/socketclient
github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/net/lex/httplex
github.com/intel/userspace-cni-network-plugin/vendor/golang.org/x/net/http2
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/yaml
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git
github.com/intel/userspace-cni-network-plugin/vendor/github.com/json-iterator/go
github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/schema
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/intstr
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/api/resource
github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/protobuf/ptypes/any
github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/protobuf/ptypes/timestamp
github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/protobuf/ptypes/duration
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime
github.com/intel/userspace-cni-network-plugin/vendor/github.com/golang/protobuf/ptypes
github.com/intel/userspace-cni-network-plugin/vendor/github.com/googleapis/gnostic/extensions
github.com/intel/userspace-cni-network-plugin/vendor/github.com/googleapis/gnostic/compiler
github.com/intel/userspace-cni-network-plugin/vendor/github.com/googleapis/gnostic/OpenAPIv2
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/clientcmd/api
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/clientcmd/api/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/util/net
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/transport
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/watch
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/apis/meta/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/rest/watch
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/pkg/apis/clientauthentication
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/api/errors
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/scheduling/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/authentication/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/admissionregistration/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/scheduling/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/certificates/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/authentication/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/authorization/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/rbac/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/authorization/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/admissionregistration/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/rbac/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/rbac/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/storage/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/core/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/util/retry
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/api/meta
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/clientcmd/api/latest
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/apimachinery/pkg/runtime/serializer
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/rest
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/plugins/pkg/ip
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/auth
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/plugins/pkg/ipam
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/clientcmd
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/tools/reference
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/batch/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/settings/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/events/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/storage/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/networking/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/storage/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/autoscaling/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/autoscaling/v2beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/policy/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/apps/v1beta2
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/apps/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/apps/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/batch/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/batch/v2alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/api/extensions/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/scheme
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/discovery
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/batch/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/storage/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/apps/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/networking/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/core/v1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1
github.com/intel/userspace-cni-network-plugin/vendor/k8s.io/client-go/kubernetes
github.com/intel/userspace-cni-network-plugin/pkg/k8sclient
github.com/intel/userspace-cni-network-plugin/pkg/annotations
github.com/intel/userspace-cni-network-plugin/pkg/configdata
github.com/intel/userspace-cni-network-plugin/cniovs
Makefile:81: recipe for target 'build' failed
make: *** [build] Error 2

Does anyone face this issue? Can someone help here?

Can't build - one package in vendored govpp is missing

I see the following error when I'm trying to build:

../cnivpp/api/interface/interface.go:28:2: cannot find package "git.fd.io/govpp.git/core/bin_api/interfaces" in any of:
        /home/mrostecki/go/src/github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/interfaces (vendor tree)
        /usr/lib64/go/1.12/src/git.fd.io/govpp.git/core/bin_api/interfaces (from $GOROOT)
        /home/mrostecki/go/src/git.fd.io/govpp.git/core/bin_api/interfaces (from $GOPATH)
../cnivpp/api/bridge/bridge.go:26:2: cannot find package "git.fd.io/govpp.git/core/bin_api/l2" in any of:
        /home/mrostecki/go/src/github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/l2 (vendor tree)
        /usr/lib64/go/1.12/src/git.fd.io/govpp.git/core/bin_api/l2 (from $GOROOT)
        /home/mrostecki/go/src/git.fd.io/govpp.git/core/bin_api/l2 (from $GOPATH)
../cnivpp/api/vhostuser/vhostuser.go:26:2: cannot find package "git.fd.io/govpp.git/core/bin_api/vhost_user" in any of:
        /home/mrostecki/go/src/github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/vhost_user (vendor tree)
        /usr/lib64/go/1.12/src/git.fd.io/govpp.git/core/bin_api/vhost_user (from $GOROOT)
        /home/mrostecki/go/src/git.fd.io/govpp.git/core/bin_api/vhost_user (from $GOPATH)
make: *** [Makefile:74: build] Error 1

And indeed, the core/bin_api/l2 package is missing inside vendor/ directory.

Fail in testing with vpp docker image and cni

Hello,

I followed the instructions in https://github.com/intel/userspace-cni-network-plugin/blob/master/README.md#testing-with-vpp-docker-image-and-cni,
but failed in exec-plugins.sh when it tried to execute /opt/cni/bin/userspace < /etc/cni/net.d/90-userspace.conf. The output error is as below.
(the exec-plugins.sh is called in the usrsp-docker-run.sh that is called in the instructions above)

2019-12-03T10:00:05Z [error] GetPod: No kubeClient: <nil>
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe9a9d7]

goroutine 1 [running, locked to thread]:
github.com/intel/userspace-cni-network-plugin/pkg/annotations.GetPodVolumeMountHostSharedDir(0x0, 0x0, 0x0, 0x0, 0x0)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/pkg/annotations/annotations.go:66 +0x47
main.getPodAndSharedDir(0xc00033a500, 0xc00030bc70, 0x0, 0x0, 0x4, 0x0, 0xf3b8a0, 0xc000353b10, 0x16, 0x0, ...)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/userspace/userspace.go:125 +0x7b1
main.cmdDel(0xc00030bc70, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/userspace/userspace.go:332 +0x333
main.main.func3(0xc00030bc70, 0xc000047650, 0x5)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/userspace/userspace.go:438 +0x38
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel.(*dispatcher).checkVersionAndCall(0xc000133e90, 0xc00030bc70, 0x1223880, 0xc000354c60, 0x116d440, 0x0, 0xc000133dd8)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel/skel.go:185 +0x185
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel.(*dispatcher).pluginMain(0xc000133e90, 0x116d430, 0x116d438, 0x116d440, 0x1223880, 0xc000354c60, 0x1114a82, 0x2d, 0xbc443e07e59604e1)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel/skel.go:251 +0x33e
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel.PluginMainWithError(0x116d430, 0x116d438, 0x116d440, 0x1223880, 0xc000354c60, 0x1114a82, 0x2d, 0xc000133f48)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel/skel.go:286 +0x110
github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel.PluginMain(0x116d430, 0x116d438, 0x116d440, 0x1223880, 0xc000354c60, 0x1114a82, 0x2d)
        /root/go/src/github.com/intel/userspace-cni-network-plugin/vendor/github.com/containernetworking/cni/pkg/skel/skel.go:301 +0x7a
main.main()
        /root/go/src/github.com/intel/userspace-cni-network-plugin/userspace/userspace.go:430 +0x72

ps. I have docker and K8s installed.

Thanks!

gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3

Hi.

I'm trying to install the userspace-cni-network-plugin on Ubuntu20 machine.
It's clean, nothing else is installed, i'm running this ubuntu machine through VirtualBox.

I've installed go 1.11.10
I've installed vpp 22.02 version

After issuing

 export GOPATH=~/go
   export CNI_PATH=$GOPATH/src/github.com/containernetworking/plugins/bin
   cd $GOPATH/src/
   go get github.com/intel/userspace-cni-network-plugin
   cd github.com/intel/userspace-cni-network-plugin
   sudo make

(I also tried with GO111MODULE=on and without sudo, but with sudo it's better.
During make i have this error:


for package in cnivpp/api/* ; do cd $package ; pwd ; go generate ; cd - ; done
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: finding github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
go: finding github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1
go: finding github.com/go-ini/ini v1.25.4
go: finding github.com/jtolds/gls v4.20.0+incompatible
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: finding golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
go: finding gotest.tools/v3 v3.0.2
go: finding gotest.tools/v3 v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
Fetching https://gotest.tools/v3?go-get=1
Parsing meta tags from https://gotest.tools/v3?go-get=1 (status code 200)
get "gotest.tools/v3": found meta tag get.metaImport{Prefix:"gotest.tools/v3", VCS:"git", RepoRoot:"https://github.com/gotestyourself/gotest.tools"} at https://gotest.tools/v3?go-get=1
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.3
go: gotest.tools/[email protected]: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
make: *** [Makefile:116: build] Error 1

Without sudo it's


for package in cnivpp/api/* ; do cd $package ; pwd ; go generate ; cd - ; done
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
	/usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
bridge.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
	/usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
infra.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
	/usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
interface.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
	/usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
memif.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
	/usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
vhostuser.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
userspace.go:26:2: cannot find package "github.com/containernetworking/cni/pkg/invoke" in any of:
	/usr/local/go/src/github.com/containernetworking/cni/pkg/invoke (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/cni/pkg/invoke (from $GOPATH)
userspace.go:27:2: cannot find package "github.com/containernetworking/cni/pkg/skel" in any of:
	/usr/local/go/src/github.com/containernetworking/cni/pkg/skel (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/cni/pkg/skel (from $GOPATH)
userspace.go:28:2: cannot find package "github.com/containernetworking/cni/pkg/types" in any of:
	/usr/local/go/src/github.com/containernetworking/cni/pkg/types (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/cni/pkg/types (from $GOPATH)
userspace.go:29:2: cannot find package "github.com/containernetworking/cni/pkg/types/100" in any of:
	/usr/local/go/src/github.com/containernetworking/cni/pkg/types/100 (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/cni/pkg/types/100 (from $GOPATH)
userspace.go:30:2: cannot find package "github.com/containernetworking/cni/pkg/version" in any of:
	/usr/local/go/src/github.com/containernetworking/cni/pkg/version (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/cni/pkg/version (from $GOPATH)
userspace.go:31:2: cannot find package "github.com/containernetworking/plugins/pkg/ip" in any of:
	/usr/local/go/src/github.com/containernetworking/plugins/pkg/ip (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/plugins/pkg/ip (from $GOPATH)
userspace.go:32:2: cannot find package "github.com/containernetworking/plugins/pkg/ipam" in any of:
	/usr/local/go/src/github.com/containernetworking/plugins/pkg/ipam (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/plugins/pkg/ipam (from $GOPATH)
userspace.go:33:2: cannot find package "github.com/containernetworking/plugins/pkg/ns" in any of:
	/usr/local/go/src/github.com/containernetworking/plugins/pkg/ns (from $GOROOT)
	/home/kiry/go/src/github.com/containernetworking/plugins/pkg/ns (from $GOPATH)
../pkg/annotations/annotations.go:22:2: cannot find package "github.com/go-logfmt/logfmt" in any of:
	/usr/local/go/src/github.com/go-logfmt/logfmt (from $GOROOT)
	/home/kiry/go/src/github.com/go-logfmt/logfmt (from $GOPATH)
../cnivpp/api/interface/interface.go:26:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface" in any of:
	/usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface (from $GOROOT)
	/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface (from $GOPATH)
../cnivpp/api/bridge/bridge.go:25:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types" in any of:
	/usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types (from $GOROOT)
	/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types (from $GOPATH)
../cnivpp/api/interface/interface.go:28:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types" in any of:
	/usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types (from $GOROOT)
	/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types (from $GOPATH)
../cnivpp/api/bridge/bridge.go:26:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2" in any of:
	/usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2 (from $GOROOT)
	/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2 (from $GOPATH)
../cnivpp/api/memif/memif.go:31:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif" in any of:
	/usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif (from $GOROOT)
	/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif (from $GOPATH)
../logging/logging.go:23:2: cannot find package "github.com/pkg/errors" in any of:
	/usr/local/go/src/github.com/pkg/errors (from $GOROOT)
	/home/kiry/go/src/github.com/pkg/errors (from $GOPATH)
../cnivpp/api/infra/infra.go:25:2: cannot find package "github.com/sirupsen/logrus" in any of:
	/usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
	/home/kiry/go/src/github.com/sirupsen/logrus (from $GOPATH)
userspace.go:43:2: cannot find package "github.com/vishvananda/netlink" in any of:
	/usr/local/go/src/github.com/vishvananda/netlink (from $GOROOT)
	/home/kiry/go/src/github.com/vishvananda/netlink (from $GOPATH)
../cnivpp/api/infra/infra.go:27:2: cannot find package "go.fd.io/govpp" in any of:
	/usr/local/go/src/go.fd.io/govpp (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp (from $GOPATH)
../cnivpp/api/bridge/bridge.go:28:2: cannot find package "go.fd.io/govpp/api" in any of:
	/usr/local/go/src/go.fd.io/govpp/api (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/api (from $GOPATH)
../cnivpp/api/infra/infra.go:29:2: cannot find package "go.fd.io/govpp/core" in any of:
	/usr/local/go/src/go.fd.io/govpp/core (from $GOROOT)
	/home/kiry/go/src/go.fd.io/govpp/core (from $GOPATH)
../cniovs/cniovs.go:38:2: cannot find package "golang.org/x/sys/unix" in any of:
	/usr/local/go/src/golang.org/x/sys/unix (from $GOROOT)
	/home/kiry/go/src/golang.org/x/sys/unix (from $GOPATH)
../pkg/k8sclient/k8sclient.go:22:2: cannot find package "k8s.io/api/core/v1" in any of:
	/usr/local/go/src/k8s.io/api/core/v1 (from $GOROOT)
	/home/kiry/go/src/k8s.io/api/core/v1 (from $GOPATH)
../pkg/k8sclient/k8sclient.go:23:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
	/usr/local/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
	/home/kiry/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
../pkg/k8sclient/k8sclient.go:24:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
	/usr/local/go/src/k8s.io/client-go/kubernetes (from $GOROOT)
	/home/kiry/go/src/k8s.io/client-go/kubernetes (from $GOPATH)
../pkg/k8sclient/k8sclient.go:25:2: cannot find package "k8s.io/client-go/rest" in any of:
	/usr/local/go/src/k8s.io/client-go/rest (from $GOROOT)
	/home/kiry/go/src/k8s.io/client-go/rest (from $GOPATH)
../pkg/k8sclient/k8sclient.go:26:2: cannot find package "k8s.io/client-go/tools/clientcmd" in any of:
	/usr/local/go/src/k8s.io/client-go/tools/clientcmd (from $GOROOT)
	/home/kiry/go/src/k8s.io/client-go/tools/clientcmd (from $GOPATH)
../pkg/k8sclient/k8sclient.go:27:2: cannot find package "k8s.io/client-go/util/retry" in any of:
	/usr/local/go/src/k8s.io/client-go/util/retry (from $GOROOT)
	/home/kiry/go/src/k8s.io/client-go/util/retry (from $GOPATH)
make: *** [Makefile:116: build] Error 1

I would be glad to share with you more details in case you need them.

Adding support for VM based runtimes

Today when invoking the CNI plugin the return value typically looks like

{
  "ip4": {
    "ip": "10.56.217.133/24",
    "gateway": "10.56.217.1",
    "routes": [
      {
        "dst": "0.0.0.0/0"
      }
    ]
  },
  "dns": {}
}

The vhost socket information is passed in via volumes in

/var/lib/cni/vhostuser/

However for VM based runtimes which can consume the vhost-user socket directly, sending out an additional value say

   "vhostfd": "/path/to/vhost/fd"

would be helpful.

A runtime would be free to ignore fields it did not recognize.
golang json unmarshalling skips fields it does not recognize.

emptydir not working

using emptydir as source of shared-dir, cni shows following errors:

2020-06-18T16:07:34+08:00 [info] OVS AddOnHost: ENTER - Container 177e14267c70 Iface net1
2020-06-18T16:07:34+08:00 [debug] addLocalNetworkBridge(): Bridge br1 exists, skip creating
2020-06-18T16:07:34+08:00 [info] getShortSharedDir: Short shared directory: /var/lib/vhost_sockets/10a654ae-4903-46ce-a44d-551197182306
2020-06-18T16:07:34+08:00 [debug] createSharedDir: Mount from /var/lib/kubelet/pods/10a654ae-4903-46ce-a44d-551197182306/volumes/kubernetes.io~empty-dir/shared-dir to /var/lib/vhost_sockets/10a654ae-4903-46ce-a44d-551197182306
2020-06-18T16:07:34+08:00 [error] Rename ERROR: rename /var/run/openvswitch/177e14267c70-net1 /var/lib/vhost_sockets/10a654ae-4903-46ce-a44d-551197182306177e14267c70-net1: invalid cross-device link
2020-06-18T16:07:34+08:00 [info] OVS AddOnContainer: ENTER - Container 177e14267c70 Iface net1

Not able to mount sockets from /var/lib/vhost_sockets/ into the pod but it works on pod restart.

I'm running ovs-dpdk in a pod. To enable Userspace CNI to access containerized OVS-DPDK using a workaround take ovs-vsctl calls made from the host and direct them to the appropriate container running OVS-DPDK.
Userspace creates vhost user sockets on the host. ( Mount from /var/lib/kubelet/pods/d034a197-2908-4889-9831-c0040ddb2bae/volumes/kubernetes.io~empty-dir/shared-dir to /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae)

# ls -l /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae/36505445fd91-net1 
srwxrwxr-x 1 uuidd input 0 Mar 22 10:34 /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae/36505445fd91-net1

As it’s communicating with ovs-dpdk in the pod it’s looking for sockets in the ovs-dpdk pod. I'm trying to mount sockets into the pod, but it’s not mounting the socket.
options: {vhost-server-path=“/var/lib/vhost_sockets/91aa04fd-df05-402b-b4c1-4d4ea85fc8e5/e3dbe834316c-net1”}

Not just sockets it’s not mounting other files created in the socket dir too.
however, it gets mounted when we restart ovs-dpdk pod.

I see that permissions of the socket directory in the pod are different before and after pod restart.
before restart,

bash-5.1# ls -l /var/lib/vhost_sockets/
drwxr-x--- 2 root root 4096 Mar 22 10:34 d034a197-2908-4889-9831-c0040ddb2bae

after pod restart,

bash-5.1# ls -l /var/lib/vhost_sockets/
drwxrwxrwx 2 root root 4096 Mar 22 10:37 d034a197-2908-4889-9831-c0040ddb2bae

Any pointers on what can be done here?

Code quality improvements

I opened a number of PRs with code changes from @p00rman who couple of weeks ago added unit tests, fixed issues discovered by his unit tests and improved Makefiles and documentation. All of this should significantly improve quality of the userspace-cni plugin. I noticed that issues with newer Golang versions seem to be resolved as well.

Recommended order of merging is pretty straightforward - patches should be merged one by one, from #46 to #54.

I created a branch on my fork that shows the final result of merging those patches, so you can have a look at the final effect: https://github.com/przemeklal/userspace-cni-network-plugin/tree/unit_tests_and_fixes_integration

You can prepare it by yourself by executing below script:

#!/bin/bash

# prepare working directory
mkdir -p $GOPATH/src/github.com/intel
cd $GOPATH/src/github.com/intel
git clone https://github.com/przemeklal/userspace-cni-network-plugin.git userspace-cni-network-plugin
cd userspace-cni-network-plugin

# checkout and merge all patches
git checkout userspace_unit_tests
git merge origin/docker_test_review -m "merge origin/origin/docker_test_review"
git merge origin/fix_configdata_SaveRemoteConfig -m "merge origin/fix_configdata_SaveRemoteConfig"
git merge origin/fix_null_pointer_and_error_handling -m "merge origin/fix_null_pointer_and_error_handling"
git merge origin/fix_null_pointer_k8sclient -m "origin/fix_null_pointer_k8sclient"
git merge origin/fix_path_handling -m "origin/fix_path_handling"
git merge origin/fix_typos -m "origin/fix_typos"
git merge origin/fix_vpp_test -m "origin/fix_vpp_test"
git merge origin/unittests_doc -m "origin/unittests_doc"

# execute all tests and build targets
make clean
make install-dep
make install
make
make test-all
make coverage-all

@Billy99 @garyloug Could you please take a look? I'll be happy to answer any questions or work on any additional fixes. There's also one extra patch pending that switches from glide to go modules and I'm going to push that one as well.

Failure To Build "userspace_cni" in Rocky 8.5

Ref: https://jira.devtools.intel.com/browse/NPF-3552?filter=-1

tested and verified no issues in Ubuntu <= 21.10, CentOS <=8.5 & RHEL <= 8.5 but failure is only in Rocky 8.5. I tried to find the root cause but still stuck at same stage any support here will be appreciated, many thanks

Failure Log with BMRA (Note: Same can be reproduced if tested manually)

Command: source /etc/profile.d/golang.sh && make clean && export GO111MODULE=on && make install-dep && make install && make

TASK [userspace_cni_install : clone Userspace CNI Plugin repository] **********************************************************************************************************************************
ok: [ar09-17-cyp]

TASK [userspace_cni_install : build Userspace CNI plugin] *********************************************************************************************************************************************
fatal: [ar09-17-cyp]: FAILED! => {
    "changed": true,
    "cmd": "source /etc/profile.d/golang.sh && make clean && export GO111MODULE=on && make install-dep && make install && make\n",
    "delta": "0:00:00.095173",
    "end": "2022-04-12 16:21:01.252352",
    "rc": 2,
    "start": "2022-04-12 16:21:01.157179"
}

STDOUT:

Remove unit test container images with name userspace_cni_plugin
Remove generated dockerfiles
make: Nothing to be done for 'install-dep'.
VPP not installed, installing required files. Run *sudo make clean* to remove installed files.


STDERR:

cp: cannot stat 'tmpvpp/usr/include/vpp-api/client/vppapiclient.h': No such file or directory
make: *** [Makefile:137: install] Error 1


MSG:

non-zero return code

cni doesn't create socket when using vhostuserclient

I create ovs-dpdk NetworkAttachmentDefinition as follows. after pod create, I can see vhostuserclient ports in ovs, but socket in vhost-server-path doesn't exist. Should socket be created by userspace cni or by other?

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: userspace-ovs-net-2
spec:
config: '{
"cniVersion": "0.3.1",
"type": "userspace",
"name": "userspace-ovs-net-2",
"kubeconfig": "/etc/cni/net.d/multus.d/multus.kubeconfig",
"logFile": "/var/log/userspace-ovs-net-2-cni.log",
"logLevel": "debug",
"host": {
"engine": "ovs-dpdk",
"iftype": "vhostuser",
"netType": "bridge",
"vhost": {
"mode": "client"
},
"bridge": {
"bridgeName": "br0"
}
},
"container": {
"engine": "ovs-dpdk",
"iftype": "vhostuser",
"netType": "interface",
"vhost": {
"mode": "server"
}
},
"ipam": {... ...}
}'

Error when make

WARN[0000] Unusual EVENTS SERVICE: {Name:dhcp.dhcp_client_config RequestType:dhcp_client_config ReplyType:dhcp_client_config_reply Stream:false Events:[dhcp_compl_event]}

  • events service "dhcp.dhcp_client_config" does not have 'want_' prefix in request.

Install CNI plugin v1.3 with VPP v21.06

I tried to install cni plugin v1.3 with vpp v21.06 on Ubuntu 20.04. I build vpp successfully, but then I saw the following error when I ran

make clean && make install-dep && make install && make

command:

STDOUT:

Remove unit test container images with name userspace_cni_plugin
Remove generated dockerfiles
make: Nothing to be done for 'install-dep'.
make: Nothing to be done for 'install'.
for package in cnivpp/api/* ; do cd $package ; pwd ; go generate ; cd - ; done
/root/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
/root/go/src/github.com/intel/userspace-cni-network-plugin
/root/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
/root/go/src/github.com/intel/userspace-cni-network-plugin
/root/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
/root/go/src/github.com/intel/userspace-cni-network-plugin
/root/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
/root/go/src/github.com/intel/userspace-cni-network-plugin
/root/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser
/root/go/src/github.com/intel/userspace-cni-network-plugin


STDERR:

go: downloading git.fd.io/govpp.git v0.3.5
go: downloading github.com/sirupsen/logrus v1.7.0
go: downloading github.com/bennyscetbun/jsongo v1.1.0
go: downloading golang.org/x/sys v0.0.0-20201005065044-765f4ea38db3
time="2021-07-06T01:40:27-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:27-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_ip_flow_hash_config_t\", using byte"
time="2021-07-06T01:40:27-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:27-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:27-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_af_xdp_flag_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:28-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
go: downloading github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40
go: downloading github.com/fsnotify/fsnotify v1.4.7
time="2021-07-06T01:40:29-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_ip_flow_hash_config_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_af_xdp_flag_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:30-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
go: downloading github.com/containernetworking/cni v0.8.0
time="2021-07-06T01:40:31-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_ip_flow_hash_config_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:32-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_af_xdp_flag_t\", using byte"
time="2021-07-06T01:40:33-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:33-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:33-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:33-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
go: downloading github.com/pkg/errors v0.9.1
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_ip_flow_hash_config_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_af_xdp_flag_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:34-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:35-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:35-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_ip_flow_hash_config_t\", using byte"
time="2021-07-06T01:40:35-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_tunnel_flags_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_af_xdp_flag_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
time="2021-07-06T01:40:36-07:00" level=warning msg="found unknown VPP binary API type \"vl_api_mss_clamp_dir_t\", using byte"
go: downloading github.com/containernetworking/plugins v0.8.0
go: downloading github.com/vishvananda/netlink v1.1.0
go: downloading k8s.io/api v0.17.0
go: downloading k8s.io/client-go v0.17.0
go: downloading github.com/go-logfmt/logfmt v0.5.0
go: downloading k8s.io/apimachinery v0.17.0
go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: downloading github.com/coreos/go-iptables v0.4.5
go: downloading github.com/safchain/ethtool v0.0.0-20200804214954-8f958a28363a
go: downloading github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d
go: downloading github.com/google/gofuzz v1.0.0
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading k8s.io/klog v1.0.0
go: downloading golang.org/x/net v0.0.0-20191004110552-13f9640d40b9
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/imdario/mergo v0.3.5
go: downloading golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
go: downloading golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
go: downloading k8s.io/utils v0.0.0-20191114184206-e782cd3c129f
go: downloading gopkg.in/yaml.v2 v2.2.4
go: downloading github.com/json-iterator/go v1.1.8
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading golang.org/x/text v0.3.2
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
k8s.io/apimachinery/pkg/selection
k8s.io/utils/integer
github.com/gogo/protobuf/sortkeys
golang.org/x/text/transform
k8s.io/apimachinery/pkg/util/sets
k8s.io/apimachinery/pkg/version
k8s.io/apimachinery/pkg/util/clock
github.com/containernetworking/plugins/pkg/ns
github.com/safchain/ethtool
github.com/containernetworking/cni/pkg/types
github.com/containernetworking/plugins/pkg/utils/hwaddr
github.com/coreos/go-iptables/iptables
github.com/vishvananda/netns
github.com/containernetworking/plugins/pkg/utils/sysctl
github.com/pkg/errors
github.com/go-logfmt/logfmt
github.com/containernetworking/cni/pkg/types/020
github.com/containernetworking/cni/pkg/utils
github.com/gogo/protobuf/proto
github.com/containernetworking/cni/pkg/types/current
github.com/intel/userspace-cni-network-plugin/logging
gopkg.in/inf.v0
github.com/vishvananda/netlink/nl
github.com/google/gofuzz
k8s.io/apimachinery/third_party/forked/golang/reflect
k8s.io/apimachinery/pkg/fields
github.com/containernetworking/cni/pkg/version
k8s.io/apimachinery/pkg/util/errors
k8s.io/klog
github.com/containernetworking/cni/pkg/skel
github.com/containernetworking/cni/pkg/invoke
k8s.io/apimachinery/pkg/conversion
k8s.io/apimachinery/pkg/util/validation/field
k8s.io/apimachinery/pkg/conversion/queryparams
k8s.io/apimachinery/pkg/util/json
k8s.io/apimachinery/pkg/util/naming
k8s.io/apimachinery/pkg/types
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
k8s.io/apimachinery/pkg/util/validation
github.com/vishvananda/netlink
golang.org/x/net/http2/hpack
k8s.io/apimachinery/pkg/util/runtime
github.com/golang/protobuf/proto
k8s.io/apimachinery/pkg/labels
gopkg.in/yaml.v2
github.com/modern-go/concurrent
golang.org/x/text/secure/bidirule
k8s.io/apimachinery/pkg/util/framer
github.com/modern-go/reflect2
k8s.io/client-go/pkg/version
github.com/davecgh/go-spew/spew
golang.org/x/crypto/ssh/terminal
golang.org/x/net/idna
golang.org/x/net/context/ctxhttp
k8s.io/client-go/util/connrotation
golang.org/x/oauth2/internal
k8s.io/client-go/tools/metrics
k8s.io/client-go/util/keyutil
golang.org/x/oauth2
k8s.io/client-go/util/cert
golang.org/x/net/http/httpguts
golang.org/x/time/rate
golang.org/x/net/http2
k8s.io/client-go/util/flowcontrol
github.com/imdario/mergo
github.com/json-iterator/go
github.com/spf13/pflag
sigs.k8s.io/yaml
k8s.io/client-go/util/homedir
k8s.io/apimachinery/pkg/util/wait
github.com/intel/userspace-cni-network-plugin/pkg/types
k8s.io/apimachinery/pkg/util/yaml
git.fd.io/govpp.git/api
github.com/lunixbochs/struc
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/runtime/schema
k8s.io/apimachinery/pkg/util/intstr
k8s.io/apimachinery/pkg/runtime
github.com/golang/protobuf/ptypes/timestamp
k8s.io/apimachinery/pkg/util/net
github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2
github.com/golang/protobuf/ptypes
git.fd.io/govpp.git/adapter
git.fd.io/govpp.git/codec
github.com/googleapis/gnostic/extensions
k8s.io/client-go/transport
github.com/fsnotify/fsnotify
git.fd.io/govpp.git/core
github.com/containernetworking/plugins/pkg/ip
github.com/googleapis/gnostic/compiler
github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
git.fd.io/govpp.git/adapter/socketclient
# github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
../cnivpp/api/bridge/bridge.go:52:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:53:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:54:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:55:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:56:3: cannot use 0 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:59:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:88:3: cannot use 0 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:119:3: cannot use swIfId (type uint32) as type l2.InterfaceIndex in field value
../cnivpp/api/bridge/bridge.go:122:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/bridge/bridge.go:145:3: cannot use swIfId (type uint32) as type l2.InterfaceIndex in field value
../cnivpp/api/bridge/bridge.go:145:3: too many errors
github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interfaces
github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif
github.com/googleapis/gnostic/OpenAPIv2
github.com/containernetworking/plugins/pkg/ipam
github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
k8s.io/apimachinery/pkg/runtime/serializer/recognizer
k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/pkg/runtime/serializer/streaming
# github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
../cnivpp/api/memif/memif.go:72:3: cannot use uint8(role) (type uint8) as type memif.MemifRole in field value
../cnivpp/api/memif/memif.go:73:3: cannot use uint8(mode) (type uint8) as type memif.MemifMode in field value
../cnivpp/api/memif/memif.go:94:13: cannot use reply.SwIfIndex (type memif.InterfaceIndex) as type uint32 in assignment
../cnivpp/api/memif/memif.go:117:3: cannot use swIfIndex (type uint32) as type memif.InterfaceIndex in field value
../cnivpp/api/memif/memif.go:172:30: cannot convert reply.HwAddr (type memif.MacAddress) to type net.HardwareAddr
../cnivpp/api/memif/memif.go:183:18: reply.AdminUpDown undefined (type *memif.MemifDetails has no field or method AdminUpDown)
../cnivpp/api/memif/memif.go:184:18: reply.LinkUpDown undefined (type *memif.MemifDetails has no field or method LinkUpDown)
../cnivpp/api/memif/memif.go:227:3: cannot use 1 (type untyped int) as type bool in field value
../cnivpp/api/memif/memif.go:229:3: cannot use ([]byte)(socketFile) (type []byte) as type string in field value
../cnivpp/api/memif/memif.go:251:3: cannot use 0 (type untyped int) as type bool in field value
../cnivpp/api/memif/memif.go:251:3: too many errors
k8s.io/client-go/tools/clientcmd/api
git.fd.io/govpp.git
k8s.io/apimachinery/pkg/runtime/serializer/json
github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
# github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
../cnivpp/api/interface/interface.go:44:3: cannot use swIfIndex (type uint32) as type interfaces.InterfaceIndex in field value
../cnivpp/api/interface/interface.go:46:3: unknown field 'AdminUpDown' in struct literal of type interfaces.SwInterfaceSetFlags
../cnivpp/api/interface/interface.go:67:3: cannot use swIfIndex (type uint32) as type interfaces.InterfaceIndex in field value
../cnivpp/api/interface/interface.go:68:3: cannot use isAdd (type uint8) as type bool in field value
../cnivpp/api/interface/interface.go:69:3: cannot use 0 (type untyped int) as type bool in field value
../cnivpp/api/interface/interface.go:74:7: req.IsIPv6 undefined (type *interfaces.SwInterfaceAddDelAddress has no field or method IsIPv6)
../cnivpp/api/interface/interface.go:75:7: req.Address undefined (type *interfaces.SwInterfaceAddDelAddress has no field or method Address)
../cnivpp/api/interface/interface.go:77:7: req.AddressLength undefined (type *interfaces.SwInterfaceAddDelAddress has no field or method AddressLength)
../cnivpp/api/interface/interface.go:79:7: req.IsIPv6 undefined (type *interfaces.SwInterfaceAddDelAddress has no field or method IsIPv6)
../cnivpp/api/interface/interface.go:80:7: req.Address undefined (type *interfaces.SwInterfaceAddDelAddress has no field or method Address)
../cnivpp/api/interface/interface.go:80:7: too many errors
k8s.io/client-go/tools/clientcmd/api/v1
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/runtime/serializer/protobuf
k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
k8s.io/api/admissionregistration/v1
k8s.io/api/authentication/v1
k8s.io/api/auditregistration/v1alpha1
k8s.io/api/admissionregistration/v1beta1
k8s.io/api/core/v1
k8s.io/api/authentication/v1beta1
k8s.io/api/authorization/v1
k8s.io/apimachinery/pkg/runtime/serializer/versioning
k8s.io/apimachinery/pkg/runtime/serializer
k8s.io/api/authorization/v1beta1
k8s.io/api/certificates/v1beta1
k8s.io/api/coordination/v1
k8s.io/api/coordination/v1beta1
k8s.io/api/flowcontrol/v1alpha1
k8s.io/api/rbac/v1
k8s.io/api/rbac/v1alpha1
k8s.io/api/rbac/v1beta1
k8s.io/client-go/pkg/apis/clientauthentication
k8s.io/client-go/rest/watch
k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1
k8s.io/client-go/pkg/apis/clientauthentication/v1beta1
k8s.io/apimachinery/pkg/api/meta
k8s.io/client-go/plugin/pkg/client/auth/exec
k8s.io/client-go/tools/clientcmd/api/latest
k8s.io/client-go/util/retry
k8s.io/client-go/rest
k8s.io/client-go/tools/auth
k8s.io/client-go/tools/clientcmd
k8s.io/api/batch/v1
k8s.io/api/apps/v1beta1
k8s.io/api/discovery/v1alpha1
k8s.io/api/autoscaling/v1
k8s.io/api/autoscaling/v2beta1
k8s.io/api/apps/v1
k8s.io/api/apps/v1beta2
k8s.io/api/autoscaling/v2beta2
k8s.io/api/batch/v1beta1
k8s.io/api/batch/v2alpha1
k8s.io/api/discovery/v1beta1
k8s.io/api/events/v1beta1
k8s.io/api/networking/v1
k8s.io/api/networking/v1beta1
k8s.io/api/extensions/v1beta1
k8s.io/api/node/v1alpha1
k8s.io/api/node/v1beta1
k8s.io/api/policy/v1beta1
k8s.io/api/scheduling/v1
k8s.io/api/scheduling/v1alpha1
k8s.io/api/scheduling/v1beta1
k8s.io/api/settings/v1alpha1
k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
k8s.io/client-go/tools/reference
k8s.io/client-go/kubernetes/scheme
k8s.io/client-go/kubernetes/typed/apps/v1beta1
k8s.io/client-go/kubernetes/typed/admissionregistration/v1
k8s.io/client-go/kubernetes/typed/apps/v1beta2
k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1
k8s.io/client-go/kubernetes/typed/authentication/v1
k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1
k8s.io/client-go/discovery
k8s.io/client-go/kubernetes/typed/apps/v1
k8s.io/client-go/kubernetes/typed/authentication/v1beta1
k8s.io/client-go/kubernetes/typed/authorization/v1
k8s.io/client-go/kubernetes/typed/authorization/v1beta1
k8s.io/client-go/kubernetes/typed/autoscaling/v1
k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1
k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2
k8s.io/client-go/kubernetes/typed/batch/v1
k8s.io/client-go/kubernetes/typed/batch/v1beta1
k8s.io/client-go/kubernetes/typed/batch/v2alpha1
k8s.io/client-go/kubernetes/typed/certificates/v1beta1
k8s.io/client-go/kubernetes/typed/coordination/v1
k8s.io/client-go/kubernetes/typed/coordination/v1beta1
k8s.io/client-go/kubernetes/typed/core/v1
k8s.io/client-go/kubernetes/typed/discovery/v1alpha1
k8s.io/client-go/kubernetes/typed/discovery/v1beta1
k8s.io/client-go/kubernetes/typed/events/v1beta1
k8s.io/client-go/kubernetes/typed/extensions/v1beta1
k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1
k8s.io/client-go/kubernetes/typed/networking/v1
k8s.io/client-go/kubernetes/typed/networking/v1beta1
k8s.io/client-go/kubernetes/typed/node/v1alpha1
k8s.io/client-go/kubernetes/typed/node/v1beta1
k8s.io/client-go/kubernetes/typed/policy/v1beta1
k8s.io/client-go/kubernetes/typed/rbac/v1
k8s.io/client-go/kubernetes/typed/rbac/v1alpha1
k8s.io/client-go/kubernetes/typed/rbac/v1beta1
k8s.io/client-go/kubernetes/typed/scheduling/v1
k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1
k8s.io/client-go/kubernetes/typed/scheduling/v1beta1
k8s.io/client-go/kubernetes/typed/settings/v1alpha1
k8s.io/client-go/kubernetes/typed/storage/v1
k8s.io/client-go/kubernetes/typed/storage/v1alpha1
k8s.io/client-go/kubernetes/typed/storage/v1beta1
k8s.io/client-go/kubernetes
github.com/intel/userspace-cni-network-plugin/pkg/k8sclient
github.com/intel/userspace-cni-network-plugin/pkg/annotations
github.com/intel/userspace-cni-network-plugin/pkg/configdata
github.com/intel/userspace-cni-network-plugin/cniovs
make: *** [Makefile:116: build] Error 2

Some info about the system:

Go version: 1.16.5
Linux machine 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I saw that
This plugin is recommended to be built with Go 1.11.10 and either OVS-DPDK 2.9.0-3 or VPP 19.04. Other versions of Go, OVS-DPDK and VPP are theoretically supported, but MIGHT cause unknown issue.
so my question is: is there a chance to build and use CNI 1.3 with VPP 21.06?

Any help is appreciated. Thanks!

cannot set multiple rx queue for the dpdkvhostuser

When i use the userspace to deploy the ovs-dpdk dpdkvhostuser interface, the interface is set to have only 1 tx_queue and 1 rx_queue, and i'd like to know how can i set multiple queues for the virtual device, i'm using this plugin with multus in k8s

I check the queue nums by exec this command:
ovs-appctl dpctl/show

An example like this shown:
port 2: 32mg432kb32j-net1 (dpdkvhostuser: configured_rx_queues=1, configured_rx_queues=1, mtu=1500, requested_rx_queues=1, requested_tx_queues=1)

The ovs is 2.14.3 and the dpdk 19.11.10

Hope your reponse, thanks.

Some problems about VPP config for Vhost-user CNI plugin

@rkamudhan @john
I am using your vhost-user-net-plugin for vpp-17.10, but met some problems when I use it to config the Vhost-user for K8s Pod, which leads the 2 container can not ping each other successfully:

  1. For the vpp-config.py, the function
    def configVhostPortRoute(port, containerIP, containerMAC):
    1.1 For the command:
    cmd = 'vppctl set int unnum {} use loop0'.format(port), I don't find a command to create the loop0 interface, is the loop0 should be created beforehand and what are the related configurations about it?
    1.2 For the command:
    cmd = 'vppctl show tap', it shows:
    unknown input `vppctl show tap', so what are the commands about the "tap", so that the subsequent "ip link set " command can be executed?

  2. For the created vpp container by this vhost-user-net-plugin, I see in the README.md:
    "Run the VPP in a container A as follows"
    " # vpp unix {log /tmp/vpp.log cli-listen 0.0.0.0:5002} api-trace { on }
    dpdk {coremask 0x2 no-multi-seg no-pci singlefile 512 extra --vdev=virtio_user0,path=/vhost-user-net-plugin/4d578250ad8d760c0722be78badb4b4b6d57fed8f95dea23aaa0065aa8657b29/4d578250ad8d-net1,mac=e2:52:b5:7b:58:ad } cpu {skip-cores 1}"
    " # vppctl set int state virtio_user0 up"
    " # vppctl set int ip table virtio_user0 0"
    Run the VPP in another container B and ping the Container A
    " # vppctl ping 10.56.217.132"

And I do see a VirtioUser0/0/0 interface in the container's vpp, but I don't see how the IP address(10.56.217.131,10.56.217.132) are configured in the vpp, could you give a more detailed information about the configuration in the vpp container?

I tried to set the IP address on this VirtioUser0/0/0 interface, but it does not work. Could you give some introduction about your configuration here.

when using ovs pod dont bind to sockets

Im running with ovs-dpdk and multus,
when launching pods from the examples the /vhu folder is empty..
on the host:

root@dip-edge-dpdk:/opt/userspace-cni-network-plugin# tree /var/lib/cni/vhostuser
/var/lib/cni/vhostuser
├── de6ec0df4f23f3109238186cf70db614e6b9980203d0cb7279922a395d1aefa7
└── e0c0399f331a90ff2e18d73ea774482566a370229fd15ba75715562c2d9e335e

2 directories, 0 files

also the interfaces dont deleted from the ovs itself...

root@dip-edge-dpdk:/opt/userspace-cni-network-plugin# ovs-vsctl show
544b38b1-ba17-43c1-899d-4fae29f506b4
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "f4af47d409a0-net2"
            Interface "f4af47d409a0-net2"
                type: dpdkvhostuser
        Port "1b7f63c32139-net1"
            Interface "1b7f63c32139-net1"
                type: dpdkvhostuser
        Port "0dd265fd7cf8-net1"
            Interface "0dd265fd7cf8-net1"
                type: dpdkvhostuser
        Port "de6ec0df4f23-net1"
            Interface "de6ec0df4f23-net1"
                type: dpdkvhostuser
        Port "f4af47d409a0-net1"
            Interface "f4af47d409a0-net1"
                type: dpdkvhostuser
        Port "e0c0399f331a-net1"
            Interface "e0c0399f331a-net1"
                type: dpdkvhostuser

Problem when testing ovs-dpdk

After creating pod, with following mount folder:
(I tried to set the shared-dir to /var/run/openvswitch/unique_directory but got the error Rename ERROR:... invalid cross-device link so, I use the default folder for testing purpose)

    - mountPath: /vhu
      name: shared-dir
volumes:
  - name: shared-dir
    hostPath:
      path: /var/run/openvswitch/

I see the socket files show up in /var/run/openvswitch/, but when testing with testpmd, its always showing 0 statistic. I don't know how to fix this..

build userspace cni failed

hello,
First, followed https://github.com/intel/userspace-cni-network-plugin#building-vpp-cni-library-with-ovs , I build vpp cni library with ovs successfully

./usr/include/vpp-api/client/vppapiclient.h
21024 blocks
./usr/lib64/libvppapiclient.so.0.0.0
537169 blocks
./usr/share/vpp/api/interface.api.json
./usr/share/vpp/api/l2.api.json
./usr/share/vpp/api/memif.api.json
./usr/share/vpp/api/vhost_user.api.json
./usr/share/vpp/api/vpe.api.json
537169 blocks
Installed /usr/include/vpp-api/client/vppapiclient.h
Installed /usr/lib64/libvppapiclient.so
Installed /usr/share/vpp/api/interface.api.json /usr/share/vpp/api/l2.api.json /usr/share/vpp/api/memif.api.json /usr/share/vpp/api/vhost_user.api.json /usr/share/vpp/api/vpe.api.json
OVS Python Script not installed. Installing now.

Second, when building userspace cni, an error occured

github.com/intel/userspace-cni-network-plugin/vendor/github.com/lunixbochs/struc
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/l2
github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
# github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
../cnivpp/api/bridge/bridge.go:121:3: unknown field 'PortType' in struct literal of type l2.SwInterfaceSetL2Bridge
../cnivpp/api/bridge/bridge.go:147:3: unknown field 'PortType' in struct literal of type l2.SwInterfaceSetL2Bridge
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/adapter
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/codec
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/examples/binapi/memclnt
github.com/intel/userspace-cni-network-plugin/vendor/github.com/fsnotify/fsnotify
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/adapter/socketclient
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git
github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/interfaces
github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
github.com/intel/userspace-cni-network-plugin/vendor/git.fd.io/govpp.git/core/bin_api/memif
github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
make: *** [build] Error 2

kernel info:

uname -a
Linux ljhuang 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Thanks

cant upgrade vpp bin api from 0.7.0 to 0.8.0 in dockerfile

`root@ef1dc8d72857:~/userspace-cni-network-plugin# make generate

Used in dockerfile

/root/userspace-cni-network-plugin/cnivpp/api/bridge
INFO[0000] VPP version was manually set to "23.02" via VPP_VERSION env var
INFO[0000] Generating 234 files
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/infra
INFO[0000] VPP version was manually set to "23.02" via VPP_VERSION env var
INFO[0000] Generating 234 files
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/interface
INFO[0000] VPP version was manually set to "23.02" via VPP_VERSION env var
INFO[0000] Generating 234 files
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/memif
INFO[0000] VPP version was manually set to "23.02" via VPP_VERSION env var
INFO[0000] Generating 234 files
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/vhostuser
INFO[0000] VPP version was manually set to "23.02" via VPP_VERSION env var
INFO[0000] Generating 234 files
/root/userspace-cni-network-plugin
root@ef1dc8d72857:/userspace-cni-network-plugin# go get go.fd.io/govpp/binapigen/[email protected]
go: upgraded go.fd.io/govpp v0.7.0 => v0.8.0
root@ef1dc8d72857:
/userspace-cni-network-plugin# make generate

Used in dockerfile

/root/userspace-cni-network-plugin/cnivpp/api/bridge
binapi-generator: no files to generate
exit status 1
bridge.go:20: running "go": exit status 1
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/infra
binapi-generator: no files to generate
exit status 1
infra.go:20: running "go": exit status 1
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/interface
binapi-generator: no files to generate
exit status 1
interface.go:20: running "go": exit status 1
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/memif
binapi-generator: no files to generate
exit status 1
memif.go:20: running "go": exit status 1
/root/userspace-cni-network-plugin
/root/userspace-cni-network-plugin/cnivpp/api/vhostuser
binapi-generator: no files to generate
exit status 1
vhostuser.go:20: running "go": exit status 1
/root/userspace-cni-network-plugin
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.