aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/application_worker.c4
-rw-r--r--src/vnet/session/segment_manager.c11
-rw-r--r--src/vnet/session/segment_manager.h3
3 files changed, 7 insertions, 11 deletions
diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c
index 1dae5a55a45..3cc84e84f1a 100644
--- a/src/vnet/session/application_worker.c
+++ b/src/vnet/session/application_worker.c
@@ -150,11 +150,9 @@ static int
app_worker_alloc_session_fifos (segment_manager_t * sm, session_t * s)
{
svm_fifo_t *rx_fifo = 0, *tx_fifo = 0;
- u32 fifo_segment_index;
int rv;
- if ((rv = segment_manager_alloc_session_fifos (sm, &rx_fifo, &tx_fifo,
- &fifo_segment_index)))
+ if ((rv = segment_manager_alloc_session_fifos (sm, &rx_fifo, &tx_fifo)))
return rv;
rx_fifo->master_session_index = s->session_index;
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 7f7fa6d631a..2437f99098b 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -512,15 +512,14 @@ segment_manager_try_alloc_fifos (svm_fifo_segment_private_t * fifo_segment,
int
segment_manager_alloc_session_fifos (segment_manager_t * sm,
svm_fifo_t ** rx_fifo,
- svm_fifo_t ** tx_fifo,
- u32 * fifo_segment_index)
+ svm_fifo_t ** tx_fifo)
{
svm_fifo_segment_private_t *fifo_segment = 0;
int alloc_fail = 1, rv = 0, new_fs_index;
segment_manager_properties_t *props;
+ u32 sm_index, fifo_segment_index;
u8 added_a_segment = 0;
u64 segment_handle;
- u32 sm_index;
props = segment_manager_properties_get (sm);
@@ -549,11 +548,11 @@ alloc_check:
ASSERT (rx_fifo && tx_fifo);
sm_index = segment_manager_index (sm);
- *fifo_segment_index = segment_manager_segment_index (sm, fifo_segment);
+ fifo_segment_index = segment_manager_segment_index (sm, fifo_segment);
(*tx_fifo)->segment_manager = sm_index;
(*rx_fifo)->segment_manager = sm_index;
- (*tx_fifo)->segment_index = *fifo_segment_index;
- (*rx_fifo)->segment_index = *fifo_segment_index;
+ (*tx_fifo)->segment_index = fifo_segment_index;
+ (*rx_fifo)->segment_index = fifo_segment_index;
if (added_a_segment)
{
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index dadbd571a58..2b6f43feba7 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -151,8 +151,7 @@ void segment_manager_init_del (segment_manager_t * sm);
u8 segment_manager_has_fifos (segment_manager_t * sm);
int segment_manager_alloc_session_fifos (segment_manager_t * sm,
svm_fifo_t ** server_rx_fifo,
- svm_fifo_t ** server_tx_fifo,
- u32 * fifo_segment_index);
+ svm_fifo_t ** server_tx_fifo);
int segment_manager_try_alloc_fifos (svm_fifo_segment_private_t * fs,
u32 rx_fifo_size, u32 tx_fifo_size,
svm_fifo_t ** rx_fifo,