aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-23 15:53:43 -0700
committerDamjan Marion <dmarion@me.com>2019-04-24 11:31:02 +0000
commit1219b2d071a273acbdbfb14a050bb3e275c0dd03 (patch)
tree1ddb08470c36897417d768efc7b9b5cd7bb179e4
parentb3ca33ff4836eff054250c2b7a40dc778f377ea7 (diff)
session: remove unused fifo allo return value
Change-Id: I50a6bcc127e4b44becc4b694bdd3018ac9bfab5c Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/plugins/unittest/session_test.c4
-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
4 files changed, 8 insertions, 14 deletions
diff --git a/src/plugins/unittest/session_test.c b/src/plugins/unittest/session_test.c
index 542be604e5b..948ea62e798 100644
--- a/src/plugins/unittest/session_test.c
+++ b/src/plugins/unittest/session_test.c
@@ -1746,7 +1746,6 @@ session_test_mq (vlib_main_t * vm, unformat_input_t * input)
vl_api_registration_t *reg;
struct epoll_event ep_evt;
u32 app_index, api_index;
- u32 fifo_segment_index;
app_worker_t *app_wrk;
segment_manager_t *sm;
svm_msg_q_msg_t msg;
@@ -1812,8 +1811,7 @@ session_test_mq (vlib_main_t * vm, unformat_input_t * input)
}
sm = app_worker_get_or_alloc_connect_segment_manager (app_wrk);
- segment_manager_alloc_session_fifos (sm, &rx_fifo, &tx_fifo,
- &fifo_segment_index);
+ segment_manager_alloc_session_fifos (sm, &rx_fifo, &tx_fifo);
s.rx_fifo = rx_fifo;
s.tx_fifo = tx_fifo;
s.session_state = SESSION_STATE_READY;
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,