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

Revert "ccnl-riot: initialize fields for default options" #214

Closed
wants to merge 2 commits into from

Conversation

blacksheeep
Copy link
Contributor

Reverts #209

@blacksheeep blacksheeep requested a review from mfrey March 13, 2018 13:43
@cgundogan
Copy link
Collaborator

There's no need to revert the full commit.

default_opts.ndntlv.interestlifetime = CCNL_INTEREST_TIMEOUT;

This just needs to be

CCNL_INTEREST_TIMEOUT * 1000

if I am not mistaken.

struct ccnl_interest_s -> interestlifetime is in seconds, while
struct ccnl_ndntlv_interest_opts_s -> interestlifetime is in milliseconds.

AFAIK there's no way to interact with struct ccnl_interest_s -> interestlifetime from a user and even developer perspective through the API. Did I miss something?

@mfrey
Copy link
Collaborator

mfrey commented Mar 13, 2018

struct ccnl_interest_s -> interestlifetime is in seconds, while
struct ccnl_ndntlv_interest_opts_s -> interestlifetime is in milliseconds.

So, this means that these two variables refer to "different" (but related) topics? The first is more about a timeout of an interest (no matter which ICN flavor) and the latter is specific to NDN? Honestly, this is kind-of confusing (and also explains why @OlegHahm assigned default_opts.ndntlv.interestlifetime a default value of CCNL_INTEREST_TIMEOUT (which again is the wrong default (it is 4 seconds and not 10 seconds)).

But, maybe I'm missing something and just need more sleep.

@blacksheeep
Copy link
Contributor Author

Ok, but the incorrect default value does not effect the functionality nor the interoperability with NDN.

Somehow, at this point I did not get the problem at all.
You want the timeouts to be specified in Milliseconds? I think that would be a complete different issue and not influencing this pull request since it applies the default value.
Moreover, is there a really benefit from having the timeout in Milliseconds?
The lifetime of an interest is always a combination of retransmit and timeouts, and relies on the required RTT which is usually be hard to guess in a more precise way than seconds.

If we have arguments to change that to Milliseconds, I am open to do so.
But again, does this influence this PR?

@cgundogan
Copy link
Collaborator

cgundogan commented Mar 13, 2018

default_opts.ndntlv.interestlifetime = CCNL_INTEREST_TIMEOUT;

at least this needs to be changed to milliseconds, because the default_opts.ndntlv.interestlifetime value is directly written to the outgoing Interest message. There it is supposed to be milliseconds

@blacksheeep
Copy link
Contributor Author

blacksheeep commented Mar 13, 2018

ok, now I get close to the issue, so having this, we will end up with inconsistencies?

In this case I do not know, if it is not a better idea to revert the PR and to really fix the issue by introducing milliseconds and by looking forward to consistent time values?

@mfrey
Copy link
Collaborator

mfrey commented Mar 13, 2018

This is generating more "fuzz" than it should be. I would suggest to define a constant

/**
 * Default interest lifetime in milliseconds. If the element is omitted by a user, a default 
 * value of 4 seconds is used.
 */
#ifndef NDN_DEFAULT_INTEREST_LIFETIME
#define NDN_DEFAULT_INTEREST_LIFETIME (4000u)
#endif

and assign it to the default initialisation. I would also to suggest to postpone the whole (internal?) lifetime discussion and update #210

Copy link
Collaborator

@mfrey mfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I've mentioned in the main discussion, I would introduce a new define, probably in the ndntlv header and set it to the default of the specification (in milliseconds).

@blacksheeep
Copy link
Contributor Author

See PR #216

@blacksheeep blacksheeep deleted the revert-209-feature/init_default_opts branch March 13, 2018 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants