+function dpdk_l3fwd_check () {
+
+ # DPDK l3fwd check state.
+
+ set -exuo pipefail
+
+ for attempt in {1..60}; do
+ echo "Checking if l3fwd state is ok, attempt nr ${attempt}"
+ if fgrep "Port 0 Link up" screenlog.0 && \
+ fgrep "Port 1 Link up" screenlog.0; then
+ cat screenlog.0
+ dpdk_l3fwd_pid
+ exit 0
+ fi
+ sleep 1
+ done
+ cat screenlog.0
+
+ exit 1
+}
+
+
+function dpdk_l3fwd_pid () {
+ l3fwd_pid="$(pidof dpdk-l3fwd)"
+ if [ ! -z "${l3fwd_pid}" ]; then
+ echo "L3fwd process ID: ${l3fwd_pid}"
+ else
+ echo "L3fwd not running!"
+ fi
+}
+
+