usnistgov / ndn-dpdk

NDN-DPDK: High-Speed Named Data Networking Forwarder
https://www.nist.gov/publications/ndn-dpdk-ndn-forwarding-100-gbps-commodity-hardware
Other
131 stars 26 forks source link

Error in new version:json: unknown field "vdevConfig #54

Closed rohansuri1996 closed 2 years ago

rohansuri1996 commented 2 years ago

Hi I migrated from my old version of the ndn-dpdk to the new version and also migrated my whole project to the newer version, when we were using the createFace mutation we used to pass vdevConfigin the locator and now its throwing an error. Was it removed in the newer version?

rohansuri1996 commented 2 years ago
 mutation createFace($locator: JSON!) {
                createFace(locator: $locator) {
                    id
                }
            }
        """, {
            'locator': {
                'scheme': 'ether',
                'local': localMAC ,
                'remote': remoteMAC,
                'vdevConfig': {
                'xdp': {
                    'disabled': True
                }
            }
            }
        }

This is how Im passing the mutation

yoursunny commented 2 years ago

Yes it's removed. You need to create the Ethernet port with createEthPort mutation before creating Ethernet-based faces. See docs/face.md.

rohansuri1996 commented 2 years ago

ok thanks understood. I will add the new code for containernet script here and close the issue soon.

rohansuri1996 commented 2 years ago

Hey, I understood the process but it throws an error that operation is not supported.

dpdk-devbind.py --status-dev net

0000:00:19.0 'Ethernet Connection I217-LM 153a' if=enp0s25 drv=e1000e unused=vfio-pci

  1. I executed this command to get my PCI address of my ethernet.

P ndndpdk-ctrl create-eth-port --pci 0000:00:19.0 --mtu 1500

  1. Executed the following command to create ports on my docker containers.

{"level":"error","ts":1641994580.4854138,"logger":"DPDK","msg":"EAL: Failed to attach device on primary process"} {"level":"error","ts":1642000740.3055458,"logger":"eal","msg":"rte_dev_probe error","addr":"0000:00:19.0","args":"","error":"95 Operation not supported"} {"level":"error","ts":1642000740.305741,"logger":"DPDK","msg":"EAL: Driver cannot attach the device (0000:00:19.0)"} {"level":"error","ts":1642000740.3059194,"logger":"DPDK","msg":"EAL: Failed to attach device on primary process"}

  1. I am getting the following errors when I checked the logs of the docker container. Is this some sort of hardwware issue. It used to work earlier when we didn't use to create ports.
yoursunny commented 2 years ago

0000:00:19.0 'Ethernet Connection I217-LM 153a' if=enp0s25 drv=e1000e unused=vfio-pci

For QEMU e1000 device, use dpdk-devbind.py to bind it to vfio-pci driver. See Driver for VM Emulated Devices.

Alternatively, create the port with XDP or AF_PACKET driver, instead of PCI.

rohansuri1996 commented 2 years ago

Alternatively, create the port with XDP or AF_PACKET driver, instead of PCI.

I tried with the XDP driver and I ran into another problem that I am not able to solve.


sudo chmod 666 /var/run/docker.sock
CTPID=$(docker inspect --format='{{ .State.Pid }}' mn.Q)
sudo ip link set enp0s25 netns $CTPID
docker exec mn.Q ip link set enp0s25 up
Q ndndpdk-ctrl create-eth-port --netif enp0s25 --xdp --mtu 1000

It is giving me an error which I cannot even debug from the docker logs.

graphql: runtime error: invalid memory address or nil pointer dereference

Thank you for your support.

yoursunny commented 2 years ago

Since you used xdp: { disabled: true } in the past, maybe you should try AF_PACKET driver?


graphql: runtime error: invalid memory address or nil pointer dereference

https://github.com/graphql-go/graphql/issues/243

rohansuri1996 commented 2 years ago

Still the same error with AF_PACKET driver

Is it still possible to use the configuration we were using without creating ethernet ports?

yoursunny commented 2 years ago

Are you sure enp0s25 is the correct Ethernet adapter name? Does this network adapter exist inside the container? If you are creating ports in multiple containers, does this network adapter exist inside every container?

Is there some error message seen in docker logs when you send the port creation command? Even if the GraphQL client cannot see a meaningful error message, there would be error messages in the service logs.

sudo chmod 666 /var/run/docker.sock

Add yourself to docker group. Don't change permission on the Docker socket.

sudo ip link set enp0s25 netns $CTPID docker exec mn.Q ip link set enp0s25 up

Did both of these commands succeed? If you have multiple containers, did they succeed on every container?

Is it still possible to use the configuration we were using without creating ethernet ports?

Not possible with any Ethernet-based faces. You can use memif or socket faces without Ethernet ports.

rohansuri1996 commented 2 years ago

Are you sure enp0s25 is the correct Ethernet adapter name?

wlx70f11c14c881 wifi connected confidentiatl
br-54089fa07362 bridge connected br-54089fa07362
docker0 bridge connected docker0
enp0s25 ethernet connecting (getting IP configuration) Kabelgebundene Verbindung 1 veth242966a ethernet unmanaged --
veth7b3cf9f ethernet unmanaged --
vethc026be9 ethernet unmanaged --
lo loopback unmanaged --

I have these network interfaces and enp0s25 is the ethernet interface.

Is there some error message seen in docker logs when you send the port creation command?

As mentioned earlier its not giving any significant error.

Did both of these commands succeed? If you have multiple containers, did they succeed on every container?

Yes

Not possible with any Ethernet-based faces. You can use memif or socket faces without Ethernet ports.

If you don't mind can I ask what was the difference between the old implementation and the new one as I am still learning about ICN networks. I guess being more specific to the hardware you are able to get more performance but I would not mind the previous implementation also as for our testbed here we were quiet happy with the ndn-dpdk performance but since I am using the latest image now we cannot develop further till it runs on all our hardware just like before.

yoursunny commented 2 years ago

It's highly unlikely that you have the docker0 network adapter inside the container, unless your container is launched with --network host flag. Then, NDN-DPDK container shouldn't be launched with --network host; it should run in its own network namespace, i.e. without that flag.

To see a list of network adapters inside the container, run this command: docker run CONTAINER-NAME ip link

yoursunny commented 2 years ago

ndndpdk-ctrl create-eth-port --netif enp0s25 --xdp --mtu 1000 graphql: runtime error: invalid memory address or nil pointer dereference

It turns out that I made a mistake during refactoring bea8303cc5b0996d619214458c21541fc1344f53 : missing NewEthtool function call, causing all attempts to create AF_XDP and AF_PACKET ports to fail with this panic. I did test this feature during refactoring, but then some code got deleted during code cleanup and I didn't re-test. This bug is fixed in 9583e4e7d48bbe56f8aa2d1520f6da3e09682b74 .