aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml13
-rw-r--r--platform/linux-generic/test/packet_align.conf21
-rwxr-xr-xscripts/ci/check_pktio.sh14
3 files changed, 48 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index e07fadf61..e75ec5dc6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -200,6 +200,19 @@ jobs:
-e ODP_CONFIG_FILE=/odp/platform/linux-generic/test/inline-timer.conf
${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check_inline_timer.sh
- stage: test
+ env: TEST=packet_align
+ install:
+ - true
+ compiler: gcc
+ script:
+ - if [ -z "${DOCKER_NAMESPACE}" ] ; then export DOCKER_NAMESPACE="opendataplane"; fi
+ - docker run --privileged -i -t
+ -v `pwd`:/odp --shm-size 8g
+ -e CC="${CC}"
+ -e CONF=""
+ -e ODP_CONFIG_FILE=/odp/platform/linux-generic/test/packet_align.conf
+ ${DOCKER_NAMESPACE}/travis-odp-lng-ubuntu_16.04 /odp/scripts/ci/check_pktio.sh
+ - stage: test
env: TEST=distcheck
compiler: gcc
script:
diff --git a/platform/linux-generic/test/packet_align.conf b/platform/linux-generic/test/packet_align.conf
new file mode 100644
index 000000000..5cae76f63
--- /dev/null
+++ b/platform/linux-generic/test/packet_align.conf
@@ -0,0 +1,21 @@
+# Mandatory fields
+odp_implementation = "linux-generic"
+config_file_version = "0.1.12"
+
+pool: {
+ pkt: {
+ # Non-zero, larger than cache line size, power of two value.
+ base_align = 128
+ }
+
+ buf: {
+ # Non-zero, larger than cache line size, power of two value.
+ min_align = 256
+ }
+}
+
+pktio: {
+ # Ethernet header offset is 2 bytes, so that Ethernet payload
+ # starts at 16 byte alignment.
+ pktin_frame_offset = 2
+}
diff --git a/scripts/ci/check_pktio.sh b/scripts/ci/check_pktio.sh
new file mode 100755
index 000000000..d82fe8aad
--- /dev/null
+++ b/scripts/ci/check_pktio.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+
+"`dirname "$0"`"/build_x86_64.sh
+
+cd "$(dirname "$0")"/../..
+
+echo 1000 | tee /proc/sys/vm/nr_hugepages
+mkdir -p /mnt/huge
+mount -t hugetlbfs nodev /mnt/huge
+
+./platform/linux-generic/test/validation/api/pktio/pktio_run.sh
+
+umount /mnt/huge