diff options
author | Mauro Sardara <msardara@cisco.com> | 2020-09-18 17:39:03 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2020-09-18 17:41:14 +0200 |
commit | 20a773677230374ffa2d5d140f7d46032fb7bc9d (patch) | |
tree | 972ba743c7b1cfbbabd38024215af670d4dc2e3c /libtransport/src/protocols/raaqm.h | |
parent | 22738e6177e9e1348e5a9c23c5a71e1d1ef7246f (diff) |
Revert to [HICN-638] Check if systemd is running before enabling hicn-light service
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I1810d96e001a4e6e097e1efa331b682af750925d
Diffstat (limited to 'libtransport/src/protocols/raaqm.h')
-rw-r--r-- | libtransport/src/protocols/raaqm.h | 55 |
1 files changed, 46 insertions, 9 deletions
diff --git a/libtransport/src/protocols/raaqm.h b/libtransport/src/protocols/raaqm.h index 2999b50cf..fce4194d4 100644 --- a/libtransport/src/protocols/raaqm.h +++ b/libtransport/src/protocols/raaqm.h @@ -20,7 +20,6 @@ #include <protocols/congestion_window_protocol.h> #include <protocols/protocol.h> #include <protocols/raaqm_data_path.h> -#include <protocols/raaqm_transport_algorithm.h> #include <protocols/rate_estimation.h> #include <queue> @@ -30,7 +29,8 @@ namespace transport { namespace protocol { -class RaaqmTransportProtocol : public TransportProtocol { +class RaaqmTransportProtocol : public TransportProtocol, + public CWindowProtocol { public: RaaqmTransportProtocol(implementation::ConsumerSocket *icnet_socket); @@ -51,6 +51,16 @@ class RaaqmTransportProtocol : public TransportProtocol { using PathTable = std::unordered_map<uint32_t, std::unique_ptr<RaaqmDataPath>>; + void increaseWindow() override; + void decreaseWindow() override; + + virtual void afterContentReception(const Interest &interest, + const ContentObject &content_object); + virtual void afterDataUnsatisfied(uint64_t segment); + + virtual void updateStats(uint32_t suffix, uint64_t rtt, + utils::TimePoint &now); + private: void init(); @@ -76,21 +86,48 @@ class RaaqmTransportProtocol : public TransportProtocol { void updateRtt(uint64_t segment); + void RAAQM(); + + void updatePathTable(const ContentObject &content_object); + + void checkDropProbability(); + + void checkForStalePaths(); + + void printRtt(); + protected: - std::queue<Interest::Ptr> interest_to_retransmit_; - std::array<std::uint32_t, buffer_size> interest_retransmissions_; - uint32_t interests_in_flight_; + // Congestion window management double current_window_size_; + // Protocol management + uint64_t interests_in_flight_; + std::array<std::uint32_t, buffer_size> interest_retransmissions_; + std::array<utils::TimePoint, buffer_size> interest_timepoints_; + std::queue<Interest::Ptr> interest_to_retransmit_; private: - std::unique_ptr<TransportAlgorithm> raaqm_algorithm_; - std::unique_ptr<IcnRateEstimator> rate_estimator_; + /** + * Current download path + */ + RaaqmDataPath *cur_path_; + + /** + * Hash table for path: each entry is a pair path ID(key) - path object + */ + PathTable path_table_; + // TimePoints for statistic utils::TimePoint t0_; - // Temporary placeholder for RAAQM algorithm - // parameters + bool set_interest_filter_; + + // for rate-estimation at packet level + IcnRateEstimator *rate_estimator_; + + // params for autotuning bool raaqm_autotune_; + double default_beta_; + double default_drop_; double beta_wifi_; double drop_wifi_; double beta_lte_; |