You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Include steps in the OVS-DPDK section of the README that tell the user
how to spin up a l3fwd pod and a pktgen pod. Pktgen sends traffic to
the l3fwd pod where it is forwarded back to pktgen. Pktgen can display
some statistics on the traffic.
Signed-off-by: Gary Loughnane <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+233
Original file line number
Diff line number
Diff line change
@@ -762,6 +762,239 @@ by getting the port numbers with `ovs-ofctl dump-ports br0` and configuring
762
762
flow, for example, from port 1 to port 2 with
763
763
`ovs-ofctl add-flow br0 in_port=1,action=output:2` and vice versa.
764
764
765
+
## Testing with DPDK L3FWD Application
766
+
767
+
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`.
768
+
769
+
### 1. Build the images to be used
770
+
771
+
Create the l3fwd Dockerfile:
772
+
```bash
773
+
$ cat <<EOF > l3fwd-dockerfile
774
+
FROM ubuntu:bionic
775
+
776
+
RUN apt-get update && apt-get install -y --no-install-recommends \\
777
+
build-essential make wget vim dpdk libnuma-dev \\
778
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
779
+
780
+
ENV DPDK_VERSION=17.11.3 \\
781
+
RTE_SDK=/usr/src/dpdk \\
782
+
RTE_TARGET=x86_64-native-linuxapp-gcc
783
+
784
+
RUN wget http://fast.dpdk.org/rel/dpdk-\${DPDK_VERSION}.tar.xz && tar xf dpdk-\${DPDK_VERSION}.tar.xz && \\
785
+
mv dpdk-stable-\${DPDK_VERSION} \${RTE_SDK}
786
+
787
+
RUN sed -i s/CONFIG_RTE_EAL_IGB_UIO=y/CONFIG_RTE_EAL_IGB_UIO=n/ \${RTE_SDK}/config/common_linuxapp \\
788
+
&& sed -i s/CONFIG_RTE_LIBRTE_KNI=y/CONFIG_RTE_LIBRTE_KNI=n/ \${RTE_SDK}/config/common_linuxapp \\
789
+
&& sed -i s/CONFIG_RTE_KNI_KMOD=y/CONFIG_RTE_KNI_KMOD=n/ \${RTE_SDK}/config/common_linuxapp
790
+
791
+
RUN cd \${RTE_SDK} && make install T=\${RTE_TARGET} && make -C examples
The pktgen application should launch. Among the statistics, make note of the pktgen source MAC address listed as ```Src MAC Address```. For example:
963
+
```bash
964
+
Src MAC Address : f2:89:22:4e:28:3b
965
+
```
966
+
967
+
In another terminal, open a bash shell in the l3fwd pod:
968
+
```bash
969
+
kubectl exec -it dpdk-l3fwd-<ID> bash
970
+
```
971
+
972
+
Export the port ID prefex and start the l3fwd application. Set the destination MAC address using the ```--eth-dest``` argument. This should be the ```Src MAC Address``` previously noted from the pktgen pod (adjust cores, memory, etc. to suit your system):
The l3fwd app should start up. Among the information printed to the screen will be the ```Address```. This is the MAC address of the l3fwd port, make note of it.
979
+
980
+
Back on the pktgen pod, set the destination MAC address to that of the l3fwd port:
981
+
```bash
982
+
Pktgen:/>set 0 dst mac <l3fwd-mac-address>
983
+
```
984
+
985
+
Start traffic generation:
986
+
```bash
987
+
Pktgen:/> start 0
988
+
```
989
+
990
+
You should see the packet counts for Tx and Rx increase, verifying that packets are being transmitted by pktgen and are being sent back via l3fwd running in the other pod.
991
+
992
+
To exit:
993
+
```bash
994
+
Pktgen:/> stop 0
995
+
Pktgen:/> quit
996
+
```
997
+
765
998
766
999
# Contacts
767
1000
For any questions about Userspace CNI, please reach out on github issue or feel free to contact the developer @Kural, @abdul or @bmcfall in our [Intel-Corp Slack](https://intel-corp.herokuapp.com/)
0 commit comments