Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1994

af_xdp: vpp hangs on kubernetes clusters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • None

      Problem:

      I'm trying to use af_xdp plugin in kubernetes. But after creating vpp af_xdp interface the whole node just hangs.

      Steps to reproduce:

      1. kubectl installation:
      https://kubernetes.io/docs/tasks/tools/

      2. Kind tool installation.
      For simplicity, we will use a local cluster created by kind.
      https://kind.sigs.k8s.io/docs/user/quick-start/

      3. Create a cluster.
      Run:

      $ kind create cluster --config cluster-config.yaml
      

      (cluster-config.yaml is attached)

      4. Create pods with vpp:

      $ kubectl apply -f govpp.yaml
      

      (govpp.yaml is attached)

      5. Take a look at the current pods:

      $ kubectl get pods
      NAME          READY   STATUS        RESTARTS   AGE
      govpp-9rqjm   1/1     Running       0          6s
      govpp-hj7m9   1/1     Running       0          6s
      

      6. Go to the shell on one of the pods:

      $ kubectl exec -it govpp-hj7m9 bash
      root@kind-worker:/#
      

      7. ip link

      root@kind-worker:/# ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      324: eth0@if325: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
          link/ether 02:42:ac:12:00:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
      

      8. Run vpp

      root@kind-worker:/# vpp unix { interactive cli-listen 127.0.0.1:5002 }
      

      9. Create af_xdp

      vpp# create interface af_xdp host-if eth0
      

      After that it seems that the whole node just hangs. And unfortunately I can't see any logs. And I noticed this not only on kind-cluster
      It is worth adding that it hangs only when I use eth0 interface. If I add any veth-pair manually and create af_xdp - i don't see any freezes.

      Additional information:

      root@kind-worker:/# uname -a
      Linux kind-worker 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
      

      VPP-image was taken from here - https://github.com/edwarnicke/govpp/pkgs/container/govpp%2Fvpp.

      vpp# show version 
      vpp v21.06.0-9~g16f166164 built by root on 40993b011c90 at 2021-08-17T13:00:00
      

            bganne BenoƮt Ganne
            ArtemGlazychev Artem Glazychev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: