diff options
author | Olivier Roques <olvrqs@gmail.com> | 2019-11-21 15:47:00 +0000 |
---|---|---|
committer | Olivier Roques <olvrqs@gmail.com> | 2019-11-22 12:33:01 +0000 |
commit | d41e15b580287a26f6b58241eaec7957ee336050 (patch) | |
tree | 9fa19199fcc340eec582353986cc354660bac130 /libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h | |
parent | 4d593c09d9cc1496788f7953de25832193064103 (diff) |
[HICN-411] Change how manifests are requested
This patch introduces a new way of requesting manifests such that
all the segments they contain fill the current transport window.
When a manifest (M) is received, we compute
L = last_segment_requested + current_window_size.
L is therefore equal or greater than the last segment of the
current window.
Then we compare L to the suffix of the next manifest that will
be (potentially) requested.
If L > next_manifest, it means that the last segment of the window is
greater than the first segment contained in the next manifest.
Therefore we request manifests until L <= next_manifest, ie until the
manifests would cover the entire window.
If L <= next_manifest, then all the manifests that were requested
already cover the window, so there's no need to request more. However
if the next manifest immediately follows the current one (M), we still
need to request it so that the content suffix queue is correctly
updated.
Signed-off-by: Olivier Roques <olvrqs@gmail.com>
Change-Id: I71a5a0031cd783277d0aa59fd68d5d7bf64fe6ae
Diffstat (limited to 'libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h')
-rw-r--r-- | libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h b/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h index 74c86eb60..cb88940d5 100644 --- a/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h +++ b/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h @@ -21,9 +21,6 @@ #include <list> -/* #define MAX_MANIFESTS_IN_FLIGHT std::numeric_limits<uint32_t>::max() */ -#define MAX_MANIFESTS_IN_FLIGHT 10 - namespace transport { namespace protocol { @@ -58,9 +55,9 @@ class ManifestIndexManager : public IncrementalIndexManager, private: void onManifestReceived(Interest::Ptr &&i, ContentObject::Ptr &&c); void onManifestTimeout(Interest::Ptr &&i); + void fillWindow(Name &name, uint32_t current_manifest); protected: - uint32_t manifests_in_flight_; SuffixQueue suffix_queue_; SuffixQueue::iterator next_reassembly_segment_; SuffixQueue::iterator next_to_retrieve_segment_; |