Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(692)

Unified Diff: src/internet/model/tcp-congestion-ops.h

Issue 322140043: DCTCP Patch
Patch Set: Patch set 3: Taken on ns-3 dev with changeset 13050 Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/internet/doc/tcp.rst ('k') | src/internet/model/tcp-congestion-ops.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/internet/model/tcp-congestion-ops.h
===================================================================
--- a/src/internet/model/tcp-congestion-ops.h
+++ b/src/internet/model/tcp-congestion-ops.h
@@ -136,15 +136,25 @@
{
}
+ /**
+ * \brief Trigger events/calculations on occurance congestion window event
+ *
+ * This function mimics the function cwnd_event in Linux.
+ * The function is called in case of congestion window events.
+ *
+ * \param tcb internal congestion state
+ * \param event the event which triggered this function
+ */
+ virtual void CwndEvent (Ptr<TcpSocketState> tcb,
+ const TcpSocketState::TcpCaEvent_t event)
+ {
+ }
// Present in Linux but not in ns-3 yet:
- /* call when cwnd event occurs (optional) */
- // void (*cwnd_event)(struct sock *sk, enum tcp_ca_event ev);
/* call when ack arrives (optional) */
// void (*in_ack_event)(struct sock *sk, u32 flags);
/* new value of cwnd after loss (optional) */
// u32 (*undo_cwnd)(struct sock *sk);
/* hook for packet ack accounting (optional) */
- // void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us);
/**
* \brief Copy the congestion control algorithm across socket
@@ -152,6 +162,24 @@
* \return a pointer of the copied object
*/
virtual Ptr<TcpCongestionOps> Fork () = 0;
+
+ /**
+ * \brief Assigns socket base to the pointer in DCTCP
+ *
+ * \param tsb
+ */
+ virtual void SetSocketBase (Ptr<TcpSocketBase> tsb)
+ {
+ }
+
+ /**
+ * \brief Reduces congestion window on receipt of ECN Echo Flag
+ *
+ * \param tcb internal congestion state
+ */
+ virtual void ReduceCwnd (Ptr<TcpSocketState> tcb)
+ {
+ }
};
/**
@@ -186,7 +214,7 @@
virtual void IncreaseWindow (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
uint32_t bytesInFlight);
-
+ virtual void ReduceCwnd(Ptr<TcpSocketState> tcb);
virtual Ptr<TcpCongestionOps> Fork ();
protected:
« no previous file with comments | « src/internet/doc/tcp.rst ('k') | src/internet/model/tcp-congestion-ops.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b