Skip to content
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

Support polling with no delay #380

Closed
3 tasks done
skliper opened this issue Apr 27, 2023 · 0 comments · Fixed by #381
Closed
3 tasks done

Support polling with no delay #380

skliper opened this issue Apr 27, 2023 · 0 comments · Fixed by #381

Comments

@skliper
Copy link
Contributor

skliper commented Apr 27, 2023

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Polling has a timer that doesn't support zero delay, limiting performance:

CF/fsw/inc/cf_tbldefs.h

Lines 36 to 40 in 930b0e5

uint32 interval_sec; /**<
* \brief number of seconds to wait before trying a new directory.
*
* Must be >0 or slot is inactive.
*/

CF/fsw/src/cf_cfdp.c

Lines 1513 to 1515 in 930b0e5

if (pd->enabled && pd->interval_sec)
{
/* only handle polling for polldirs configured with a non-zero interval */

CF/unit-test/cf_cfdp_tests.c

Lines 1144 to 1148 in 930b0e5

/* nominal call, w/engine enabled, polldir enabled but interval_sec == 0 */
CF_AppData.engine.enabled = 1;
pdcfg->enabled = 1;
UtAssert_VOIDCALL(CF_CFDP_ProcessPollingDirectories(c));
UtAssert_UINT32_EQ(CF_AppData.hk.channel_hk[UT_CFDP_CHANNEL].poll_counter, 0);

Describe the solution you'd like
There's already a channel enable, no need to use interval to disable the channel. Update to support 0 delay to maximize throughput when using the polling directory.

Describe alternatives you've considered
None

Additional context
I can't say I really understand why 0 timeout wasn't supported to begin with. If anyone knows I'd be interested to hear it. In rate constrained situations unnecessary delays on file transfers are a big impact. Sending small files on a fast link could waste significant bandwidth by waiting a second between polling.

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper self-assigned this Apr 27, 2023
skliper added a commit to skliper/CF that referenced this issue Apr 27, 2023
dzbaker added a commit that referenced this issue May 4, 2023
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants