-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fragmentation feature token #326
Conversation
(_z_zbuf_capacity(&zt->_transport._unicast._zbuf) != zbuf_size)) { | ||
ret = _Z_ERR_SYSTEM_OUT_OF_MEMORY; | ||
|
||
#if Z_FEATURE_MULTI_THREAD == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -284,8 +301,10 @@ | |||
// Clean up the buffers | |||
_z_wbuf_clear(&ztu->_wbuf); | |||
_z_zbuf_clear(&ztu->_zbuf); | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
_z_zbuf_clear(&zt->_transport._unicast._zbuf); | ||
} | ||
|
||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -123,6 +123,7 @@ | |||
ztu->_transmitted = true; // Mark the session that we have transmitted data | |||
} | |||
} else { | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -278,6 +278,7 @@ | |||
// Mark the session that we have transmitted data | |||
ztm->_transmitted = true; | |||
} else { // The message does not fit in the current batch, let's fragment it | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -108,15 +108,19 @@ | |||
if (_z_sn_precedes(ztu->_sn_res, ztu->_sn_rx_reliable, t_msg->_body._frame._sn) == true) { | |||
ztu->_sn_rx_reliable = t_msg->_body._frame._sn; | |||
} else { | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -267,12 +275,14 @@ | |||
_z_conduit_sn_list_copy(&entry->_sn_rx_sns, &t_msg->_body._join._next_sn); | |||
_z_conduit_sn_list_decrement(entry->_sn_res, &entry->_sn_rx_sns); | |||
|
|||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -146,7 +146,9 @@ | |||
true) { | |||
entry->_sn_rx_sns._val._plain._reliable = t_msg->_body._frame._sn; | |||
} else { | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -175,6 +179,7 @@ | |||
|
|||
case _Z_MID_T_FRAGMENT: { | |||
_Z_INFO("Received Z_FRAGMENT message"); | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
@@ -155,7 +157,9 @@ | |||
t_msg->_body._frame._sn) == true) { | |||
entry->_sn_rx_sns._val._plain._best_effort = t_msg->_body._frame._sn; | |||
} else { | |||
#if Z_FEATURE_FRAGMENTATION == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
ret = _Z_ERR_SYSTEM_OUT_OF_MEMORY; | ||
_Z_ERROR("Not enough memory to allocate transport tx rx buffers!"); | ||
|
||
#if Z_FEATURE_MULTI_THREAD == 1 |
Check warning
Code scanning / Cppcheck (reported by Codacy)
misra violation 2009 with no text in the supplied rule-texts-file Warning
Related to #261, this PR adds a config token to toggle the message fragmentation feature.