<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.nsnam.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Priority-queue-proposal</id>
	<title>Priority-queue-proposal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.nsnam.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Priority-queue-proposal"/>
	<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;action=history"/>
	<updated>2026-05-02T18:31:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9327&amp;oldid=prev</id>
		<title>Tomh: /* Status */</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9327&amp;oldid=prev"/>
		<updated>2015-02-24T23:28:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Status&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:28, 24 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l168&quot;&gt;Line 168:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 168:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* other changes to support the above refactoring:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/b6891bd5dedd&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* other changes to support the above refactoring:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/b6891bd5dedd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;In addition:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No ECN support yet&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No ECN support yet&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No support of other devices except PointToPointNetDevice&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No support of other devices except PointToPointNetDevice&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Tracing support of the priority queues needs to be added&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Tracing support of the priority queues needs to be added&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tomh</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9326&amp;oldid=prev</id>
		<title>Tomh: /* Status */</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9326&amp;oldid=prev"/>
		<updated>2015-02-24T23:27:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Status&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:27, 24 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l165&quot;&gt;Line 165:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 165:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See http://code.nsnam.org/tomh/ns-3-dev-aqm&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See http://code.nsnam.org/tomh/ns-3-dev-aqm&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;* Pfifo fast queue:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/4e1543dc9d68&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Pfifo fast queue:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/4e1543dc9d68&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;* other changes to support the above refactoring:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/b6891bd5dedd&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* other changes to support the above refactoring:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/b6891bd5dedd&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No ECN support yet&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No ECN support yet&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No support of other devices except PointToPointNetDevice&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* No support of other devices except PointToPointNetDevice&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Tracing support of the priority queues needs to be added&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Tracing support of the priority queues needs to be added&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tomh</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9325&amp;oldid=prev</id>
		<title>Tomh: /* PriorityQueue class */</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9325&amp;oldid=prev"/>
		<updated>2015-02-24T23:27:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;PriorityQueue class&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:27, 24 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# ECN support doesn't require removing the headers&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# ECN support doesn't require removing the headers&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It is easier to peek the transport header if the Ip header hasn't been added yet.  Flow classification such as in fq_codel requires access to the 5-tuple.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# It is easier to peek the transport header if the Ip header hasn't been added yet.  Flow classification such as in fq_codel requires access to the 5-tuple.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;But the drawback to this is that the neighbor discovery cache needs also to be modified to enqueue packets that don't yet have IP headers; m_pending can no longer be a std::list&amp;lt;Ptr&amp;lt;Packet&gt; &gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current implementation is in ''src/internet/model/priority-queue.{cc,h}''.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current implementation is in ''src/internet/model/priority-queue.{cc,h}''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tomh</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9324&amp;oldid=prev</id>
		<title>Tomh: priority queue proposal</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=Priority-queue-proposal&amp;diff=9324&amp;oldid=prev"/>
		<updated>2015-02-24T23:22:57Z</updated>

		<summary type="html">&lt;p&gt;priority queue proposal&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
This page describes a design proposal for [[ns-3.23]].&lt;br /&gt;
&lt;br /&gt;
== Problem statement ==&lt;br /&gt;
&lt;br /&gt;
* ns-3 needs to support Internet-aware queues such as [http://www.bufferbloat.net/projects/codel/wiki/Technical_description_of_FQ_CoDel fq_codel]&lt;br /&gt;
* Current ''ns3::Queue'' class has an Ethernet header already added, and doesn't provide easy visibility to IP or transport headers&lt;br /&gt;
* An additional complexity is that wireless devices implement their own queues; for instance, WiFi does not even use ''class ns3::Queue''&lt;br /&gt;
* ECN support is needed, so not only do we need to peek at the IP header or use Packet metadata, we need to sometimes modify it.&lt;br /&gt;
&lt;br /&gt;
== Proposed solution ==&lt;br /&gt;
&lt;br /&gt;
For these problems, it seems advantageous to define a new 'priority queue' layer that sits above the devices and below the IP forwarding layer, such as is done in Linux.  Natale Patriciello proposed this on the list:  http://mailman.isi.edu/pipermail/ns-developers/2014-November/012398.html&lt;br /&gt;
* this will allow easier access to the IP and transport header, perhaps even deferring the addition of the IP header until just before sending it to the device&lt;br /&gt;
* this will allow uniform application of these queues across all device types&lt;br /&gt;
* this may also help to solve the UDP backpressure problem, [https://www.nsnam.org/bugzilla/show_bug.cgi?id=1006 bug 1006]&lt;br /&gt;
&lt;br /&gt;
The main consequence is that it requires flow control between the priority queue layer and the device layer.  All ns-3 devices need to be extended to support backpressure to the priority queue layer.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
Each Ipv4Interface object is extended to include an ''ns3::PriorityQueue'' object.  This is a different base class than ''ns3::Queue''.  I chose to put it in the interface object instead of ''ns3::Ipv4L3Protocol'', which is an implementation detail.  If we place it above Ipv4Interface, we need to have a data structure in the Ipv4L3Protocol that still maintains a per-interface queue within that class.&lt;br /&gt;
&lt;br /&gt;
=== PriorityQueue class ===&lt;br /&gt;
&lt;br /&gt;
This differs from ''ns3::Queue'' because it needs to support enqueuing of a struct, not just a Ptr&amp;lt;Packet&amp;gt;.  At this point of the stack, we have a destination hardware address, and the fully formed IP packet; we combine these in a struct:&lt;br /&gt;
&lt;br /&gt;
  struct QueueElement&lt;br /&gt;
  {&lt;br /&gt;
    Ptr&amp;lt;Packet&amp;gt; p;&lt;br /&gt;
    Address dest;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
and we enqueue these queue elements:&lt;br /&gt;
&lt;br /&gt;
  bool Enqueue (struct QueueElement q);&lt;br /&gt;
  struct QueueElement Dequeue (void);&lt;br /&gt;
&lt;br /&gt;
This approach could even be extended further to allow the Ipv4Header or Ipv6Header to be included in the struct, deferring its addition from Ipv4L3Protocol to this class.  This is probably beneficial for two reasons:  &lt;br /&gt;
# ECN support doesn't require removing the headers&lt;br /&gt;
# It is easier to peek the transport header if the Ip header hasn't been added yet.  Flow classification such as in fq_codel requires access to the 5-tuple.&lt;br /&gt;
&lt;br /&gt;
Current implementation is in ''src/internet/model/priority-queue.{cc,h}''.&lt;br /&gt;
&lt;br /&gt;
=== Ipv4Interface changes ===&lt;br /&gt;
&lt;br /&gt;
The main change to this class is the priority queue inclusion, the registering of this object with the NetDevice callback, and the logic to enqueue/dequeue packets.  Where the object once called down to ''NetDevice::Send()'', we add a ''DeviceQueueTransmit()'' method that looks like this:&lt;br /&gt;
&lt;br /&gt;
  void&lt;br /&gt;
  Ipv4Interface::DeviceQueueTransmit (Ptr&amp;lt;Packet&amp;gt; packet, const Address&amp;amp; dest)&lt;br /&gt;
  {&lt;br /&gt;
    NS_LOG_FUNCTION (this &amp;lt;&amp;lt; packet &amp;lt;&amp;lt; dest);&lt;br /&gt;
    NS_ASSERT_MSG (m_prioQueue, &amp;quot;This method being called before DoSetup; shouldn't happen&amp;quot;);&lt;br /&gt;
    struct PriorityQueue::QueueElement q;&lt;br /&gt;
    q.p = packet;&lt;br /&gt;
    q.dest = dest;&lt;br /&gt;
    m_prioQueue-&amp;gt;Enqueue (q);&lt;br /&gt;
    if (m_device-&amp;gt;IsReady ())&lt;br /&gt;
      {&lt;br /&gt;
        // We enqueue and dequeue immediately rather than bypass the queue in &lt;br /&gt;
        // case the queue needs to know about such packets for future scheduling&lt;br /&gt;
        q = m_prioQueue-&amp;gt;Dequeue ();&lt;br /&gt;
        m_device-&amp;gt;Send (q.p, q.dest, Ipv4L3Protocol::PROT_NUMBER);&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
and we add a callback target that allows the interface to try to dequeue if the device becomes unblocked:&lt;br /&gt;
&lt;br /&gt;
  void&lt;br /&gt;
  Ipv4Interface::DeviceReady (Ptr&amp;lt;NetDevice&amp;gt; nd)&lt;br /&gt;
  {&lt;br /&gt;
    NS_LOG_FUNCTION (this &amp;lt;&amp;lt; nd);&lt;br /&gt;
    NS_LOG_UNCOND (&amp;quot;Device is ready&amp;quot;);&lt;br /&gt;
    struct PriorityQueue::QueueElement q;&lt;br /&gt;
    q = m_prioQueue-&amp;gt;Dequeue ();&lt;br /&gt;
    if (!q.p)&lt;br /&gt;
      {&lt;br /&gt;
        NS_LOG_LOGIC (&amp;quot;No packet to send&amp;quot;);&lt;br /&gt;
        return;&lt;br /&gt;
      }&lt;br /&gt;
    do&lt;br /&gt;
      {&lt;br /&gt;
        m_device-&amp;gt;Send (q.p, q.dest, Ipv4L3Protocol::PROT_NUMBER);&lt;br /&gt;
        if (m_device-&amp;gt;IsReady ())&lt;br /&gt;
          {&lt;br /&gt;
            q = m_prioQueue-&amp;gt;Dequeue ();&lt;br /&gt;
          }&lt;br /&gt;
        else&lt;br /&gt;
          {&lt;br /&gt;
            break;&lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
    while (q.p);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
The suggested default PriorityQueue is the new PfifoFast queue that models the Linux default.&lt;br /&gt;
&lt;br /&gt;
=== NetDevice changes ===&lt;br /&gt;
&lt;br /&gt;
Each ''ns3::NetDevice'' is extended to support this in the base class:&lt;br /&gt;
&lt;br /&gt;
  diff -r 4e1543dc9d68 -r b6891bd5dedd src/network/model/net-device.h&lt;br /&gt;
  --- a/src/network/model/net-device.h	Thu Nov 06 15:18:11 2014 -0800&lt;br /&gt;
  +++ b/src/network/model/net-device.h	Fri Jan 16 15:57:07 2015 -0800&lt;br /&gt;
    @@ -335,6 +335,22 @@&lt;br /&gt;
      */&lt;br /&gt;
     virtual bool SupportsSendFrom (void) const = 0;&lt;br /&gt;
   &lt;br /&gt;
  +  &lt;br /&gt;
  +  /**&lt;br /&gt;
  +   * Callback invoked when device wants to tell the higher layer that it&lt;br /&gt;
  +   * may send a packet&lt;br /&gt;
  +   */&lt;br /&gt;
  +  typedef Callback &amp;lt; void, Ptr&amp;lt;NetDevice&amp;gt; &amp;gt; DeviceReadyCallback;&lt;br /&gt;
  +&lt;br /&gt;
  +  virtual void SetDeviceReadyCallback (DeviceReadyCallback cb) { m_deviceReadyCallback = cb; }&lt;br /&gt;
  +&lt;br /&gt;
  +  /**&lt;br /&gt;
  +   * \return true if this interface is ready for a packet from the higher layer&lt;br /&gt;
  +   */&lt;br /&gt;
  +  virtual bool IsReady (void) const = 0;&lt;br /&gt;
  +&lt;br /&gt;
  +private:&lt;br /&gt;
  +  DeviceReadyCallback m_deviceReadyCallback;&lt;br /&gt;
   };&lt;br /&gt;
&lt;br /&gt;
The NetDevice objects support polling (IsReady ()) or callbacks to notify when the upper layer can send a packet.  If the device enters a not ready state, the callback is invoked when the device becomes ready.&lt;br /&gt;
&lt;br /&gt;
An example of how this is supported is as follows.  In the PointToPointNetDevice, IsReady() is implemented as follows:&lt;br /&gt;
&lt;br /&gt;
  +bool&lt;br /&gt;
  +PointToPointNetDevice::IsReady (void) const&lt;br /&gt;
  +{&lt;br /&gt;
  +  NS_LOG_FUNCTION (this);&lt;br /&gt;
  +  return !(m_queue-&amp;gt;IsFull ());&lt;br /&gt;
  +}&lt;br /&gt;
&lt;br /&gt;
and the callback is called when a packet is sent, as follows:&lt;br /&gt;
&lt;br /&gt;
  +  bool blocked = m_queue-&amp;gt;IsFull ();&lt;br /&gt;
     Ptr&amp;lt;Packet&amp;gt; p = m_queue-&amp;gt;Dequeue ();&lt;br /&gt;
     if (p == 0)&lt;br /&gt;
       {&lt;br /&gt;
  -      //&lt;br /&gt;
  -      // No packet was on the queue, so we just exit.&lt;br /&gt;
  -      //&lt;br /&gt;
  +      NS_LOG_LOGIC (&amp;quot;No pending packets in device queue after tx complete&amp;quot;);&lt;br /&gt;
  +      if (blocked &amp;amp;&amp;amp; !m_deviceReadyCallback.IsNull())&lt;br /&gt;
  +        {&lt;br /&gt;
  +          m_deviceReadyCallback (this);&lt;br /&gt;
  +        }&lt;br /&gt;
       return;&lt;br /&gt;
&lt;br /&gt;
The above is the basic idea, to be implemented across all devices.  It is not clear yet how the more complicated device queueing structures (e.g. WiFi 802.11e) will manage and report their &amp;quot;IsReady()&amp;quot; status.   In the current code, only PointToPointNetDevice has been implemented this way; other devices simply always return true to IsReady(), so that the priority queue never faces backpressure.  &lt;br /&gt;
&lt;br /&gt;
=== Other changes ===&lt;br /&gt;
&lt;br /&gt;
In addition, queue type ns3::RedQueue should be moved from src/network/utils to src/internet/model/ and ported to class PriorityQueue.&lt;br /&gt;
&lt;br /&gt;
We can possibly implement some UDP backpressure by allowing the UdpSocket some access to the priority queue corresponding to its interface.  Doing so with callbacks may be tricky since routing may change the underlying device for the socket.  &lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
See http://code.nsnam.org/tomh/ns-3-dev-aqm&lt;br /&gt;
** Pfifo fast queue:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/4e1543dc9d68&lt;br /&gt;
** other changes to support the above refactoring:  http://code.nsnam.org/tomh/ns-3-dev-aqm/rev/b6891bd5dedd&lt;br /&gt;
&lt;br /&gt;
* No ECN support yet&lt;br /&gt;
* No support of other devices except PointToPointNetDevice&lt;br /&gt;
* Tracing support of the priority queues needs to be added&lt;/div&gt;</summary>
		<author><name>Tomh</name></author>
	</entry>
</feed>