diff options
Diffstat (limited to 'static/freebsd/man4/ng_car.4 3.html')
| -rw-r--r-- | static/freebsd/man4/ng_car.4 3.html | 218 |
1 files changed, 0 insertions, 218 deletions
diff --git a/static/freebsd/man4/ng_car.4 3.html b/static/freebsd/man4/ng_car.4 3.html deleted file mode 100644 index c6828e7e..00000000 --- a/static/freebsd/man4/ng_car.4 3.html +++ /dev/null @@ -1,218 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">NG_CAR(4)</td> - <td class="head-vol">Device Drivers Manual</td> - <td class="head-rtitle">NG_CAR(4)</td> - </tr> -</table> -<div class="manual-text"> -<section class="Sh"> -<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> -<p class="Pp"><code class="Nm">ng_car</code> — <span class="Nd">Committed - Access Rate netgraph node type</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><code class="In">#include - <<a class="In">netgraph/ng_car.h</a>></code></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The <code class="Nm">car</code> node type limits traffic flowing - through it using:</p> -<p class="Pp"></p> -<ul class="Bl-bullet Bl-compact"> - <li>Single rate three color marker as described in RFC 2697,</li> - <li>Two rate three color marker as described in RFC 2698,</li> - <li>RED-like rate limit algorithm used by Cisco,</li> - <li>Traffic shaping with RED.</li> -</ul> -</section> -<section class="Sh"> -<h1 class="Sh" id="HOOKS"><a class="permalink" href="#HOOKS">HOOKS</a></h1> -<p class="Pp">This node type supports the following hooks:</p> -<dl class="Bl-tag"> - <dt id="upper"><var class="Va">upper</var></dt> - <dd>Hook leading to upper layer protocols.</dd> - <dt id="lower"><var class="Va">lower</var></dt> - <dd>Hook leading to lower layer protocols.</dd> -</dl> -<p class="Pp" id="downstream">Traffic flowing from <var class="Va">upper</var> - to <var class="Va">lower</var> is considered - <a class="permalink" href="#downstream"><b class="Sy">downstream</b></a> - traffic. Traffic flowing from <var class="Va">lower</var> to - <var class="Va">upper</var> is considered - <a class="permalink" href="#upstream"><b class="Sy" id="upstream">upstream</b></a> - traffic.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="MODES_OF_OPERATION"><a class="permalink" href="#MODES_OF_OPERATION">MODES - OF OPERATION</a></h1> -<p class="Pp">Each hook can operate in one of the following modes:</p> -<dl class="Bl-tag"> - <dt id="NG_CAR_SINGLE_RATE"><a class="permalink" href="#NG_CAR_SINGLE_RATE"><code class="Dv">NG_CAR_SINGLE_RATE</code></a></dt> - <dd>Single rate three color marker as described in RFC 2697. Committed burst - packets are counted as green, extended burst packets are counted as yellow - and exceeding packets are counted as red. Committed burst getting refilled - with CIR (Committed Information Rate) speed. When it is full, exceeded - burst getting refilled.</dd> - <dt id="NG_CAR_DOUBLE_RATE"><a class="permalink" href="#NG_CAR_DOUBLE_RATE"><code class="Dv">NG_CAR_DOUBLE_RATE</code></a></dt> - <dd>Two rate three color marker as described in RFC 2698. Committed burst - packets are counted as green, peak burst packets are counted as yellow and - exceeding packets are counted as red. Committed burst getting refilled - with CIR speed. Peak burst getting refilled with PIR (Peak Information - Rate) speed at the same time.</dd> - <dt id="NG_CAR_RED"><a class="permalink" href="#NG_CAR_RED"><code class="Dv">NG_CAR_RED</code></a></dt> - <dd>Similar to <code class="Dv">NG_CAR_SINGLE_RATE</code>, but with different - understanding of extended burst. When normal burst exceeded and extended - burst is used, packets are counted red with probability equal to part of - extended burst consumed. Extended burst getting refilled first. When it is - full, committed burst getting refilled. This behavior is similar to RED - active queue management algorithm. - <p class="Pp">This algorithm is more polite to the TCP traffic than - NG_CAR_SINGLE_RATE.</p> - </dd> - <dt id="NG_CAR_SHAPE"><a class="permalink" href="#NG_CAR_SHAPE"><code class="Dv">NG_CAR_SHAPE</code></a></dt> - <dd>Committed burst packets are counted as green, exceeding packets are - delayed by queue with RED management and counted as yellow. Packets - dropped by queue counted as red. Queue parameters are hardcoded: length 99 - packets, min_th 8 packets, max_p 100%. - <p class="Pp">Traffic shaping is much more polite to the TCP traffic than - rate limit on links with bandwidth * delay product less than 6-8 TCP - segments, but it consumes additional system resources for queue - processing.</p> - </dd> -</dl> -<p class="Pp">By default, all information rates are measured in bits per second - and bursts are measured in bytes. But when NG_CAR_COUNT_PACKETS option is - enabled, rates are measured in packets per second and bursts are in - packets.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="CONTROL_MESSAGES"><a class="permalink" href="#CONTROL_MESSAGES">CONTROL - MESSAGES</a></h1> -<p class="Pp">This node type supports the generic control messages and the - following specific messages.</p> -<dl class="Bl-tag"> - <dt id="NGM_CAR_SET_CONF"><a class="permalink" href="#NGM_CAR_SET_CONF"><code class="Dv">NGM_CAR_SET_CONF</code></a> - (<code class="Ic">setconf</code>)</dt> - <dd>Set node configuration to the specified at <var class="Vt">struct - ng_car_bulkconf</var></dd> - <dt id="NGM_CAR_GET_CONF"><a class="permalink" href="#NGM_CAR_GET_CONF"><code class="Dv">NGM_CAR_GET_CONF</code></a> - (<code class="Ic">getconf</code>)</dt> - <dd>Return current node configuration as <var class="Vt">struct - ng_car_bulkconf</var> - <div class="Bd Pp Li"> - <pre>struct ng_car_hookconf { - uint64_t cbs; /* Committed burst size (bytes) */ - uint64_t ebs; /* Exceeded/Peak burst size (bytes) */ - uint64_t cir; /* Committed information rate (bits/s) */ - uint64_t pir; /* Peak information rate (bits/s) */ - uint8_t green_action; /* Action for green packets */ - uint8_t yellow_action; /* Action for yellow packets */ - uint8_t red_action; /* Action for red packets */ - uint8_t mode; /* single/double rate, ... */ - uint8_t opt; /* color-aware or color-blind */ -}; - -/* possible actions (..._action) */ -enum { - NG_CAR_ACTION_FORWARD = 1, - NG_CAR_ACTION_DROP, - NG_CAR_ACTION_MARK -}; - -/* operation modes (mode) */ -enum { - NG_CAR_SINGLE_RATE = 0, - NG_CAR_DOUBLE_RATE, - NG_CAR_RED, - NG_CAR_SHAPE -}; - -/* mode options (bits for opt) */ -#define NG_CAR_COLOR_AWARE 1 -#define NG_CAR_COUNT_PACKETS 2 - -struct ng_car_bulkconf { - struct ng_car_hookconf upstream; - struct ng_car_hookconf downstream; -};</pre> - </div> - </dd> - <dt id="NGM_CAR_GET_STATS"><a class="permalink" href="#NGM_CAR_GET_STATS"><code class="Dv">NGM_CAR_GET_STATS</code></a> - (<code class="Ic">getstats</code>)</dt> - <dd>Return node statistics as <var class="Vt">struct ng_car_bulkstats</var> - <div class="Bd Pp Li"> - <pre>struct ng_car_hookstats { - uint64_t passed_pkts; /* Counter for passed packets */ - uint64_t dropped_pkts; /* Counter for dropped packets */ - uint64_t green_pkts; /* Counter for green packets */ - uint64_t yellow_pkts; /* Counter for yellow packets */ - uint64_t red_pkts; /* Counter for red packets */ - uint64_t errors; /* Counter for operation errors */ -}; - -struct ng_car_bulkstats { - struct ng_car_hookstats upstream; - struct ng_car_hookstats downstream; -};</pre> - </div> - </dd> - <dt id="NGM_CAR_CLR_STATS"><a class="permalink" href="#NGM_CAR_CLR_STATS"><code class="Dv">NGM_CAR_CLR_STATS</code></a> - (<code class="Ic">clrstats</code>)</dt> - <dd>Clear node statistics.</dd> - <dt id="NGM_CAR_GETCLR_STATS"><a class="permalink" href="#NGM_CAR_GETCLR_STATS"><code class="Dv">NGM_CAR_GETCLR_STATS</code></a> - (<code class="Ic">getclrstats</code>)</dt> - <dd>Atomically return and clear node statistics.</dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="SHUTDOWN"><a class="permalink" href="#SHUTDOWN">SHUTDOWN</a></h1> -<p class="Pp">This node shuts down upon receipt of a - <code class="Dv">NGM_SHUTDOWN</code> control message, or when all hooks have - been disconnected.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> -<p class="Pp">Limit outgoing data rate over fxp0 Ethernet interface to 20Mbit/s - and incoming packet rate to 5000pps.</p> -<div class="Bd Pp Bd-indent Li"> -<pre>/usr/sbin/ngctl -f- <<-SEQ - mkpeer fxp0: car lower lower - name fxp0:lower fxp0_car - connect fxp0: fxp0_car: upper upper - msg fxp0_car: setconf { downstream={ cir=20000000 cbs=2500000 ebs=2500000 greenAction=1 yellowAction=1 redAction=2 mode=2 } upstream={ cir=5000 cbs=100 ebs=100 greenAction=1 yellowAction=1 redAction=2 mode=2 opt=2 } } -SEQ</pre> -</div> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">netgraph(4)</a>, <a class="Xr">ngctl(8)</a></p> -<p class="Pp"><cite class="Rs"><span class="RsA">J. Heinanen</span>, - <span class="RsT">A Single Rate Three Color Marker</span>, - <span class="RsO">RFC 2697</span>.</cite></p> -<p class="Pp"><cite class="Rs"><span class="RsA">J. Heinanen</span>, - <span class="RsT">A Two Rate Three Color Marker</span>, - <span class="RsO">RFC 2698</span>.</cite></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> -<p class="Pp"><span class="An">Nuno Antunes</span> - <<a class="Mt" href="mailto:nuno.antunes@gmail.com">nuno.antunes@gmail.com</a>> - <br/> - <span class="An">Alexander Motin</span> - <<a class="Mt" href="mailto:mav@FreeBSD.org">mav@FreeBSD.org</a>></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1> -<p class="Pp">At this moment only DROP and FORWARD actions are implemented.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">January 27, 2021</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
