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 67d6f7120962594e6b9e3343fd7cf13eda956b15 (commit)
from 45cd0923809b2b4b972c9e9843ca7323183380c7 (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 67d6f7120962594e6b9e3343fd7cf13eda956b15
Author: Janne Peltonen <janne.peltonen(a)nokia.com>
Date: Mon Sep 10 13:19:31 2018 +0300
linux-gen: ipsec: make SA lifetime checking more scalable to multiple threads
Enforcing the packet and byte based SA life times is currently slow if
the same SA is being handled by multiple threads since the threads
keep checking and updating the same shared byte and packet counters.
Make the implementation more scalable by having a thread-local quota
of packets and bytes for each SA and by updating the shared byte
and packet counters less frequently (i.e. when the quota runs out).
This introduces some inexactness to life time warnings and errors.
The warnings and errors about soft and hard limits being reached
may come a bit earlier than expected based on the packets sent to
the wire.
Signed-off-by: Janne Peltonen <janne.peltonen(a)nokia.com>
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_ipsec_sad.c b/platform/linux-generic/odp_ipsec_sad.c
index fa0d70968..178b01c0a 100644
--- a/platform/linux-generic/odp_ipsec_sad.c
+++ b/platform/linux-generic/odp_ipsec_sad.c
@@ -42,7 +42,42 @@
#warning IPV4_ID_RING_SIZE is too small for the maximum number of threads.
#endif
+/*
+ * To avoid checking and updating the packet and byte counters in the
+ * SA for every packet, we increment the global counters once for several
+ * packets. We decrement a preallocated thread-local quota for every
+ * packet. When the quota runs out, we get a new quota by incementing the
+ * global counter.
+ *
+ * This improves performance but the looser synchronization between
+ * threads makes life time warnings and errors somewhat inaccurate.
+ * The warnings and errors may get triggered a bit too early since
+ * some threads may still have unused quota when the first thread
+ * hits the limit.
+ */
+#define SA_LIFE_PACKETS_PREALLOC 64
+#define SA_LIFE_BYTES_PREALLOC 4000
+
+typedef struct sa_thread_local_s {
+ /*
+ * Packets that can be processed in this thread before looking at
+ * the SA-global packet counter and checking hard and soft limits.
+ */
+ uint32_t packet_quota;
+ /*
+ * Bytes that can be processed in this thread before looking at
+ * at the SA-global byte counter and checking hard and soft limits.
+ */
+ uint32_t byte_quota;
+ /*
+ * Life time status when this thread last checked the global
+ * counter(s).
+ */
+ odp_ipsec_op_status_t lifetime_status;
+} sa_thread_local_t;
+
typedef struct ODP_ALIGNED_CACHE ipsec_thread_local_s {
+ sa_thread_local_t sa[ODP_CONFIG_IPSEC_SAS];
uint16_t first_ipv4_id; /* first ID of current block of IDs */
uint16_t next_ipv4_id; /* next ID to be used */
} ipsec_thread_local_t;
@@ -80,6 +115,24 @@ ipsec_sa_t *_odp_ipsec_sa_entry_from_hdl(odp_ipsec_sa_t sa)
return ipsec_sa_entry_from_hdl(sa);
}
+static inline sa_thread_local_t *ipsec_sa_thread_local(ipsec_sa_t *sa)
+{
+ return &ipsec_sa_tbl->per_thread[odp_thread_id()].sa[sa->ipsec_sa_idx];
+}
+
+static void init_sa_thread_local(ipsec_sa_t *sa)
+{
+ sa_thread_local_t *sa_tl;
+ int n;
+
+ for (n = 0; n < ODP_THREAD_COUNT_MAX; n++) {
+ sa_tl = &ipsec_sa_tbl->per_thread[n].sa[sa->ipsec_sa_idx];
+ sa_tl->packet_quota = 0;
+ sa_tl->byte_quota = 0;
+ sa_tl->lifetime_status.all = 0;
+ }
+}
+
int _odp_ipsec_sad_init_global(void)
{
odp_shm_t shm;
@@ -540,6 +593,8 @@ odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param)
&ses_create_rc))
goto error;
+ init_sa_thread_local(ipsec_sa);
+
ipsec_sa_publish(ipsec_sa);
return ipsec_sa->ipsec_sa_hdl;
@@ -681,17 +736,11 @@ int _odp_ipsec_sa_stats_precheck(ipsec_sa_t *ipsec_sa,
odp_ipsec_op_status_t *status)
{
int rc = 0;
+ sa_thread_local_t *sa_tl = ipsec_sa_thread_local(ipsec_sa);
- if (ipsec_sa->hard_limit_bytes > 0 &&
- odp_atomic_load_u64(&ipsec_sa->hot.bytes) >
- ipsec_sa->hard_limit_bytes) {
- status->error.hard_exp_bytes = 1;
- rc = -1;
- }
- if (ipsec_sa->hard_limit_packets > 0 &&
- odp_atomic_load_u64(&ipsec_sa->hot.packets) >
- ipsec_sa->hard_limit_packets) {
- status->error.hard_exp_packets = 1;
+ if (sa_tl->lifetime_status.error.hard_exp_packets ||
+ sa_tl->lifetime_status.error.hard_exp_bytes) {
+ status->all |= sa_tl->lifetime_status.all;
rc = -1;
}
@@ -701,30 +750,47 @@ int _odp_ipsec_sa_stats_precheck(ipsec_sa_t *ipsec_sa,
int _odp_ipsec_sa_stats_update(ipsec_sa_t *ipsec_sa, uint32_t len,
odp_ipsec_op_status_t *status)
{
- uint64_t bytes = odp_atomic_fetch_add_u64(&ipsec_sa->hot.bytes, len) + len;
- uint64_t packets = odp_atomic_fetch_add_u64(&ipsec_sa->hot.packets, 1) + 1;
- int rc = 0;
+ sa_thread_local_t *sa_tl = ipsec_sa_thread_local(ipsec_sa);
+ uint64_t packets, bytes;
+
+ if (odp_unlikely(sa_tl->packet_quota == 0)) {
+ packets = odp_atomic_fetch_add_u64(&ipsec_sa->hot.packets,
+ SA_LIFE_PACKETS_PREALLOC);
+ packets += SA_LIFE_PACKETS_PREALLOC;
+ sa_tl->packet_quota += SA_LIFE_PACKETS_PREALLOC;
+
+ if (ipsec_sa->soft_limit_packets > 0 &&
+ packets >= ipsec_sa->soft_limit_packets)
+ sa_tl->lifetime_status.warn.soft_exp_packets = 1;
+
+ if (ipsec_sa->hard_limit_packets > 0 &&
+ packets >= ipsec_sa->hard_limit_packets)
+ sa_tl->lifetime_status.error.hard_exp_packets = 1;
+ }
+ sa_tl->packet_quota--;
- if (ipsec_sa->soft_limit_bytes > 0 &&
- bytes > ipsec_sa->soft_limit_bytes)
- status->warn.soft_exp_bytes = 1;
+ if (odp_unlikely(sa_tl->byte_quota < len)) {
+ bytes = odp_atomic_fetch_add_u64(&ipsec_sa->hot.bytes,
+ len + SA_LIFE_BYTES_PREALLOC);
+ bytes += len + SA_LIFE_BYTES_PREALLOC;
+ sa_tl->byte_quota += len + SA_LIFE_BYTES_PREALLOC;
- if (ipsec_sa->soft_limit_packets > 0 &&
- packets > ipsec_sa->soft_limit_packets)
- status->warn.soft_exp_packets = 1;
+ if (ipsec_sa->soft_limit_bytes > 0 &&
+ bytes >= ipsec_sa->soft_limit_bytes)
+ sa_tl->lifetime_status.warn.soft_exp_bytes = 1;
- if (ipsec_sa->hard_limit_bytes > 0 &&
- bytes > ipsec_sa->hard_limit_bytes) {
- status->error.hard_exp_bytes = 1;
- rc = -1;
- }
- if (ipsec_sa->hard_limit_packets > 0 &&
- packets > ipsec_sa->hard_limit_packets) {
- status->error.hard_exp_packets = 1;
- rc = -1;
+ if (ipsec_sa->hard_limit_bytes > 0 &&
+ bytes >= ipsec_sa->hard_limit_bytes)
+ sa_tl->lifetime_status.error.hard_exp_bytes = 1;
}
+ sa_tl->byte_quota -= len;
- return rc;
+ status->all |= sa_tl->lifetime_status.all;
+
+ if (sa_tl->lifetime_status.error.hard_exp_packets ||
+ sa_tl->lifetime_status.error.hard_exp_bytes)
+ return -1;
+ return 0;
}
int _odp_ipsec_sa_replay_precheck(ipsec_sa_t *ipsec_sa, uint32_t seq,
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_ipsec_sad.c | 124 +++++++++++++++++++++++++--------
1 file changed, 95 insertions(+), 29 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 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
--