author | Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com> | |
Tue, 28 Mar 2017 08:53:32 +0000 (09:53 +0100) | ||
committer | Tahhan, Maryam <maryam.tahhan@intel.com> | |
Thu, 6 Jul 2017 15:15:33 +0000 (16:15 +0100) | ||
commit | 32ee504b53f49960b13d4974ce7842d838fadcc7 | |
tree | fc51ae71973d7942e225f777917bf7f939831632 | tree | snapshot |
parent | 1035fba8812893e50d00a871e3399cc1ece3b384 | commit | diff |
dpdkevents: detect primary DPDK application (re)start
Current implementation attempts to open KA SHM only once during init callback.
If at the time primary DPDK application is not running shm_open will fail, which
will result in dpdkevents plugin being unloaded. Move KA SHM open logic to read
callback to allow plugin to attach to primary DPDK application later without a
need to restart collectd. Moreover, it will allow to determine if primary DPDK
application was killed and plugin should stop dispatching KA statistics.
Additionally modify dpdk_event_keep_alive_shm_open function to detect restart of
primary DPDK application. When primary DPDK application (with KA support) is
restarted it unlinks existing shared memory object and creates a new one. It's
necessary for the plugin to create a new SHM mapping in order to prevent reading
statistics from stale SHM block.
Change-Id: I7fc0047ba117db771ada58a40cbe0b2bddd00112
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
Current implementation attempts to open KA SHM only once during init callback.
If at the time primary DPDK application is not running shm_open will fail, which
will result in dpdkevents plugin being unloaded. Move KA SHM open logic to read
callback to allow plugin to attach to primary DPDK application later without a
need to restart collectd. Moreover, it will allow to determine if primary DPDK
application was killed and plugin should stop dispatching KA statistics.
Additionally modify dpdk_event_keep_alive_shm_open function to detect restart of
primary DPDK application. When primary DPDK application (with KA support) is
restarted it unlinks existing shared memory object and creates a new one. It's
necessary for the plugin to create a new SHM mapping in order to prevent reading
statistics from stale SHM block.
Change-Id: I7fc0047ba117db771ada58a40cbe0b2bddd00112
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
src/dpdkevents.c | diff | blob | history |