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 e828b4d6f503ff94c40e30b1d8babf0dcbecde91 (commit)
from 1e0ac11c75eee10959d1fa674a05e746476271b3 (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 e828b4d6f503ff94c40e30b1d8babf0dcbecde91
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Wed Apr 18 17:50:47 2018 +0300
configure.ac: update version to v1.19.0.0
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
diff --git a/configure.ac b/configure.ac
index 904e8197..d3f02665 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,9 @@ AC_PREREQ([2.5])
# Set correct API version
##########################################################################
m4_define([odpapi_generation_version], [1])
-m4_define([odpapi_major_version], [18])
+m4_define([odpapi_major_version], [19])
m4_define([odpapi_minor_version], [0])
-m4_define([odpapi_point_version], [1])
+m4_define([odpapi_point_version], [0])
m4_define([odpapi_version],
[odpapi_generation_version.odpapi_major_version.odpapi_minor_version.odpapi_point_version])
AC_INIT([OpenDataPlane],[odpapi_version],[lng-odp(a)lists.linaro.org])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 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 1e0ac11c75eee10959d1fa674a05e746476271b3 (commit)
from 8caae505c35444706cff8815c41821d80e791403 (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 1e0ac11c75eee10959d1fa674a05e746476271b3
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Sun Apr 8 20:30:18 2018 -0500
changelog: updates for odp v1.19.0.0
Add updates for ODP v1.19.0.0 (Tiger Moth Final Release)
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Bogdan Pricope <bogdan.pricope(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/CHANGELOG b/CHANGELOG
index 1dfdd0e7..5af1777c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,108 @@
+== OpenDataPlane (1.19.0.0)
+=== Summary of Changes
+ODP v1.19.0.0 is the official Tiger Moth final release. It incorporates final
+implementation changes and bug fixes and completes the Tiger Moth ODP
+development cycle.
+
+==== APIs
+No functional changes for this release. The Tiger Moth API was frozen in ODP
+v1.18.0.0.
+
+===== API Documentation Update
+The specification for the `odp_packet_l4_chksum_status()` API has been
+clarified to reflect that in IPv4 UDP checksums are optional. As a result, a
+zero (nonexistent) checksum will be reported as `ODP_PACKET_CHKSUM_OK`.
+
+==== C++ Test Improvements
+The {cpp} test included in the ODP validation suite now uses `cout` instead
+of `printf()` to ensure that {cpp} is being used to compile it.
+
+==== Queue and Scheduler Configuration
+For the ODP Reference Implementation, The `config/odp-linux-generic.conf` file
+is extended with sections to control the default and maximum sizes for basic
+queues, and the priority spread used by the scheduler for scheduled queues.
+
+The configuration file is a template named `platform/odp-$platform.conf` so
+this can be easily inherited by other ODP implementations.
+
+==== Runtime Default `config` File Read Order Improvements
+For the ODP Reference Implementation, the default values of the
+application-provided `config` file (if used) override the values provided by
+the built-in `config/odp-linux-generic.conf` file.
+
+=== Implementation Improvements
+The `odp-linux` reference implementation is improved in a number of areas:
+
+==== Netmap Ring Configuration for VALE
+PktIO netmap support now uses the ODP config file to allow rings used for VALE
+processing to be specified. The supplied defaults provide optimal performance
+in typical settings.
+
+==== AES-XCBC-MAC and SHA384-HMAC
+These crypto/authentication algorithms are now implemented.
+
+==== Packet Checksum Validation and Insertion
+Proper packet checksum validation and insertion, in conformance with the
+relevant ODP APIs, is now provided.
+
+=== Dependency Changes
+
+==== DPDK 17.11 Support
+The Tiger Moth LTS release is synchronized with the most recent DPDK LTS
+release for DPDK pktio support.
+
+==== Removal of dependency on `xxd` package.
+This dependency is removed. The Reference Implementation build tools now use
+the standard `od` tool rather than the optional `xxd` package.
+
+=== Performance Tests
+
+==== `odp_sched_pktio`
+A new test has been added to test the performance of PktIO operations in
+scheduled mode. Scheduled PktIO is inherently more scalable and simpler from
+an application standpoint than direct (polled) I/O, but depending on the
+efficiency of the scheduler implementation can incur additional levels of
+overhead. This test can give insight into a given platform's scheduler
+efficiency. For the `odp-linux` reference implementation, this test has shown
+scheduled I/O to be within 10% of rates achievable via direct I/O, meaning
+that for many applications the simplicity and scalability of the event model
+is preferable.
+
+==== `odp_ipsec`
+A new test has been added that measures outbound (TX) IPsec performance with
+a variety of cipher and authentication algorithms.
+
+=== Example Changes
+
+==== `l2fwd` Example
+The `README` file associated with this example has been clarified to explain
+that this example is a throughput test and as a result does not preserve
+packet order under all conditions.
+
+=== Bug Fixes
+==== https://bugs.linaro.org/show_bug.cgi?id=3611[Bug 3611]
+ODP linux-generic fails on AArch64 in non-ABI-compat mode.
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3657[Bug 3657]
+PktIO does not work with Mellanox Interfaces
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3685[Bug 3685]
+RX UDP checksum offload drops valid UDP packets with Niantic
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3686[Bug 3686]
+IP header checksum not inserted if L4 offset not set
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3690[Bug 3690]
+fdserver process interferes with signal handling
+
+==== https://bugs.linaro.org/show_bug.cgi?id=3736[Bug 3736]
+return value not checked for some fdserver interface functions
+
+=== Known Issues
+
+==== https://bugs.linaro.org/show_bug.cgi?id=2988[Bug 2988]
+ODP exposes symbols outside of odp*/_odp* namespace
+
== OpenDataPlane (1.18.0.1)
=== Summary of Changes
ODP v1.18.0.1 is a fix level for Tiger Moth Release Candidate 2 (RC 2).
-----------------------------------------------------------------------
Summary of changes:
CHANGELOG | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)
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 88ba35773c76c871a222fe48a0dac05765c39936 (commit)
from 2e96afe0b7c4e7e41fb03bcda605ab704f538ca1 (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 88ba35773c76c871a222fe48a0dac05765c39936
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Wed Apr 11 14:40:53 2018 +0200
fdserver: handle signal interruption in connect()
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Reviewed-by: Janne Peltonen <janne.peltonen(a)nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_fdserver.c b/platform/linux-generic/odp_fdserver.c
index c88c71cd..0e9fb0e4 100644
--- a/platform/linux-generic/odp_fdserver.c
+++ b/platform/linux-generic/odp_fdserver.c
@@ -265,7 +265,9 @@ static int get_socket(void)
remote.sun_family = AF_UNIX;
strcpy(remote.sun_path, sockpath);
len = strlen(remote.sun_path) + sizeof(remote.sun_family);
- if (connect(s_sock, (struct sockaddr *)&remote, len) == -1) {
+ while (connect(s_sock, (struct sockaddr *)&remote, len) == -1) {
+ if (errno == EINTR)
+ continue;
ODP_ERR("cannot connect to server: %s\n", strerror(errno));
close(s_sock);
return -1;
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_fdserver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 2e96afe0b7c4e7e41fb03bcda605ab704f538ca1 (commit)
from 52ea8d51d522d7013f746748bf84bfc2e9bc042c (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 2e96afe0b7c4e7e41fb03bcda605ab704f538ca1
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Fri Apr 13 13:50:21 2018 +0200
linux-gen: shm: check return value when registering fds
fdserver functions such as that for registering a new fd may
fail. In this case we need to check the return value and do
a cleanup of any allocated blocks and fragments.
If it fails on deregistering, just return the error code.
Signed-off-by: Josep Puigdemont <josep.puigdemont(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_ishm.c b/platform/linux-generic/odp_ishm.c
index a1a90424..babf51b9 100644
--- a/platform/linux-generic/odp_ishm.c
+++ b/platform/linux-generic/odp_ishm.c
@@ -767,6 +767,65 @@ static void procsync(void)
ishm_proctable->nb_entries = last;
}
+/*
+ * Free a block as described in block_free(), but
+ * considering whether to close the file descriptor or not, and
+ * whether to deregister from the fdserver.
+ */
+static int block_free_internal(int block_index, int close_fd, int deregister)
+{
+ int proc_index;
+ ishm_block_t *block; /* entry in the main block table*/
+ int last;
+ int ret = 0;
+
+ if ((block_index < 0) ||
+ (block_index >= ISHM_MAX_NB_BLOCKS) ||
+ (ishm_tbl->block[block_index].len == 0)) {
+ ODP_ERR("Request to free an invalid block\n");
+ return -1;
+ }
+
+ block = &ishm_tbl->block[block_index];
+
+ proc_index = procfind_block(block_index);
+ if (proc_index >= 0) {
+ /* remove the mapping and possible fragment */
+ do_unmap(ishm_proctable->entry[proc_index].start,
+ block->len,
+ ishm_proctable->entry[proc_index].flags,
+ block_index);
+
+ /* close the related fd */
+ if (close_fd)
+ close(ishm_proctable->entry[proc_index].fd);
+
+ /* remove entry from process local table: */
+ last = ishm_proctable->nb_entries - 1;
+ ishm_proctable->entry[proc_index] = ishm_proctable->entry[last];
+ ishm_proctable->nb_entries = last;
+ } else {
+ /* just possibly free the fragment as no mapping exist here: */
+ do_unmap(NULL, 0, block->flags, block_index);
+ }
+
+ /* remove all files related to this block: */
+ if (close_fd)
+ delete_file(block);
+
+ /* deregister the file descriptor from the file descriptor server. */
+ if (deregister)
+ ret = _odp_fdserver_deregister_fd(FD_SRV_CTX_ISHM, block_index);
+
+ /* mark the block as free in the main block table: */
+ block->len = 0;
+
+ /* mark the change so other processes see this entry as obsolete: */
+ block->seq++;
+
+ return ret;
+}
+
/*
* Allocate and map internal shared memory, or other objects:
* If a name is given, check that this name is not already in use.
@@ -928,7 +987,10 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
ishm_proctable->entry[new_proc_entry].fd = fd;
/* register the file descriptor to the file descriptor server. */
- _odp_fdserver_register_fd(FD_SRV_CTX_ISHM, new_index, fd);
+ if (_odp_fdserver_register_fd(FD_SRV_CTX_ISHM, new_index, fd) == -1) {
+ block_free_internal(new_index, !new_block->external_fd, 0);
+ new_index = -1;
+ }
odp_spinlock_unlock(&ishm_tbl->lock);
return new_index;
@@ -1034,53 +1096,7 @@ error_exp_file:
*/
static int block_free(int block_index)
{
- int proc_index;
- ishm_block_t *block; /* entry in the main block table*/
- int last;
-
- if ((block_index < 0) ||
- (block_index >= ISHM_MAX_NB_BLOCKS) ||
- (ishm_tbl->block[block_index].len == 0)) {
- ODP_ERR("Request to free an invalid block\n");
- return -1;
- }
-
- block = &ishm_tbl->block[block_index];
-
- proc_index = procfind_block(block_index);
- if (proc_index >= 0) {
- /* close the related fd */
- close(ishm_proctable->entry[proc_index].fd);
-
- /* remove the mapping and possible fragment */
- do_unmap(ishm_proctable->entry[proc_index].start,
- block->len,
- ishm_proctable->entry[proc_index].flags,
- block_index);
-
- /* remove entry from process local table: */
- last = ishm_proctable->nb_entries - 1;
- ishm_proctable->entry[proc_index] =
- ishm_proctable->entry[last];
- ishm_proctable->nb_entries = last;
- } else {
- /* just possibly free the fragment as no mapping exist here: */
- do_unmap(NULL, 0, block->flags, block_index);
- }
-
- /* remove all files related to this block: */
- delete_file(block);
-
- /* deregister the file descriptor from the file descriptor server. */
- _odp_fdserver_deregister_fd(FD_SRV_CTX_ISHM, block_index);
-
- /* mark the block as free in the main block table: */
- block->len = 0;
-
- /* mark the change so other processes see this entry as obsolete: */
- block->seq++;
-
- return 0;
+ return block_free_internal(block_index, 1, 1);
}
/*
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_ishm.c | 112 ++++++++++++++++++++++----------------
1 file changed, 64 insertions(+), 48 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 52ea8d51d522d7013f746748bf84bfc2e9bc042c (commit)
from b7ee13d765e5d8da1ef68f0c0777cb5e40fffbf7 (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 52ea8d51d522d7013f746748bf84bfc2e9bc042c
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Wed Apr 11 10:35:22 2018 +0200
linux-gen: fdserver: mask signals we don't need
Make fdserver block all signals except those we are interested in, or
those that can't be masked, and set default handlers for those left,
thus preventing fdserver from executing any signal handlers that the
application may have installed prior to forking this process.
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Reviewed-by: Janne Peltonen <janne.peltonen(a)nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_fdserver.c b/platform/linux-generic/odp_fdserver.c
index 9562ea0c..c88c71cd 100644
--- a/platform/linux-generic/odp_fdserver.c
+++ b/platform/linux-generic/odp_fdserver.c
@@ -647,6 +647,34 @@ int _odp_fdserver_init_global(void)
}
if (server_pid == 0) { /*child */
+ sigset_t sigset;
+ struct sigaction action;
+
+ sigfillset(&sigset);
+ /* undefined if these are ignored, as per POSIX */
+ sigdelset(&sigset, SIGFPE);
+ sigdelset(&sigset, SIGILL);
+ sigdelset(&sigset, SIGSEGV);
+ /* can not be masked */
+ sigdelset(&sigset, SIGKILL);
+ sigdelset(&sigset, SIGSTOP);
+ /* these we want to handle */
+ sigdelset(&sigset, SIGTERM);
+ if (sigprocmask(SIG_SETMASK, &sigset, NULL) == -1) {
+ ODP_ERR("Could not set signal mask");
+ exit(1);
+ }
+
+ /* set default handlers for those signals we can handle */
+ memset(&action, 0, sizeof(action));
+ action.sa_handler = SIG_DFL;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = 0;
+ sigaction(SIGFPE, &action, NULL);
+ sigaction(SIGILL, &action, NULL);
+ sigaction(SIGSEGV, &action, NULL);
+ sigaction(SIGTERM, &action, NULL);
+
/* TODO: pin the server on appropriate service cpu mask */
/* when (if) we can agree on the usage of service mask */
-----------------------------------------------------------------------
Summary of changes:
platform/linux-generic/odp_fdserver.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
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 b7ee13d765e5d8da1ef68f0c0777cb5e40fffbf7 (commit)
via a2cad95118b79f204bc13914acf43a8fc1dd2682 (commit)
from a5340c53957b3174c89d03ecf2c61e9ba98ac57c (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 b7ee13d765e5d8da1ef68f0c0777cb5e40fffbf7
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Mon Apr 2 13:57:40 2018 +0300
shippable: reenable clang with disable abi compat options
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
diff --git a/.shippable.yml b/.shippable.yml
index 6ef5cab7..53e094bc 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -15,11 +15,6 @@ env:
# - CROSS_ARCH="powerpc"
# - CROSS_ARCH="i386"
-matrix:
- exclude:
- - compiler: clang
- env: CONF="--disable-abi-compat --disable-test-perf --disable-test-perf-proc"
-
build:
pre_ci:
# use Dockerfile to install additional CI dependencies
commit a2cad95118b79f204bc13914acf43a8fc1dd2682
Author: Maxim Uvarov <maxim.uvarov(a)linaro.org>
Date: Mon Apr 16 21:50:11 2018 +0300
linux-gen: fix clang on aarch64 build
No code change. Just move array definition several lines
up to make clang happy to generate valid code.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3611
Suggested-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen(a)linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov(a)linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index 998fc649..955e14f9 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -718,12 +718,13 @@ int buffer_alloc_multi(pool_t *pool, odp_buffer_hdr_t *buf_hdr[], int max_num)
buf_hdr[i] = buf_hdr_from_index(pool, cache->buf_index[j]);
}
+ /* Declare variable here to fix clang compilation bug */
+ uint32_t data[burst];
+
/* If needed, get more from the global pool */
if (odp_unlikely(num_deq)) {
- /* Temporary copy needed since odp_buffer_t is uintptr_t
- * and not uint32_t. */
- uint32_t data[burst];
-
+ /* Temporary copy to data[] needed since odp_buffer_t is
+ * uintptr_t and not uint32_t. */
ring = &pool->ring->hdr;
mask = pool->ring_mask;
burst = ring_deq_multi(ring, mask, data, burst);
-----------------------------------------------------------------------
Summary of changes:
.shippable.yml | 5 -----
platform/linux-generic/odp_pool.c | 9 +++++----
2 files changed, 5 insertions(+), 9 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 813cd2df67ae0591b0f792eff82854c5c9c642ca (commit)
via 48f8503baf847315dda6609abc01f5befe6e0284 (commit)
via b1100fdba29d8f514236dbcfd6f17e7941c0256a (commit)
via f96a21992e13cf401a3494f2caeec9d42f56f0d9 (commit)
via 1e925d0ccc7340575ddcfa07ab7bd372d751e006 (commit)
from c9d31f30ba4fd7818b4ba2ffd7bbaea74761a2d9 (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 813cd2df67ae0591b0f792eff82854c5c9c642ca
Author: Bill Fischofer <bill.fischofer(a)linaro.org>
Date: Mon Apr 9 09:49:56 2018 -0500
example: l2fwd: update readme regarding ordered queue usage
Update the README file to clarify the effect of using ordered queues
with direct I/O or output interfaces supporting multiple queues.
Signed-off-by: Bill Fischofer <bill.fischofer(a)linaro.org>
Reviewed-by: Janne Peltonen <janne.peltonen(a)nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov(a)linaro.org>
diff --git a/example/l2fwd/README b/example/l2fwd/README
index f6fdc01c..091d046e 100644
--- a/example/l2fwd/README
+++ b/example/l2fwd/README
@@ -5,3 +5,10 @@ Source code and Makefiles placed under test/performance/ directory.
This L2 forwarding application can be used as example reference as well
as performance test for different odp modes (direct, queue or scheduler
with parallel, atomic or ordered queues).
+
+Note that this example is tuned for performance. As a result, when using
+scheduled mode with direct packet I/O output or queued output with multiple
+output queues, packet order is not guaranteed. To achieve guaranteed order,
+use a single worker thread or output interfaces with single output
+queues. Other examples of scalable processing using ordered queues that
+preserve order can be seen in the odp_pktio_ordered performance test.
commit 48f8503baf847315dda6609abc01f5befe6e0284
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Mon Apr 9 13:45:25 2018 +0200
fdserver: change session ID after fork
This is to avoid the fdserver process from handling signals sent to the
process group.
This patch partly fixes: https://bugs.linaro.org/show_bug.cgi?id=3690
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Suggested-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_fdserver.c b/platform/linux-generic/odp_fdserver.c
index a06fb508..9562ea0c 100644
--- a/platform/linux-generic/odp_fdserver.c
+++ b/platform/linux-generic/odp_fdserver.c
@@ -654,6 +654,12 @@ int _odp_fdserver_init_global(void)
/* orphans being "adopted" by the init process... */
prctl(PR_SET_PDEATHSIG, SIGTERM);
+ res = setsid();
+ if (res == -1) {
+ ODP_ERR("Could not setsid()");
+ exit(1);
+ }
+
/* allocate the space for the file descriptor<->key table: */
fd_table = malloc(FDSERVER_MAX_ENTRIES * sizeof(fdentry_t));
if (!fd_table) {
commit b1100fdba29d8f514236dbcfd6f17e7941c0256a
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Thu Apr 12 14:07:30 2018 +0200
linux-gen: shm: be consistent with rest of the code
We should be consistent and use new_block as in the rest of the
function, instead of accessing the array of blocks using an index.
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Signed-off-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_ishm.c b/platform/linux-generic/odp_ishm.c
index 282c39e8..a1a90424 100644
--- a/platform/linux-generic/odp_ishm.c
+++ b/platform/linux-generic/odp_ishm.c
@@ -566,7 +566,7 @@ static void *do_map(int block_index, uint64_t len, uint32_t align,
}
return NULL;
}
- ishm_tbl->block[block_index].fragment = fragment;
+ new_block->fragment = fragment;
}
/* try to mmap: */
commit f96a21992e13cf401a3494f2caeec9d42f56f0d9
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Thu Apr 12 13:49:00 2018 +0200
linux-gen: shm: do not close provided file descriptors
If we provide a file descriptor to _odp_ishm_reserve, this function
should not close them. It's the responsibility of the caller to decide
what to do with the file descriptor if the return value indicates an
error.
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Signed-off-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_ishm.c b/platform/linux-generic/odp_ishm.c
index 18255678..282c39e8 100644
--- a/platform/linux-generic/odp_ishm.c
+++ b/platform/linux-generic/odp_ishm.c
@@ -831,7 +831,6 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
/* If a file descriptor is provided, get the real size and map: */
if (fd >= 0) {
if (fstat(fd, &statbuf) < 0) {
- close(fd);
odp_spinlock_unlock(&ishm_tbl->lock);
ODP_ERR("_ishm_reserve failed (fstat failed: %s).\n",
strerror(errno));
@@ -844,7 +843,6 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
* page is determined by the provided file descriptor: */
addr = do_map(new_index, len, align, flags, EXTERNAL, &fd);
if (addr == NULL) {
- close(fd);
odp_spinlock_unlock(&ishm_tbl->lock);
ODP_ERR("_ishm_reserve failed.\n");
return -1;
commit 1e925d0ccc7340575ddcfa07ab7bd372d751e006
Author: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Date: Thu Apr 12 13:53:48 2018 +0200
linux-gen: shm: fill data used in do_map before the call
do_map() checks the block's external_fd field to find out whether the
file descriptor provided was allocated externally or not, before closing
it in case an error occurred. However, this field was only updated
_after_ calling the do_map() function. Fix this.
Signed-off-by: Josep Puigdemont <josep.puigdemont(a)linaro.org>
Signed-off-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_ishm.c b/platform/linux-generic/odp_ishm.c
index 5f5e5eef..18255678 100644
--- a/platform/linux-generic/odp_ishm.c
+++ b/platform/linux-generic/odp_ishm.c
@@ -839,6 +839,7 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
return -1;
}
len = statbuf.st_size;
+ new_block->external_fd = 1;
/* note that the huge page flag is meningless here as huge
* page is determined by the provided file descriptor: */
addr = do_map(new_index, len, align, flags, EXTERNAL, &fd);
@@ -849,7 +850,6 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
return -1;
}
new_block->huge = EXTERNAL;
- new_block->external_fd = 1;
} else {
new_block->external_fd = 0;
}
-----------------------------------------------------------------------
Summary of changes:
example/l2fwd/README | 7 +++++++
platform/linux-generic/odp_fdserver.c | 6 ++++++
platform/linux-generic/odp_ishm.c | 6 ++----
3 files changed, 15 insertions(+), 4 deletions(-)
hooks/post-receive
--