aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-12-11 14:27:53 -0800
committerDave Barach <openvpp@barachs.net>2019-12-12 17:38:30 +0000
commitef4f3e7fea359f651c548182a7597abc066ca372 (patch)
treebf66226604821074452caaac343868784d261d55 /src/vnet/session
parent38277e407148dca4ca79784a2e8c29d486425829 (diff)
session svm: support for segments larger than 4GB
Type: feature Change-Id: I7d3017bbb369261d74f51807a226f2c12f45291c Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/segment_manager.c8
-rw-r--r--src/vnet/session/segment_manager.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 5247b0e7461..0600b671be7 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -83,11 +83,11 @@ segment_manager_segment_index (segment_manager_t * sm, fifo_segment_t * seg)
* to avoid affecting any of the segments pool readers.
*/
int
-segment_manager_add_segment (segment_manager_t * sm, u32 segment_size)
+segment_manager_add_segment (segment_manager_t * sm, uword segment_size)
{
+ uword baseva = (uword) ~ 0ULL, alloc_size, page_size;
+ u32 rnd_margin = 128 << 10, fs_index = ~0;
segment_manager_main_t *smm = &sm_main;
- u32 rnd_margin = 128 << 10, fs_index = ~0, page_size;
- uword baseva = (uword) ~ 0ULL, alloc_size;
segment_manager_props_t *props;
fifo_segment_t *fs;
u8 *seg_name;
@@ -307,7 +307,7 @@ segment_manager_alloc (void)
* Returns error if ssvm segment(s) allocation fails.
*/
int
-segment_manager_init (segment_manager_t * sm, u32 first_seg_size,
+segment_manager_init (segment_manager_t * sm, uword first_seg_size,
u32 prealloc_fifo_pairs)
{
u32 rx_fifo_size, tx_fifo_size, pair_size;
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index f2a90c8f935..b40926091c4 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -25,9 +25,9 @@ typedef struct _segment_manager_props
u32 rx_fifo_size; /**< receive fifo size */
u32 tx_fifo_size; /**< transmit fifo size */
u32 evt_q_size; /**< event queue length */
- u32 segment_size; /**< first segment size */
u32 prealloc_fifos; /**< preallocated fifo pairs */
- u32 add_segment_size; /**< additional segment size */
+ uword segment_size; /**< first segment size */
+ uword add_segment_size; /**< additional segment size */
u8 add_segment:1; /**< can add new segments flag */
u8 use_mq_eventfd:1; /**< use eventfds for mqs flag */
u8 reserved:6; /**< reserved flags */
@@ -69,7 +69,7 @@ typedef struct segment_manager_main_init_args_
#define SEGMENT_MANAGER_INVALID_APP_INDEX ((u32) ~0)
segment_manager_t *segment_manager_alloc (void);
-int segment_manager_init (segment_manager_t * sm, u32 first_seg_size,
+int segment_manager_init (segment_manager_t * sm, uword first_seg_size,
u32 prealloc_fifo_pairs);
/**
@@ -89,7 +89,7 @@ segment_manager_t *segment_manager_get (u32 index);
segment_manager_t *segment_manager_get_if_valid (u32 index);
u32 segment_manager_index (segment_manager_t * sm);
-int segment_manager_add_segment (segment_manager_t * sm, u32 segment_size);
+int segment_manager_add_segment (segment_manager_t * sm, uword segment_size);
void segment_manager_del_segment (segment_manager_t * sm,
fifo_segment_t * fs);
fifo_segment_t *segment_manager_get_segment (segment_manager_t * sm,