From 7d29e320fb2855a1ddb7a6af09078b8ed636de01 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Tue, 21 Jul 2020 08:46:08 +0200 Subject: stats: remove offsets on vpp side Represent pointers directly in shared memory and require clients to adjust for shared memory segment being mapped at different base address. Deprecated: stat_segment_pointer() / stat_segment_offset() Added: stat_segment_adjust() Bumped the stat segment version to 2. Type: refactor Signed-off-by: Ole Troan Change-Id: I33e756187b8903b45dcd353e6c1a101b7a4acb79 --- src/vpp-api/python/vpp_papi/vpp_stats.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/vpp-api/python/vpp_papi/vpp_stats.py') diff --git a/src/vpp-api/python/vpp_papi/vpp_stats.py b/src/vpp-api/python/vpp_papi/vpp_stats.py index aa3409554d0..1a65c8ebad8 100644 --- a/src/vpp-api/python/vpp_papi/vpp_stats.py +++ b/src/vpp-api/python/vpp_papi/vpp_stats.py @@ -25,11 +25,10 @@ typedef struct { stat_directory_type_t type; union { - uint64_t offset; uint64_t index; uint64_t value; + uint64_t *data; }; - uint64_t offset_vector; char name[128]; // TODO change this to pointer to "somewhere" } stat_segment_directory_entry_t; @@ -50,11 +49,11 @@ typedef struct typedef struct { uint64_t version; + void *base; uint64_t epoch; uint64_t in_progress; - uint64_t directory_offset; - uint64_t error_offset; - uint64_t stats_offset; + stat_segment_directory_entry_t *directory_vector; + uint64_t **error_vector; } stat_segment_shared_header_t; typedef struct -- cgit 1.2.3-korg