l4re-base-25.08.0

This commit is contained in:
2025-09-12 15:55:45 +02:00
commit d959eaab98
37938 changed files with 9382688 additions and 0 deletions

View File

@@ -0,0 +1,373 @@
<!-- HTML header for doxygen 1.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.15.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>L4Re Operating System Framework: Virtio_switch Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="l4re-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="L4Re_rgb_logo_quer_hg_h55.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">L4Re Operating System Framework
</div>
<div id="projectbrief">Interface and Usage Documentation</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.15.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('classVirtio__switch.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Virtio_switch Class Reference<div class="ingroups"><a class="el" href="group__virtio__net__switch.html">Virtio Net Switch</a></div></div></div>
</div><!--header-->
<div class="contents">
<p>The Virtio switch contains all ports and processes network requests.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="switch_8h_source.html">switch.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Collaboration diagram for Virtio_switch:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="classVirtio__switch__coll__graph.svg" width="200" height="176"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-pub-methods" class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9a34b2af89435edc6f96163cfc90b324" id="r_a9a34b2af89435edc6f96163cfc90b324"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9a34b2af89435edc6f96163cfc90b324">Virtio_switch</a> (unsigned max_ports)</td></tr>
<tr class="memdesc:a9a34b2af89435edc6f96163cfc90b324"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a switch with n ports. <br /></td></tr>
<tr class="memitem:af2f67c7f5ab25aceaf08eac5acbdc204" id="r_af2f67c7f5ab25aceaf08eac5acbdc204"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af2f67c7f5ab25aceaf08eac5acbdc204">add_port</a> (Port_iface *port)</td></tr>
<tr class="memdesc:af2f67c7f5ab25aceaf08eac5acbdc204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a port to the switch. <br /></td></tr>
<tr class="memitem:aa10627d88a15a711629bfa100813b0e1" id="r_aa10627d88a15a711629bfa100813b0e1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa10627d88a15a711629bfa100813b0e1">add_monitor_port</a> (Port_iface *port)</td></tr>
<tr class="memdesc:aa10627d88a15a711629bfa100813b0e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a monitor port to the switch. <br /></td></tr>
<tr class="memitem:a5b5b4ab52f242c7f829234b9165ab14c" id="r_a5b5b4ab52f242c7f829234b9165ab14c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5b5b4ab52f242c7f829234b9165ab14c">check_ports</a> ()</td></tr>
<tr class="memdesc:a5b5b4ab52f242c7f829234b9165ab14c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check validity of ports. <br /></td></tr>
<tr class="memitem:ac5cfe25b7791bdb18d48985631913447" id="r_ac5cfe25b7791bdb18d48985631913447"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac5cfe25b7791bdb18d48985631913447">handle_l4virtio_port_tx</a> (<a class="el" href="classL4virtio__port.html">L4virtio_port</a> *port)</td></tr>
<tr class="memdesc:ac5cfe25b7791bdb18d48985631913447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle TX queue of the given port. <br /></td></tr>
<tr class="memitem:ad1209814056da7ca22b592c176f0773f" id="r_ad1209814056da7ca22b592c176f0773f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad1209814056da7ca22b592c176f0773f">port_available</a> (bool monitor)</td></tr>
<tr class="memdesc:ad1209814056da7ca22b592c176f0773f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is there still a free port on this switch available? <br /></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The Virtio switch contains all ports and processes network requests. </p>
<p>A Port on its own is not capable to process an incoming network request because it has no knowledge about other ports. The processing of an incoming request therefore gets delegated to the switch.</p>
<p>The <span class="tt"><a class="el" href="classVirtio__switch.html" title="The Virtio switch contains all ports and processes network requests.">Virtio_switch</a></span> is constructed at the start of the Virtio Net Switch application. The factory saves a reference to it to pass it to the <span class="tt">Kick_irq</span> on port creation. </p>
<p class="definition">Definition at line <a class="el" href="switch_8h_source.html#l00033">33</a> of file <a class="el" href="switch_8h_source.html">switch.h</a>.</p>
</div><a name="doc-constructors" id="doc-constructors"></a><h2 id="header-doc-constructors" class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a9a34b2af89435edc6f96163cfc90b324" name="a9a34b2af89435edc6f96163cfc90b324"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a34b2af89435edc6f96163cfc90b324">&#9670;&#160;</a></span>Virtio_switch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Virtio_switch::Virtio_switch </td>
<td>(</td>
<td class="paramtype">unsigned</td> <td class="paramname"><span class="paramname"><em>max_ports</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a switch with n ports. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">max_ports</td><td>maximal number of provided ports </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="switch_8cc_source.html#l00012">12</a> of file <a class="el" href="switch_8cc_source.html">switch.cc</a>.</p>
</div>
</div>
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Member Function Documentation</h2>
<a id="aa10627d88a15a711629bfa100813b0e1" name="aa10627d88a15a711629bfa100813b0e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa10627d88a15a711629bfa100813b0e1">&#9670;&#160;</a></span>add_monitor_port()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Virtio_switch::add_monitor_port </td>
<td>(</td>
<td class="paramtype">Port_iface *</td> <td class="paramname"><span class="paramname"><em>port</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a monitor port to the switch. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">port</td><td>A pointer to an already constructed Port_iface object.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>Port was added successfully. </td></tr>
<tr><td class="paramname">false</td><td>Switch was not able to add the port. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="switch_8cc_source.html#l00054">54</a> of file <a class="el" href="switch_8cc_source.html">switch.cc</a>.</p>
</div>
</div>
<a id="af2f67c7f5ab25aceaf08eac5acbdc204" name="af2f67c7f5ab25aceaf08eac5acbdc204"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2f67c7f5ab25aceaf08eac5acbdc204">&#9670;&#160;</a></span>add_port()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Virtio_switch::add_port </td>
<td>(</td>
<td class="paramtype">Port_iface *</td> <td class="paramname"><span class="paramname"><em>port</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a port to the switch. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">port</td><td>A pointer to an already constructed Port_iface object.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">true</td><td>Port was added successfully. </td></tr>
<tr><td class="paramname">false</td><td>Switch was not able to add the port. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="switch_8cc_source.html#l00029">29</a> of file <a class="el" href="switch_8cc_source.html">switch.cc</a>.</p>
<p class="reference">References <a class="el" href="mac__addr_8h_source.html#l00066">Mac_addr::is_unknown()</a>.</p>
<div id="dynsection-1" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="classVirtio__switch_af2f67c7f5ab25aceaf08eac5acbdc204_cgraph.svg" width="400" height="36"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="a5b5b4ab52f242c7f829234b9165ab14c" name="a5b5b4ab52f242c7f829234b9165ab14c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b5b4ab52f242c7f829234b9165ab14c">&#9670;&#160;</a></span>check_ports()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Virtio_switch::check_ports </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check validity of ports. </p>
<p>Check whether all ports are still used and remove any unused (unreferenced) ports. Shall be invoked after an incoming cap deletion irq to remove ports without clients. </p>
<p class="definition">Definition at line <a class="el" href="switch_8cc_source.html#l00069">69</a> of file <a class="el" href="switch_8cc_source.html">switch.cc</a>.</p>
</div>
</div>
<a id="ac5cfe25b7791bdb18d48985631913447" name="ac5cfe25b7791bdb18d48985631913447"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5cfe25b7791bdb18d48985631913447">&#9670;&#160;</a></span>handle_l4virtio_port_tx()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Virtio_switch::handle_l4virtio_port_tx </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classL4virtio__port.html">L4virtio_port</a> *</td> <td class="paramname"><span class="paramname"><em>port</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle TX queue of the given port. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">port</td><td><a class="el" href="classL4virtio__port.html" title="A Port on the Virtio Net Switch.">L4virtio_port</a> to handle pending TX work for.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">false</td><td>Port hit its TX burst limit, and thus a TX pending reschedule notification was queued. </td></tr>
<tr><td class="paramname">true</td><td>Port's entire TX queue was processed. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="switch_8cc_source.html#l00194">194</a> of file <a class="el" href="switch_8cc_source.html">switch.cc</a>.</p>
<p class="reference">References <a class="el" href="server_2l4virtio_source.html#l01024">L4virtio::Svr::Device_t&lt; DATA &gt;::device_error()</a>, <a class="el" href="virtio_source.html#l00273">L4virtio::Svr::Virtqueue::disable_notify()</a>, <a class="el" href="virtio_source.html#l00284">L4virtio::Svr::Virtqueue::enable_notify()</a>, <a class="el" href="virtio_source.html#l00430">L4virtio::Svr::Bad_descriptor::message()</a>, <a class="el" href="l4re-snapshot-25_808_80_2src_2l4_2pkg_2virtio-net-switch_2server_2switch_2virtio__net_8h_source.html#l00307">Virtio_net::rx_q()</a>, <a class="el" href="l4re-snapshot-25_808_80_2src_2l4_2pkg_2virtio-net-switch_2server_2switch_2virtio__net_8h_source.html#l00305">Virtio_net::tx_q()</a>, and <a class="el" href="port__l4virtio_8h_source.html#l00087">L4virtio_port::tx_work_pending()</a>.</p>
<div id="dynsection-2" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"><span class="dynarrow"><span class="arrowhead closed"></span></span>Here is the call graph for this function:</div>
<div id="dynsection-2-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-2-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" loading="lazy" frameborder="0" src="classVirtio__switch_ac5cfe25b7791bdb18d48985631913447_cgraph.svg" width="607" height="408"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</div>
<a id="ad1209814056da7ca22b592c176f0773f" name="ad1209814056da7ca22b592c176f0773f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1209814056da7ca22b592c176f0773f">&#9670;&#160;</a></span>port_available()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int Virtio_switch::port_available </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>monitor</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Is there still a free port on this switch available? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">monitor</td><td>True if we look for a monitor slot.</td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">&gt;=0</td><td>The next available port index. </td></tr>
<tr><td class="paramname">-1</td><td>No port available. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="switch_8h_source.html#l00148">148</a> of file <a class="el" href="switch_8h_source.html">switch.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>pkg/virtio-net-switch/server/switch/<a class="el" href="switch_8h_source.html">switch.h</a></li>
<li>pkg/virtio-net-switch/server/switch/<a class="el" href="switch_8cc_source.html">switch.cc</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- HTML footer for doxygen 1.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a href="classVirtio__switch.html">Virtio_switch</a></li>
<li class="footer">Generated on <span class="timestamp"></span> for L4Re Operating System Framework by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 </li>
</ul>
</div>
</body>
</html>