summaryrefslogtreecommitdiff
path: root/cesar/interface
diff options
context:
space:
mode:
authorThierry Carré2012-10-16 12:45:48 +0200
committerThierry Carré2013-01-31 15:04:48 +0100
commit4452a8abe0d135b1f690b530a3bb4b1e495d7b65 (patch)
treeffa06423693d00cdaccd3d8a51d3c6c61ec2b2f3 /cesar/interface
parent83441de4ab01355295cfe6a6e389ad5bc66fd361 (diff)
cesar/maximus: C++ maximus refactoring, closes #3336, closes #3098
Feedback on new performance on tests inside: test_general/station Ratio = Test duration before this commit divided by new duration. |--------------------------------------------|-------| | Unit test | Ratio | |--------------------------------------------|-------| | maximus/py/sc01_long_simu.py | 6.5 | | maximus/py/sc02_long_simu.py | 4.5 | | scenario/av/py/sc01_assoc_auth.py | 3.3 | | scenario/av/py/sc02_stas_communication.py | 4.5 | | scenario/av/py/sc03_two_avln_coexisting.py | 2.1 | | scenario/av/py/sc04_cc_whoru.py | 2.1 | | scenario/av/py/sc05_cc_leave.py | 2.3 | | scenario/av/py/sc06_discover_procedure.py | 2.3 | | scenario/av/py/sc07_bridge.py | 2.2 | | scenario/av/py/sc08_bentry_change.py | 2.1 | | scenario/av/py/sc09_simple_connect.py | 2.2 | | scenario/av/py/sc10_short_messages.py | 5.7 | | scenario/av/py/sc11_cm_nw_info.py | 4.7 | | scenario/av/py/sc12_change_nmk.py | 5.5 | | scenario/av/py/sc14_igmp.py | 4.0 | | scenario/av/py/sc15_hide.py | 6.0 | | compliance/py/sc01_dut_as_a_cco.py | 5.8 | | tonemap/py/sc01_bl_initial.py | 2.3 | | tonemap/py/sc02_vs_get_tonemap.py | 2.3 | |--------------------------------------------|-------| | Average speed improvement of Maximus is | 4.9 | |--------------------------------------------|-------| Many tickets have been opened to continue the refactoring. Titles begin by "[Maximus][Refactoring]" in pessac's trac. For this reason #3336 is close. #3098 is really fixed.
Diffstat (limited to 'cesar/interface')
-rw-r--r--cesar/interface/fcall/src/interface_fcall.c4
-rw-r--r--cesar/interface/fcall/test/src/test_interface_fcall.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/cesar/interface/fcall/src/interface_fcall.c b/cesar/interface/fcall/src/interface_fcall.c
index 60b9cbd855..b2d0a073a0 100644
--- a/cesar/interface/fcall/src/interface_fcall.c
+++ b/cesar/interface/fcall/src/interface_fcall.c
@@ -153,7 +153,7 @@ interface_fcall_mme_recv (void *data, u8 *mme)
dbg_assert_print(false, "sci msg init failed with errno = %d", errno);
return;
}
- if (SCI_MSG_MAX_SIZE != sci_msg_push(&msg, SCI_MSG_MAX_SIZE))
+ if (0 > sci_msg_push(&msg, SCI_MSG_MAX_SIZE))
{
dbg_assert_print(false, "sci msg push failed with errno = %d", errno);
return;
@@ -169,7 +169,7 @@ interface_fcall_mme_recv (void *data, u8 *mme)
diag_printf("interface_fcall_mme_recv: payload copied from @ 0x%08x to @ 0x%08x\n", (uint)mme, (uint)msg.data_begin);
/** Increment message data pointer to the beginning of function call header. */
- if (INTERFACE_FCALL_PAYLOAD_OFFSET != sci_msg_pop(&msg, INTERFACE_FCALL_PAYLOAD_OFFSET))
+ if (0 > sci_msg_pop (&msg, INTERFACE_FCALL_PAYLOAD_OFFSET))
{
dbg_assert_print(false, "sci msg pop failed with errno = %d", errno);
return;
diff --git a/cesar/interface/fcall/test/src/test_interface_fcall.c b/cesar/interface/fcall/test/src/test_interface_fcall.c
index bc8961a4f6..d04cfdf448 100644
--- a/cesar/interface/fcall/test/src/test_interface_fcall.c
+++ b/cesar/interface/fcall/test/src/test_interface_fcall.c
@@ -178,11 +178,11 @@ interface_fcall_mme_send_test_case(test_t t)
sci_msg_init(&msg, buffer, SCI_MSG_MAX_SIZE) >= 0
);
test_fail_unless(
- sci_msg_push(&msg, strlen(fcall_test) + 1) >= 0
+ 0 <= sci_msg_push (&msg, strlen (fcall_test) + 1)
);
strcpy((char*)msg.data_begin, fcall_test);
test_fail_unless(
- sci_msg_push(&msg, sizeof(struct fcall_msg_hdr)) >= 0
+ 0 <= sci_msg_push (&msg, sizeof (struct fcall_msg_hdr))
);
interface_fcall_mme_send (ctx, &msg);
test_fail_unless(