__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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.217.121: ~ $
<!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>mlx5 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="mlxsw devlink support" href="mlxsw.html" />
    <link rel="prev" title="mlx4 devlink support" href="mlx4.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/mlx5.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="mlx5-devlink-support">
<h1>mlx5 devlink support<a class="headerlink" href="#mlx5-devlink-support" title="Link to this heading">¶</a></h1>
<p>This document describes the devlink features implemented by the <code class="docutils literal notranslate"><span class="pre">mlx5</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>
<td><p>Validation</p></td>
<td><p>Notes</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">enable_roce</span></code></p></td>
<td><p>driverinit</p></td>
<td><p>Boolean</p></td>
<td><p>If the device supports RoCE disablement, RoCE enablement state controls
device support for RoCE capability. Otherwise, the control occurs in the
driver stack. When RoCE is disabled at the driver level, only raw
ethernet QPs are supported.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">io_eq_size</span></code></p></td>
<td><p>driverinit</p></td>
<td><p>The range is between 64 and 4096.</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">event_eq_size</span></code></p></td>
<td><p>driverinit</p></td>
<td><p>The range is between 64 and 4096.</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">max_macs</span></code></p></td>
<td><p>driverinit</p></td>
<td><p>The range is between 1 and 2^31. Only power of 2 values are supported.</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">enable_sriov</span></code></p></td>
<td><p>permanent</p></td>
<td><p>Boolean</p></td>
<td><p>Applies to each physical function (PF) independently, if the device
supports it. Otherwise, it applies symmetrically to all PFs.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">total_vfs</span></code></p></td>
<td><p>permanent</p></td>
<td><p>The range is between 1 and a device-specific max.</p></td>
<td><p>Applies to each physical function (PF) independently, if the device
supports it. Otherwise, it applies symmetrically to all PFs.</p></td>
</tr>
</tbody>
</table>
<p>Note: permanent parameters such as <code class="docutils literal notranslate"><span class="pre">enable_sriov</span></code> and <code class="docutils literal notranslate"><span class="pre">total_vfs</span></code> require FW reset to take effect</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># setup parameters</span>
devlink<span class="w"> </span>dev<span class="w"> </span>param<span class="w"> </span><span class="nb">set</span><span class="w"> </span>pci/0000:01:00.0<span class="w"> </span>name<span class="w"> </span>enable_sriov<span class="w"> </span>value<span class="w"> </span><span class="nb">true</span><span class="w"> </span>cmode<span class="w"> </span>permanent
devlink<span class="w"> </span>dev<span class="w"> </span>param<span class="w"> </span><span class="nb">set</span><span class="w"> </span>pci/0000:01:00.0<span class="w"> </span>name<span class="w"> </span>total_vfs<span class="w"> </span>value<span class="w"> </span><span class="m">8</span><span class="w"> </span>cmode<span class="w"> </span>permanent

<span class="c1"># Fw reset</span>
devlink<span class="w"> </span>dev<span class="w"> </span>reload<span class="w"> </span>pci/0000:01:00.0<span class="w"> </span>action<span class="w"> </span>fw_activate

<span class="c1"># for PCI related config such as sriov PCI reset/rescan is required:</span>
<span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;/sys/bus/pci/devices/0000:01:00.0/remove
<span class="nb">echo</span><span class="w"> </span><span class="m">1</span><span class="w"> </span>&gt;/sys/bus/pci/rescan
grep<span class="w"> </span>^<span class="w"> </span>/sys/bus/pci/devices/0000:01:00.0/sriov_*

*<span class="w"> </span>-<span class="w"> </span><span class="sb">``</span>num_doorbells<span class="sb">``</span>
<span class="w">  </span>-<span class="w"> </span>driverinit
<span class="w">  </span>-<span class="w"> </span>This<span class="w"> </span>controls<span class="w"> </span>the<span class="w"> </span>number<span class="w"> </span>of<span class="w"> </span>channel<span class="w"> </span>doorbells<span class="w"> </span>used<span class="w"> </span>by<span class="w"> </span>the<span class="w"> </span>netdev.<span class="w"> </span>In<span class="w"> </span>all
<span class="w">    </span>cases,<span class="w"> </span>an<span class="w"> </span>additional<span class="w"> </span>doorbell<span class="w"> </span>is<span class="w"> </span>allocated<span class="w"> </span>and<span class="w"> </span>used<span class="w"> </span><span class="k">for</span><span class="w"> </span>non-channel
<span class="w">    </span>communication<span class="w"> </span><span class="o">(</span>e.g.<span class="w"> </span><span class="k">for</span><span class="w"> </span>PTP,<span class="w"> </span>HWS,<span class="w"> </span>etc.<span class="o">)</span>.<span class="w"> </span>Supported<span class="w"> </span>values<span class="w"> </span>are:

<span class="w">    </span>-<span class="w"> </span><span class="m">0</span>:<span class="w"> </span>No<span class="w"> </span>channel-specific<span class="w"> </span>doorbells,<span class="w"> </span>use<span class="w"> </span>the<span class="w"> </span>global<span class="w"> </span>one<span class="w"> </span><span class="k">for</span><span class="w"> </span>everything.
<span class="w">    </span>-<span class="w"> </span><span class="o">[</span><span class="m">1</span>,<span class="w"> </span>max_num_channels<span class="o">]</span>:<span class="w"> </span>Spread<span class="w"> </span>netdev<span class="w"> </span>channels<span class="w"> </span>equally<span class="w"> </span>across<span class="w"> </span>these
<span class="w">      </span>doorbells.
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">mlx5</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">flow_steering_mode</span></code></p></td>
<td><p>string</p></td>
<td><p>runtime</p></td>
<td><p>Controls the flow steering mode of the driver</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">dmfs</span></code> Device managed flow steering. In DMFS mode, the HW
steering entities are created and managed through firmware.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">smfs</span></code> Software managed flow steering. In SMFS mode, the HW
steering entities are created and manage through the driver without
firmware intervention.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">hmfs</span></code> Hardware managed flow steering. In HMFS mode, the driver
is configuring steering rules directly to the HW using Work Queues with
a special new type of WQE (Work Queue Element).</p></li>
</ul>
<p>SMFS mode is faster and provides better rule insertion rate compared to
default DMFS mode.</p>
</td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">fdb_large_groups</span></code></p></td>
<td><p>u32</p></td>
<td><p>driverinit</p></td>
<td><p>Control the number of large groups (size &gt; 1) in the FDB table.</p>
<ul class="simple">
<li><p>The default value is 15, and the range is between 1 and 1024.</p></li>
</ul>
</td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">esw_multiport</span></code></p></td>
<td><p>Boolean</p></td>
<td><p>runtime</p></td>
<td><p>Control MultiPort E-Switch shared fdb mode.</p>
<p>An experimental mode where a single E-Switch is used and all the vports
and physical ports on the NIC are connected to it.</p>
<p>An example is to send traffic from a VF that is created on PF0 to an
uplink that is natively associated with the uplink of PF1</p>
<p>Note: Future devices, ConnectX-8 and onward, will eventually have this
as the default to allow forwarding between all NIC ports in a single
E-switch environment and the dual E-switch mode will likely get
deprecated.</p>
<p>Default: disabled</p>
</td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">esw_port_metadata</span></code></p></td>
<td><p>Boolean</p></td>
<td><p>runtime</p></td>
<td><p>When applicable, disabling eswitch metadata can increase packet rate up
to 20% depending on the use case and packet sizes.</p>
<p>Eswitch port metadata state controls whether to internally tag packets
with metadata. Metadata tagging must be enabled for multi-port RoCE,
failover between representors and stacked devices. By default metadata is
enabled on the supported devices in E-switch. Metadata is applicable only
for E-switch in switchdev mode and users may disable it when NONE of the
below use cases will be in use:
1. HCA is in Dual/multi-port RoCE mode.
2. VF/SF representor bonding (Usually used for Live migration)
3. Stacked devices</p>
<p>When metadata is disabled, the above use cases will fail to initialize if
users try to enable them.</p>
<p>Note: Setting this parameter does not take effect immediately. Setting
must happen in legacy mode and eswitch port metadata takes effect after
enabling switchdev mode.</p>
</td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">hairpin_num_queues</span></code></p></td>
<td><p>u32</p></td>
<td><p>driverinit</p></td>
<td><p>We refer to a TC NIC rule that involves forwarding as “hairpin”.
Hairpin queues are mlx5 hardware specific implementation for hardware
forwarding of such packets.</p>
<p>Control the number of hairpin queues.</p>
</td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">hairpin_queue_size</span></code></p></td>
<td><p>u32</p></td>
<td><p>driverinit</p></td>
<td><p>Control the size (in packets) of the hairpin queues.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">pcie_cong_inbound_high</span></code></p></td>
<td><p>u16</p></td>
<td><p>driverinit</p></td>
<td><p>High threshold configuration for PCIe congestion events. The firmware
will send an event once device side inbound PCIe traffic went
above the configured high threshold for a long enough period (at least
200ms).</p>
<p>See pci_bw_inbound_high ethtool stat.</p>
<p>Units are 0.01 %. Accepted values are in range [0, 10000].
pcie_cong_inbound_low &lt; pcie_cong_inbound_high.
Default value: 9000 (Corresponds to 90%).</p>
</td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">pcie_cong_inbound_low</span></code></p></td>
<td><p>u16</p></td>
<td><p>driverinit</p></td>
<td><p>Low threshold configuration for PCIe congestion events. The firmware
will send an event once device side inbound PCIe traffic went
below the configured low threshold, only after having been previously in
a congested state.</p>
<p>See pci_bw_inbound_low ethtool stat.</p>
<p>Units are 0.01 %. Accepted values are in range [0, 10000].
pcie_cong_inbound_low &lt; pcie_cong_inbound_high.
Default value: 7500.</p>
</td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">pcie_cong_outbound_high</span></code></p></td>
<td><p>u16</p></td>
<td><p>driverinit</p></td>
<td><p>High threshold configuration for PCIe congestion events. The firmware
will send an event once device side outbound PCIe traffic went
above the configured high threshold for a long enough period (at least
200ms).</p>
<p>See pci_bw_outbound_high ethtool stat.</p>
<p>Units are 0.01 %. Accepted values are in range [0, 10000].
pcie_cong_outbound_low &lt; pcie_cong_outbound_high.
Default value: 9000 (Corresponds to 90%).</p>
</td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">pcie_cong_outbound_low</span></code></p></td>
<td><p>u16</p></td>
<td><p>driverinit</p></td>
<td><p>Low threshold configuration for PCIe congestion events. The firmware
will send an event once device side outbound PCIe traffic went
below the configured low threshold, only after having been previously in
a congested state.</p>
<p>See pci_bw_outbound_low ethtool stat.</p>
<p>Units are 0.01 %. Accepted values are in range [0, 10000].
pcie_cong_outbound_low &lt; pcie_cong_outbound_high.
Default value: 7500.</p>
</td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">cqe_compress_type</span></code></p></td>
<td><p>string</p></td>
<td><p>permanent</p></td>
<td><p>Configure which mechanism/algorithm should be used by the NIC that will
affect the rate (aggressiveness) of compressed CQEs depending on PCIe bus
conditions and other internal NIC factors. This mode affects all queues
that enable compression.
* <code class="docutils literal notranslate"><span class="pre">balanced</span></code> : Merges fewer CQEs, resulting in a moderate compression ratio but maintaining a balance between bandwidth savings and performance
* <code class="docutils literal notranslate"><span class="pre">aggressive</span></code> : Merges more CQEs into a single entry, achieving a higher compression rate and maximizing performance, particularly under high traffic loads</p></td>
</tr>
</tbody>
</table>
<p>The <code class="docutils literal notranslate"><span class="pre">mlx5</span></code> driver supports reloading via <code class="docutils literal notranslate"><span class="pre">DEVLINK_CMD_RELOAD</span></code></p>
</section>
<section id="info-versions">
<h2>Info versions<a class="headerlink" href="#info-versions" title="Link to this heading">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">mlx5</span></code> driver reports the following versions</p>
<table class="docutils align-default" id="id3">
<caption><span class="caption-text">devlink info versions implemented</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">fw.psid</span></code></p></td>
<td><p>fixed</p></td>
<td><p>Used to represent the board id of the device.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">fw.version</span></code></p></td>
<td><p>stored, running</p></td>
<td><p>Three digit major.minor.subminor firmware version number.</p></td>
</tr>
</tbody>
</table>
</section>
<section id="health-reporters">
<h2>Health reporters<a class="headerlink" href="#health-reporters" title="Link to this heading">¶</a></h2>
<section id="tx-reporter">
<h3>tx reporter<a class="headerlink" href="#tx-reporter" title="Link to this heading">¶</a></h3>
<p>The tx reporter is responsible for reporting and recovering of the following three error scenarios:</p>
<ul class="simple">
<li><dl class="simple">
<dt>tx timeout</dt><dd><p>Report on kernel tx timeout detection.
Recover by searching lost interrupts.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>tx error completion</dt><dd><p>Report on error tx completion.
Recover by flushing the tx queue and reset it.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>tx PTP port timestamping CQ unhealthy</dt><dd><p>Report too many CQEs never delivered on port ts CQ.
Recover by flushing and re-creating all PTP channels.</p>
</dd>
</dl>
</li>
</ul>
<p>tx reporter also support on demand diagnose callback, on which it provides
real time information of its send queues status.</p>
<p>User commands examples:</p>
<ul>
<li><p>Diagnose send queues status:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health diagnose pci/0000:82:00.0 reporter tx
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This command has valid output only when interface is up, otherwise the command has empty output.</p>
</div>
<ul>
<li><p>Show number of tx errors indicated, number of recover flows ended successfully,
is autorecover enabled and graceful period from last recover:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health show pci/0000:82:00.0 reporter tx
</pre></div>
</div>
</li>
</ul>
</section>
<section id="rx-reporter">
<h3>rx reporter<a class="headerlink" href="#rx-reporter" title="Link to this heading">¶</a></h3>
<p>The rx reporter is responsible for reporting and recovering of the following two error scenarios:</p>
<ul class="simple">
<li><dl class="simple">
<dt>rx queues’ initialization (population) timeout</dt><dd><p>Population of rx queues’ descriptors on ring initialization is done
in napi context via triggering an irq. In case of a failure to get
the minimum amount of descriptors, a timeout would occur, and
descriptors could be recovered by polling the EQ (Event Queue).</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>rx completions with errors (reported by HW on interrupt context)</dt><dd><p>Report on rx completion error.
Recover (if needed) by flushing the related queue and reset it.</p>
</dd>
</dl>
</li>
</ul>
<p>rx reporter also supports on demand diagnose callback, on which it
provides real time information of its receive queues’ status.</p>
<ul>
<li><p>Diagnose rx queues’ status and corresponding completion queue:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health diagnose pci/0000:82:00.0 reporter rx
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This command has valid output only when interface is up. Otherwise, the command has empty output.</p>
</div>
<ul>
<li><p>Show number of rx errors indicated, number of recover flows ended successfully,
is autorecover enabled, and graceful period from last recover:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health show pci/0000:82:00.0 reporter rx
</pre></div>
</div>
</li>
</ul>
</section>
<section id="fw-reporter">
<h3>fw reporter<a class="headerlink" href="#fw-reporter" title="Link to this heading">¶</a></h3>
<p>The fw reporter implements <cite>diagnose</cite> and <cite>dump</cite> callbacks.
It follows symptoms of fw error such as fw syndrome by triggering
fw core dump and storing it into the dump buffer.
The fw reporter diagnose command can be triggered any time by the user to check
current fw status.</p>
<p>User commands examples:</p>
<ul>
<li><p>Check fw heath status:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health diagnose pci/0000:82:00.0 reporter fw
</pre></div>
</div>
</li>
<li><p>Read FW core dump if already stored or trigger new one:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health dump show pci/0000:82:00.0 reporter fw
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This command can run only on the PF which has fw tracer ownership,
running it on other PF or any VF will return “Operation not permitted”.</p>
</div>
</section>
<section id="fw-fatal-reporter">
<h3>fw fatal reporter<a class="headerlink" href="#fw-fatal-reporter" title="Link to this heading">¶</a></h3>
<p>The fw fatal reporter implements <cite>dump</cite> and <cite>recover</cite> callbacks.
It follows fatal errors indications by CR-space dump and recover flow.
The CR-space dump uses vsc interface which is valid even if the FW command
interface is not functional, which is the case in most FW fatal errors.
The recover function runs recover flow which reloads the driver and triggers fw
reset if needed.
On firmware error, the health buffer is dumped into the dmesg. The log
level is derived from the error’s severity (given in health buffer).</p>
<p>User commands examples:</p>
<ul>
<li><p>Run fw recover flow manually:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health recover pci/0000:82:00.0 reporter fw_fatal
</pre></div>
</div>
</li>
<li><p>Read FW CR-space dump if already stored or trigger new one:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health dump show pci/0000:82:00.1 reporter fw_fatal
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This command can run only on PF.</p>
</div>
</section>
<section id="vnic-reporter">
<h3>vnic reporter<a class="headerlink" href="#vnic-reporter" title="Link to this heading">¶</a></h3>
<p>The vnic reporter implements only the <cite>diagnose</cite> callback.
It is responsible for querying the vnic diagnostic counters from fw and displaying
them in realtime.</p>
<p>Description of the vnic counters:</p>
<ul class="simple">
<li><dl class="simple">
<dt>total_error_queues</dt><dd><p>number of queues in an error state due to
an async error or errored command.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>send_queue_priority_update_flow</dt><dd><p>number of QP/SQ priority/SL update events.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>cq_overrun</dt><dd><p>number of times CQ entered an error state due to an overflow.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>async_eq_overrun</dt><dd><p>number of times an EQ mapped to async events was overrun.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>comp_eq_overrun</dt><dd><p>number of times an EQ mapped to completion events was
overrun.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>quota_exceeded_command</dt><dd><p>number of commands issued and failed due to quota exceeded.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>invalid_command</dt><dd><p>number of commands issued and failed dues to any reason other than quota
exceeded.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>nic_receive_steering_discard</dt><dd><p>number of packets that completed RX flow
steering but were discarded due to a mismatch in flow table.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>generated_pkt_steering_fail</dt><dd><p>number of packets generated by the VNIC experiencing unexpected steering
failure (at any point in steering flow).</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>handled_pkt_steering_fail</dt><dd><p>number of packets handled by the VNIC experiencing unexpected steering
failure (at any point in steering flow owned by the VNIC, including the FDB
for the eswitch owner).</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>icm_consumption</dt><dd><p>amount of Interconnect Host Memory (ICM) consumed by the vnic in
granularity of 4KB. ICM is host memory allocated by SW upon HCA request
and is used for storing data structures that control HCA operation.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>bar_uar_access</dt><dd><p>number of WRITE or READ access operations to the UAR on the PCIe BAR.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>odp_local_triggered_page_fault</dt><dd><p>number of locally-triggered page-faults due to ODP.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>odp_remote_triggered_page_fault</dt><dd><p>number of remotly-triggered page-faults due to ODP.</p>
</dd>
</dl>
</li>
</ul>
<p>User commands examples:</p>
<ul>
<li><p>Diagnose PF/VF vnic counters:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health diagnose pci/0000:82:00.1 reporter vnic
</pre></div>
</div>
</li>
<li><p>Diagnose representor vnic counters (performed by supplying devlink port of the
representor, which can be obtained via devlink port command):</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ devlink health diagnose pci/0000:82:00.1/65537 reporter vnic
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This command can run over all interfaces such as PF/VF and representor ports.</p>
</div>
</section>
</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/mlx5.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