This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 45cd0923809b2b4b972c9e9843ca7323183380c7 (commit)
via 8de012860878e3cb70aab7b6151223b201a8d9a1 (commit)
via 52d54fae53f5e65f232cb21b116e51ea36b4eb0b (commit)
from eab91f7101cdf47c59b14b5a511a82c701e66ff4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 45cd0923809b2b4b972c9e9843ca7323183380c7
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Oct 24 15:54:53 2018 +0300
linux-gen: sched: increase max spread weight
Increase max spread weight. The default value is kept the same.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c
index 456704a08..7208200aa 100644
--- a/platform/linux-generic/odp_schedule_basic.c
+++ b/platform/linux-generic/odp_schedule_basic.c
@@ -58,7 +58,7 @@ ODP_STATIC_ASSERT((ODP_SCHED_PRIO_NORMAL > 0) &&
/* A thread polls a non preferred sched queue every this many polls
* of the prefer queue. */
-#define MAX_PREFER_WEIGHT 63
+#define MAX_PREFER_WEIGHT 127
#define MIN_PREFER_WEIGHT 1
#define MAX_PREFER_RATIO (MAX_PREFER_WEIGHT + 1)
commit 8de012860878e3cb70aab7b6151223b201a8d9a1
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Oct 24 15:45:38 2018 +0300
linux-gen: sched: use spread weight from config file
Use the new config file option instead of fixed prefer ratio.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c
index 214d42c8b..456704a08 100644
--- a/platform/linux-generic/odp_schedule_basic.c
+++ b/platform/linux-generic/odp_schedule_basic.c
@@ -333,7 +333,7 @@ static inline uint8_t prio_spread_index(uint32_t index)
static void sched_local_init(void)
{
int i;
- uint8_t spread;
+ uint8_t spread, prefer_ratio;
uint8_t num_spread = sched->config.num_spread;
uint8_t offset = 1;
@@ -344,11 +344,12 @@ static void sched_local_init(void)
sched_local.stash.queue = ODP_QUEUE_INVALID;
spread = prio_spread_index(sched_local.thr);
+ prefer_ratio = sched->config.prefer_ratio;
for (i = 0; i < SPREAD_TBL_SIZE; i++) {
sched_local.spread_tbl[i] = spread;
- if (num_spread > 1 && (i % MAX_PREFER_RATIO) == 0) {
+ if (num_spread > 1 && (i % prefer_ratio) == 0) {
sched_local.spread_tbl[i] = prio_spread_index(spread +
offset);
offset++;
@@ -362,6 +363,7 @@ static int schedule_init_global(void)
{
odp_shm_t shm;
int i, j, grp;
+ int prefer_ratio;
ODP_DBG("Schedule init ... ");
@@ -382,8 +384,10 @@ static int schedule_init_global(void)
return -1;
}
+ prefer_ratio = sched->config.prefer_ratio;
+
/* When num_spread == 1, only spread_tbl[0] is used. */
- sched->max_spread = (sched->config.num_spread - 1) * MAX_PREFER_RATIO;
+ sched->max_spread = (sched->config.num_spread - 1) * prefer_ratio;
sched->shm = shm;
odp_spinlock_init(&sched->mask_lock);
commit 52d54fae53f5e65f232cb21b116e51ea36b4eb0b
Author: Petri Savolainen <petri.savolainen(a)linaro.org>
Date: Wed Oct 24 15:20:21 2018 +0300
linux-gen: sched: add spread weight config file option
Add new config file option to control scheduler internal queue
preference ratio.
Signed-off-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/config/odp-linux-generic.conf b/config/odp-linux-generic.conf
index af651d7f6..2417d23f2 100644
--- a/config/odp-linux-generic.conf
+++ b/config/odp-linux-generic.conf
@@ -16,7 +16,7 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.1"
+config_file_version = "0.1.2"
# Shared memory options
shm: {
@@ -80,13 +80,27 @@ queue_basic: {
}
sched_basic: {
- # Priority level spread. Each priority level is spread into multiple
- # scheduler internal queues. A higher spread value typically improves
- # parallelism and thus is better for high thread counts, but causes
- # uneven service level for low thread counts. Typically, optimal
- # value is the number of threads using the scheduler.
+ # Priority level spread
+ #
+ # Each priority level is spread into multiple scheduler internal queues.
+ # This value defines the number of those queues. Minimum value is 1.
+ # Each thread prefers one of the queues over other queues. A higher
+ # spread value typically improves parallelism and thus is better for
+ # high thread counts, but causes uneven service level for low thread
+ # counts. Typically, optimal value is the number of threads using
+ # the scheduler.
prio_spread = 4
+ # Weight of the preferred scheduler internal queue
+ #
+ # Each thread prefers one of the internal queues over other queues.
+ # This value controls how many times the preferred queue is polled
+ # between a poll to another internal queue. Minimum value is 1. A higher
+ # value typically improves parallelism as threads work mostly on their
+ # preferred queues, but causes uneven service level for low thread
+ # counts as non-preferred queues are served less often
+ prio_spread_weight = 63
+
# Burst size configuration per priority. The first array element
# represents the highest queue priority. The scheduler tries to get
# burst_size_default[prio] events from a queue and stashes those that
diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c
index 58396293b..214d42c8b 100644
--- a/platform/linux-generic/odp_schedule_basic.c
+++ b/platform/linux-generic/odp_schedule_basic.c
@@ -58,10 +58,12 @@ ODP_STATIC_ASSERT((ODP_SCHED_PRIO_NORMAL > 0) &&
/* A thread polls a non preferred sched queue every this many polls
* of the prefer queue. */
-#define PREFER_RATIO 64
+#define MAX_PREFER_WEIGHT 63
+#define MIN_PREFER_WEIGHT 1
+#define MAX_PREFER_RATIO (MAX_PREFER_WEIGHT + 1)
/* Spread weight table */
-#define SPREAD_TBL_SIZE ((MAX_SPREAD - 1) * PREFER_RATIO)
+#define SPREAD_TBL_SIZE ((MAX_SPREAD - 1) * MAX_PREFER_RATIO)
/* Maximum number of packet IO interfaces */
#define NUM_PKTIO ODP_CONFIG_PKTIO_ENTRIES
@@ -182,6 +184,7 @@ typedef struct {
uint8_t burst_default[NUM_PRIO];
uint8_t burst_max[NUM_PRIO];
uint8_t num_spread;
+ uint8_t prefer_ratio;
} config;
uint16_t max_spread;
@@ -256,13 +259,29 @@ static int read_config_file(sched_global_t *sched)
}
if (val > MAX_SPREAD || val < MIN_SPREAD) {
- ODP_ERR("Bad value %s = %u\n", str, val);
+ ODP_ERR("Bad value %s = %u [min: %u, max: %u]\n", str, val,
+ MIN_SPREAD, MAX_SPREAD);
return -1;
}
sched->config.num_spread = val;
ODP_PRINT(" %s: %i\n", str, val);
+ str = "sched_basic.prio_spread_weight";
+ if (!_odp_libconfig_lookup_int(str, &val)) {
+ ODP_ERR("Config option '%s' not found.\n", str);
+ return -1;
+ }
+
+ if (val > MAX_PREFER_WEIGHT || val < MIN_PREFER_WEIGHT) {
+ ODP_ERR("Bad value %s = %u [min: %u, max: %u]\n", str, val,
+ MIN_PREFER_WEIGHT, MAX_PREFER_WEIGHT);
+ return -1;
+ }
+
+ sched->config.prefer_ratio = val + 1;
+ ODP_PRINT(" %s: %i\n", str, val);
+
str = "sched_basic.burst_size_default";
if (_odp_libconfig_lookup_array(str, burst_val, NUM_PRIO) !=
NUM_PRIO) {
@@ -329,7 +348,7 @@ static void sched_local_init(void)
for (i = 0; i < SPREAD_TBL_SIZE; i++) {
sched_local.spread_tbl[i] = spread;
- if (num_spread > 1 && (i % PREFER_RATIO) == 0) {
+ if (num_spread > 1 && (i % MAX_PREFER_RATIO) == 0) {
sched_local.spread_tbl[i] = prio_spread_index(spread +
offset);
offset++;
@@ -364,7 +383,7 @@ static int schedule_init_global(void)
}
/* When num_spread == 1, only spread_tbl[0] is used. */
- sched->max_spread = (sched->config.num_spread - 1) * PREFER_RATIO;
+ sched->max_spread = (sched->config.num_spread - 1) * MAX_PREFER_RATIO;
sched->shm = shm;
odp_spinlock_init(&sched->mask_lock);
diff --git a/platform/linux-generic/test/process-mode.conf b/platform/linux-generic/test/process-mode.conf
index d80df25c4..7a06544ab 100644
--- a/platform/linux-generic/test/process-mode.conf
+++ b/platform/linux-generic/test/process-mode.conf
@@ -1,6 +1,6 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.1"
+config_file_version = "0.1.2"
# Shared memory options
shm: {
-----------------------------------------------------------------------
Summary of changes:
config/odp-linux-generic.conf | 26 +++++++++++++++-----
platform/linux-generic/odp_schedule_basic.c | 35 ++++++++++++++++++++++-----
platform/linux-generic/test/process-mode.conf | 2 +-
3 files changed, 50 insertions(+), 13 deletions(-)
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via eab91f7101cdf47c59b14b5a511a82c701e66ff4 (commit)
from cc91c95216ca80d17c638c07659873ecf24f25e6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eab91f7101cdf47c59b14b5a511a82c701e66ff4
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Sun Oct 21 10:19:41 2018 +0300
remove scripts/build-pktio-dpdk
Script was introduced to quick build odp with dpdk pktio
support for dev or testing propose. Now it's more easy to
run docker container with same parameters as CI does.
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-and-tested-by: Matias Elo <matias.elo(a)nokia.com>
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 6b345b9c3..abe6d7411 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -166,23 +166,42 @@ Prerequisites for building the OpenDataPlane (ODP) API
Use DPDK for ODP packet I/O.
+ Note: only packet I/O is accelerated with DPDK. Use
+ https://github.com/Linaro/odp-dpdk.git
+ for fully accelerated odp dpdk platform.
+
+3.4.1 DPDK pktio requirements
+
DPDK pktio adds a depency to NUMA library.
# Debian/Ubuntu
$ sudo apt-get install libnuma-dev
# CentOS/RedHat/Fedora
$ sudo yum install numactl-devel
- Note: only packet I/O is accelerated with DPDK. Use
- https://github.com/Linaro/odp-dpdk.git
- for fully accelerated odp dpdk platform.
+3.4.2 Native DPDK install
+ # Debian/Ubuntu starting from 18.04
+ $ sudo apt-get install dpdk-dev
+
+3.4.2 Built DPDK from src
+ git clone --branch=17.11 http://dpdk.org/git/dpdk-stable dpdk
+
+ #Make and edit DPDK configuration
+ TARGET="x86_64-native-linuxapp-gcc"
+ make config T=${TARGET} O=${TARGET}
+ pushd ${TARGET}
-3.4.1 Building DPDK and ODP with DPDK pktio support
+ #To use I/O without DPDK supported NIC's enable pcap pmd:
+ sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
+ popd
- DPDK packet I/O has been tested to work with DPDK v17.11.
+ #Build DPDK
+ make build O=${TARGET} EXTRA_CFLAGS="-fPIC"
+ make install O=${TARGET} DESTDIR=${TARGET}
- Follow steps in ./scripts/build-pktio-dpdk
+ #compile ODP
+ ./configure --with-dpdk-path=`pwd`/dpdk/${TARGET}/usr/local
-3.4.2 Setup system
+3.4.3 Setup system
# Load DPDK modules
$ sudo /sbin/modprobe uio
@@ -194,13 +213,13 @@ Prerequisites for building the OpenDataPlane (ODP) API
512 x 2MB hugepages. All this can be done with the DPDK setup script
(<dpdk-dir>/tools/dpdk-setup.sh).
-3.4.3 Running ODP with DPDK pktio
+3.4.4 Running ODP with DPDK pktio
ODP applications will try use DPDK for packet I/O by default. If some other
I/O type is desired instead, DPDK I/O can be disabled by setting the
environment variable ODP_PKTIO_DISABLE_DPDK.
- DPDK interfaces are accessed using indices. For example, two first DPDK
+ DPDK interfaces are accessed using indexes. For example, two first DPDK
interfaces can be used with the odp_l2fwd example as follows:
$ cd <odp_dir>
$ sudo ./test/performance/odp_l2fwd -i 0,1 -c 2 -m 0
diff --git a/scripts/build-pktio-dpdk b/scripts/build-pktio-dpdk
deleted file mode 100755
index b0c0a4d0e..000000000
--- a/scripts/build-pktio-dpdk
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
-
-export ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||')
-pushd ${ROOT_DIR}
-
-echo '#include "pcap.h"' | cpp -H -o /dev/null 2>&1
-if [ "$?" != "0" ]; then
- echo "Error: pcap is not installed. You may need to install libpcap-dev"
-fi
-
-echo '#include "numa.h"' | cpp -H -o /dev/null 2>&1
-if [ "$?" != "0" ]; then
- echo "Error: NUMA library is not installed. You need to install libnuma-dev"
- exit 1
-fi
-
-git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=17.11 http://dpdk.org/git/dpdk-stable dpdk
-pushd dpdk
-git log --oneline --decorate
-
-#Make and edit DPDK configuration
-make config T=${TARGET} O=${TARGET}
-pushd ${TARGET}
-#To use I/O without DPDK supported NIC's enable pcap pmd:
-sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
-popd
-
-#Build DPDK
-make build O=${TARGET} EXTRA_CFLAGS="-fPIC"
-make install O=${TARGET} DESTDIR=${TARGET}
-popd
-
-#Build ODP
-./bootstrap;
-./configure --enable-test-vald --enable-test-perf --enable-test-cpp \
- --enable-debug --enable-debug-print \
- --with-dpdk-path=`pwd`/dpdk/${TARGET}/usr/local
-make
-----------------------------------------------------------------------
Summary of changes:
DEPENDENCIES | 37 ++++++++++++++++++++++++++++---------
scripts/build-pktio-dpdk | 40 ----------------------------------------
2 files changed, 28 insertions(+), 49 deletions(-)
delete mode 100755 scripts/build-pktio-dpdk
hooks/post-receive
--
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, master has been updated
via 690bacc61c55e4f8f3195faaac068da83790ebf4 (commit)
from 0287f1432eda1cf3e7fb8323e0fda838cf744816 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 690bacc61c55e4f8f3195faaac068da83790ebf4
Author: Matias Elo <matias.elo(a)nokia.com>
Date: Thu Oct 18 09:49:01 2018 +0300
linux-gen: pool: increase minimum packet segment length
Some DPDK NICs need at least 2176 byte buffers (2048B + headroom) to not
segment standard ethernet frames. Increase minimum segment length to avoid
this and add matching check to zero-copy dpdk pktio pool create.
Reported-by: P. Gyanesh Kumar Patra <pgyanesh.patra(a)gmail.com>
Signed-off-by: Matias Elo <matias.elo(a)nokia.com>
Tested-by: P. Gyanesh Kumar Patra <pgyanesh.patra(a)gmail.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h
index a94012acc..8ceb325b2 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -125,8 +125,8 @@ extern "C" {
* defined segment length (seg_len in odp_pool_param_t) will be rounded up into
* this value.
*/
-#define CONFIG_PACKET_SEG_LEN_MIN ((2 * 1024) - \
- CONFIG_PACKET_HEADROOM - \
+#define CONFIG_PACKET_SEG_LEN_MIN ((2 * 1024) + \
+ CONFIG_PACKET_HEADROOM + \
CONFIG_PACKET_TAILROOM)
/* Maximum number of shared memory blocks.
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
index 23f39445e..4253451f5 100644
--- a/platform/linux-generic/pktio/dpdk.c
+++ b/platform/linux-generic/pktio/dpdk.c
@@ -327,6 +327,13 @@ static struct rte_mempool *mbuf_pool_create(const char *name,
goto fail;
}
+ if (pool_entry->seg_len < RTE_MBUF_DEFAULT_BUF_SIZE) {
+ ODP_ERR("Some NICs need at least %dB buffers to not segment "
+ "standard ethernet frames. Increase pool seg_len.\n",
+ RTE_MBUF_DEFAULT_BUF_SIZE);
+ goto fail;
+ }
+
total_size = rte_mempool_calc_obj_size(elt_size, MEMPOOL_F_NO_SPREAD,
&sz);
if (total_size != pool_entry->block_size) {
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/include/odp_config_internal.h | 4 ++--
platform/linux-generic/pktio/dpdk.c | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--