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

Face creation on traffic generators. #57

Closed rohansuri1996 closed 2 years ago

rohansuri1996 commented 2 years ago

Create Ethernet ports for the faces needed in traffic generators. See face creation for instructions.

The input dispatching method in the traffic generator requires every face to have a separate input thread. Hence, the Ethernet port should be created with PCI driver and the RxFlow feature should be enabled.

For Ethernet ports with non-PCI driver or RxFlow disabled, you can run one traffic generator instance per port. However, such setup is not recommended because it is unreliable and slower.

The documents say that we need to create face for traffic generators before starting it. When I tried to create face for the host activated as traffic generator it throws an error-

'createFace is disallowed; is NDN-DPDK forwarder activated?'

yoursunny commented 2 years ago

Traffic generator doesn't support createFace mutation. You should first create the Ethernet port with createEthPort mutation, then use startTrafficGen mutation and pass the locator in face input field. See https://github.com/usnistgov/ndn-dpdk/blob/89ef85079ec392710505cd8e17936d2a69368ec3/sample/activate/gen-config.ts for an example.

Pesa commented 2 years ago

I have to agree with @rohansuri1996 that the current docs can be misleading. The difference between face and port may not be clear to someone reading this document. More importantly, we need to make it very explicit that only the ports need to created in advance, but not the faces. Referring to another doc called "face creation" is highly confusing in this context.

rohansuri1996 commented 2 years ago

Traffic generator doesn't support createFace mutation. You should first create the Ethernet port with createEthPort mutation, then use startTrafficGen mutation and pass the locator in face input field. See https://github.com/usnistgov/ndn-dpdk/blob/89ef85079ec392710505cd8e17936d2a69368ec3/sample/activate/gen-config.ts for an example.

Thanks now I understand that now.

One of my question is how are you passing the config file in the cli commands like-

TP ndndpdk-ctrl --cmdout start-trafficgen

Hint: pass parameters via stdin

I was trying to see the GraphQL operation used by a ndndpdk-ctrl command by adding --cmdout flag.

yoursunny commented 2 years ago

NDN-DPDK does not have a config file. Everything goes through the API.

When you run gen-config.ts script, it prints a JSON object as standard output. You can pipe this object as standard input of ndndpdk-ctrl --cmdout start-trafficgen command, which will then print the GraphQL command to standard output.

yoursunny commented 2 years ago

More importantly, we need to make it very explicit that only the ports need to created in advance, but not the faces.

This is updated in 9583e4e7d48bbe56f8aa2d1520f6da3e09682b74 :