€•Ð�Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ4/translations/zh_CN/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/zh_TW/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/it_IT/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ja_JP/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ko_KR/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/pt_BR/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/sp_SP/networking/devlink/devlink-dpipe”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒN/var/lib/git/docbuild/linux/Documentation/networking/devlink/devlink-dpipe.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ Devlink DPIPE”h]”hŒ Devlink DPIPE”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Background”h]”hŒ Background”…”�”}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒòWhile performing the hardware offloading process, much of the hardware specifics cannot be presented. These details are useful for debugging, and ``devlink-dpipe`` provides a standardized way to provide visibility into the offloading process.”h]”(hŒ’While performing the hardware offloading process, much of the hardware specifics cannot be presented. These details are useful for debugging, and ”…”�”}”(hhðh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``devlink-dpipe``”h]”hŒ devlink-dpipe”…”�”}”(hhúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhhðubhŒO provides a standardized way to provide visibility into the offloading process.”…”�”}”(hhðh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)�”}”(hŒ÷For example, the routing longest prefix match (LPM) algorithm used by the Linux kernel may differ from the hardware implementation. The pipeline debug API (DPIPE) is aimed at providing the user visibility into the ASIC's pipeline in a generic way.”h]”hŒùFor example, the routing longest prefix match (LPM) algorithm used by the Linux kernel may differ from the hardware implementation. The pipeline debug API (DPIPE) is aimed at providing the user visibility into the ASIC’s pipeline in a generic way.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)�”}”(hX/The hardware offload process is expected to be done in a way that the user should not be able to distinguish between the hardware vs. software implementation. In this process, hardware specifics are neglected. In reality those details can have lots of meaning and should be exposed in some standard way.”h]”hX/The hardware offload process is expected to be done in a way that the user should not be able to distinguish between the hardware vs. software implementation. In this process, hardware specifics are neglected. In reality those details can have lots of meaning and should be exposed in some standard way.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)�”}”(hŒéThis problem is made even more complex when one wishes to offload the control path of the whole networking stack to a switch ASIC. Due to differences in the hardware and software models some processes cannot be represented correctly.”h]”hŒéThis problem is made even more complex when one wishes to offload the control path of the whole networking stack to a switch ASIC. Due to differences in the hardware and software models some processes cannot be represented correctly.”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)�”}”(hXOne example is the kernel's LPM algorithm which in many cases differs greatly to the hardware implementation. The configuration API is the same, but one cannot rely on the Forward Information Base (FIB) to look like the Level Path Compression trie (LPC-trie) in hardware.”h]”hXOne example is the kernel’s LPM algorithm which in many cases differs greatly to the hardware implementation. The configuration API is the same, but one cannot rely on the Forward Information Base (FIB) to look like the Level Path Compression trie (LPC-trie) in hardware.”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)�”}”(hX0In many situations trying to analyze systems failure solely based on the kernel's dump may not be enough. By combining this data with complementary information about the underlying hardware, this debugging can be made easier; additionally, the information can be useful when debugging performance issues.”h]”hX2In many situations trying to analyze systems failure solely based on the kernel’s dump may not be enough. By combining this data with complementary information about the underlying hardware, this debugging can be made easier; additionally, the information can be useful when debugging performance issues.”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K$hhÝh²hubeh}”(h]”Œ background”ah ]”h"]”Œ background”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒOverview”h]”hŒOverview”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj`h²hh³hÇh´K+ubhï)�”}”(hŒãThe ``devlink-dpipe`` interface closes this gap. The hardware's pipeline is modeled as a graph of match/action tables. Each table represents a specific hardware block. This model is not new, first being used by the P4 language.”h]”(hŒThe ”…”�”}”(hjqh²hh³Nh´Nubhù)�”}”(hŒ``devlink-dpipe``”h]”hŒ devlink-dpipe”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjqubhŒÐ interface closes this gap. The hardware’s pipeline is modeled as a graph of match/action tables. Each table represents a specific hardware block. This model is not new, first being used by the P4 language.”…”�”}”(hjqh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K-hj`h²hubhï)�”}”(hX2Traditionally it has been used as an alternative model for hardware configuration, but the ``devlink-dpipe`` interface uses it for visibility purposes as a standard complementary tool. The system's view from ``devlink-dpipe`` should change according to the changes done by the standard configuration tools.”h]”(hŒ[Traditionally it has been used as an alternative model for hardware configuration, but the ”…”�”}”(hj‘h²hh³Nh´Nubhù)�”}”(hŒ``devlink-dpipe``”h]”hŒ devlink-dpipe”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj‘ubhŒf interface uses it for visibility purposes as a standard complementary tool. The system’s view from ”…”�”}”(hj‘h²hh³Nh´Nubhù)�”}”(hŒ``devlink-dpipe``”h]”hŒ devlink-dpipe”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj‘ubhŒQ should change according to the changes done by the standard configuration tools.”…”�”}”(hj‘h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K1hj`h²hubhï)�”}”(hXGFor example, it’s quite common to implement Access Control Lists (ACL) using Ternary Content Addressable Memory (TCAM). The TCAM memory can be divided into TCAM regions. Complex TC filters can have multiple rules with different priorities and different lookup keys. On the other hand hardware TCAM regions have a predefined lookup key. Offloading the TC filter rules using TCAM engine can result in multiple TCAM regions being interconnected in a chain (which may affect the data path latency). In response to a new TC filter new tables should be created describing those regions.”h]”hXGFor example, it’s quite common to implement Access Control Lists (ACL) using Ternary Content Addressable Memory (TCAM). The TCAM memory can be divided into TCAM regions. Complex TC filters can have multiple rules with different priorities and different lookup keys. On the other hand hardware TCAM regions have a predefined lookup key. Offloading the TC filter rules using TCAM engine can result in multiple TCAM regions being interconnected in a chain (which may affect the data path latency). In response to a new TC filter new tables should be created describing those regions.”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K7hj`h²hubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K+ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒModel”h]”hŒModel”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÙh²hh³hÇh´KAubhï)�”}”(hŒ/The ``DPIPE`` model introduces several objects:”h]”(hŒThe ”…”�”}”(hjêh²hh³Nh´Nubhù)�”}”(hŒ ``DPIPE``”h]”hŒDPIPE”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjêubhŒ" model introduces several objects:”…”�”}”(hjêh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KChjÙh²hubhŒ block_quote”“”)�”}”(hŒ* headers * tables * entries ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒheaders”h]”hï)�”}”(hjh]”hŒheaders”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KEhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒtables”h]”hï)�”}”(hj0h]”hŒtables”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KFhj.ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒentries ”h]”hï)�”}”(hŒentries”h]”hŒentries”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KGhjEubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jh³hÇh´KEhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KEhjÙh²hubhï)�”}”(hŒ¼A ``header`` describes packet formats and provides names for fields within the packet. A ``table`` describes hardware blocks. An ``entry`` describes the actual content of a specific table.”h]”(hŒA ”…”�”}”(hjkh²hh³Nh´Nubhù)�”}”(hŒ ``header``”h]”hŒheader”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjkubhŒM describes packet formats and provides names for fields within the packet. A ”…”�”}”(hjkh²hh³Nh´Nubhù)�”}”(hŒ ``table``”h]”hŒtable”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjkubhŒ describes hardware blocks. An ”…”�”}”(hjkh²hh³Nh´Nubhù)�”}”(hŒ ``entry``”h]”hŒentry”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjkubhŒ2 describes the actual content of a specific table.”…”�”}”(hjkh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KIhjÙh²hubhï)�”}”(hŒŽThe hardware pipeline is not port specific, but rather describes the whole ASIC. Thus it is tied to the top of the ``devlink`` infrastructure.”h]”(hŒsThe hardware pipeline is not port specific, but rather describes the whole ASIC. Thus it is tied to the top of the ”…”�”}”(hj¯h²hh³Nh´Nubhù)�”}”(hŒ ``devlink``”h]”hŒdevlink”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj¯ubhŒ infrastructure.”…”�”}”(hj¯h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KMhjÙh²hubhï)�”}”(hŒßDrivers can register and unregister tables at run time, in order to support dynamic behavior. This dynamic behavior is mandatory for describing hardware blocks like TCAM regions which can be allocated and freed dynamically.”h]”hŒßDrivers can register and unregister tables at run time, in order to support dynamic behavior. This dynamic behavior is mandatory for describing hardware blocks like TCAM regions which can be allocated and freed dynamically.”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KPhjÙh²hubhï)�”}”(hŒw``devlink-dpipe`` generally is not intended for configuration. The exception is hardware counting for a specific table.”h]”(hù)�”}”(hŒ``devlink-dpipe``”h]”hŒ devlink-dpipe”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjÝubhŒf generally is not intended for configuration. The exception is hardware counting for a specific table.”…”�”}”(hjÝh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KThjÙh²hubhï)�”}”(hŒOThe following commands are used to obtain the ``dpipe`` objects from userspace:”h]”(hŒ.The following commands are used to obtain the ”…”�”}”(hjùh²hh³Nh´Nubhù)�”}”(hŒ ``dpipe``”h]”hŒdpipe”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjùubhŒ objects from userspace:”…”�”}”(hjùh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KWhjÙh²hubj )�”}”(hŒÚ* ``table_get``: Receive a table's description. * ``headers_get``: Receive a device's supported headers. * ``entries_get``: Receive a table's current entries. * ``counters_set``: Enable or disable counters on a table. ”h]”j)�”}”(hhh]”(j)�”}”(hŒ-``table_get``: Receive a table's description.”h]”hï)�”}”(hj"h]”(hù)�”}”(hŒ ``table_get``”h]”hŒ table_get”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj$ubhŒ": Receive a table’s description.”…”�”}”(hj$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KZhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ6``headers_get``: Receive a device's supported headers.”h]”hï)�”}”(hjGh]”(hù)�”}”(hŒ``headers_get``”h]”hŒ headers_get”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjIubhŒ): Receive a device’s supported headers.”…”�”}”(hjIh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K[hjEubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ3``entries_get``: Receive a table's current entries.”h]”hï)�”}”(hjlh]”(hù)�”}”(hŒ``entries_get``”h]”hŒ entries_get”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjnubhŒ&: Receive a table’s current entries.”…”�”}”(hjnh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K\hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ9``counters_set``: Enable or disable counters on a table. ”h]”hï)�”}”(hŒ8``counters_set``: Enable or disable counters on a table.”h]”(hù)�”}”(hŒ``counters_set``”h]”hŒ counters_set”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj“ubhŒ(: Enable or disable counters on a table.”…”�”}”(hj“h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K]hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”jcjduh1jh³hÇh´KZhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KZhjÙh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒTable”h]”hŒTable”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÁh²hh³hÇh´K`ubhï)�”}”(hŒDThe driver should implement the following operations for each table:”h]”hŒDThe driver should implement the following operations for each table:”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KbhjÁh²hubj )�”}”(hŒï* ``matches_dump``: Dump the supported matches. * ``actions_dump``: Dump the supported actions. * ``entries_dump``: Dump the actual content of the table. * ``counters_set_update``: Synchronize hardware with counters enabled or disabled. ”h]”j)�”}”(hhh]”(j)�”}”(hŒ-``matches_dump``: Dump the supported matches.”h]”hï)�”}”(hjéh]”(hù)�”}”(hŒ``matches_dump``”h]”hŒ matches_dump”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjëubhŒ: Dump the supported matches.”…”�”}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kdhjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjäubj)�”}”(hŒ-``actions_dump``: Dump the supported actions.”h]”hï)�”}”(hjh]”(hù)�”}”(hŒ``actions_dump``”h]”hŒ actions_dump”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjubhŒ: Dump the supported actions.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kehj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjäubj)�”}”(hŒ7``entries_dump``: Dump the actual content of the table.”h]”hï)�”}”(hj3h]”(hù)�”}”(hŒ``entries_dump``”h]”hŒ entries_dump”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj5ubhŒ': Dump the actual content of the table.”…”�”}”(hj5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kfhj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjäubj)�”}”(hŒQ``counters_set_update``: Synchronize hardware with counters enabled or disabled. ”h]”hï)�”}”(hŒP``counters_set_update``: Synchronize hardware with counters enabled or disabled.”h]”(hù)�”}”(hŒ``counters_set_update``”h]”hŒcounters_set_update”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjZubhŒ9: Synchronize hardware with counters enabled or disabled.”…”�”}”(hjZh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KghjVubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjäubeh}”(h]”h ]”h"]”h$]”h&]”jcjduh1jh³hÇh´Kdhjàubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KdhjÁh²hubeh}”(h]”Œtable”ah ]”h"]”Œtable”ah$]”h&]”uh1hÈhjÙh²hh³hÇh´K`ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Header/Field”h]”hŒ Header/Field”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj�h²hh³hÇh´Kkubhï)�”}”(hXIn a similar way to P4 headers and fields are used to describe a table's behavior. There is a slight difference between the standard protocol headers and specific ASIC metadata. The protocol headers should be declared in the ``devlink`` core API. On the other hand ASIC meta data is driver specific and should be defined in the driver. Additionally, each driver-specific devlink documentation file should document the driver-specific ``dpipe`` headers it implements. The headers and fields are identified by enumeration.”h]”(hŒãIn a similar way to P4 headers and fields are used to describe a table’s behavior. There is a slight difference between the standard protocol headers and specific ASIC metadata. The protocol headers should be declared in the ”…”�”}”(hj¡h²hh³Nh´Nubhù)�”}”(hŒ ``devlink``”h]”hŒdevlink”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj¡ubhŒÆ core API. On the other hand ASIC meta data is driver specific and should be defined in the driver. Additionally, each driver-specific devlink documentation file should document the driver-specific ”…”�”}”(hj¡h²hh³Nh´Nubhù)�”}”(hŒ ``dpipe``”h]”hŒdpipe”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj¡ubhŒM headers it implements. The headers and fields are identified by enumeration.”…”�”}”(hj¡h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kmhj�h²hubhï)�”}”(hXEIn order to provide further visibility some ASIC metadata fields could be mapped to kernel objects. For example, internal router interface indexes can be directly mapped to the net device ifindex. FIB table indexes used by different Virtual Routing and Forwarding (VRF) tables can be mapped to internal routing table indexes.”h]”hXEIn order to provide further visibility some ASIC metadata fields could be mapped to kernel objects. For example, internal router interface indexes can be directly mapped to the net device ifindex. FIB table indexes used by different Virtual Routing and Forwarding (VRF) tables can be mapped to internal routing table indexes.”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kuhj�h²hubeh}”(h]”Œ header-field”ah ]”h"]”Œ header/field”ah$]”h&]”uh1hÈhjÙh²hh³hÇh´KkubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒMatch”h]”hŒMatch”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjéh²hh³hÇh´K|ubhï)�”}”(hŒÉMatches are kept primitive and close to hardware operation. Match types like LPM are not supported due to the fact that this is exactly a process we wish to describe in full detail. Example of matches:”h]”hŒÉMatches are kept primitive and close to hardware operation. Match types like LPM are not supported due to the fact that this is exactly a process we wish to describe in full detail. Example of matches:”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K~hjéh²hubj )�”}”(hŒ©* ``field_exact``: Exact match on a specific field. * ``field_exact_mask``: Exact match on a specific field after masking. * ``field_range``: Match on a specific range. ”h]”j)�”}”(hhh]”(j)�”}”(hŒ1``field_exact``: Exact match on a specific field.”h]”hï)�”}”(hjh]”(hù)�”}”(hŒ``field_exact``”h]”hŒ field_exact”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjubhŒ": Exact match on a specific field.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒD``field_exact_mask``: Exact match on a specific field after masking.”h]”hï)�”}”(hj6h]”(hù)�”}”(hŒ``field_exact_mask``”h]”hŒfield_exact_mask”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj8ubhŒ0: Exact match on a specific field after masking.”…”�”}”(hj8h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kƒhj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hŒ,``field_range``: Match on a specific range. ”h]”hï)�”}”(hŒ+``field_range``: Match on a specific range.”h]”(hù)�”}”(hŒ``field_range``”h]”hŒ field_range”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj]ubhŒ: Match on a specific range.”…”�”}”(hj]h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K„hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubeh}”(h]”h ]”h"]”h$]”h&]”jcjduh1jh³hÇh´K‚hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K‚hjéh²hubhï)�”}”(hŒæThe id's of the header and the field should be specified in order to identify the specific field. Furthermore, the header index should be specified in order to distinguish multiple headers of the same type in a packet (tunneling).”h]”hŒèThe id’s of the header and the field should be specified in order to identify the specific field. Furthermore, the header index should be specified in order to distinguish multiple headers of the same type in a packet (tunneling).”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K†hjéh²hubeh}”(h]”Œmatch”ah ]”h"]”Œmatch”ah$]”h&]”uh1hÈhjÙh²hh³hÇh´K|ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒAction”h]”hŒAction”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¡h²hh³hÇh´KŒubhï)�”}”(hŒ^Similar to match, the actions are kept primitive and close to hardware operation. For example:”h]”hŒ^Similar to match, the actions are kept primitive and close to hardware operation. For example:”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŽhj¡h²hubj )�”}”(hŒœ* ``field_modify``: Modify the field value. * ``field_inc``: Increment the field value. * ``push_header``: Add a header. * ``pop_header``: Remove a header. ”h]”j)�”}”(hhh]”(j)�”}”(hŒ)``field_modify``: Modify the field value.”h]”hï)�”}”(hjÉh]”(hù)�”}”(hŒ``field_modify``”h]”hŒ field_modify”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjËubhŒ: Modify the field value.”…”�”}”(hjËh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‘hjÇubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÄubj)�”}”(hŒ)``field_inc``: Increment the field value.”h]”hï)�”}”(hjîh]”(hù)�”}”(hŒ ``field_inc``”h]”hŒ field_inc”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjðubhŒ: Increment the field value.”…”�”}”(hjðh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K’hjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÄubj)�”}”(hŒ``push_header``: Add a header.”h]”hï)�”}”(hjh]”(hù)�”}”(hŒ``push_header``”h]”hŒ push_header”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjubhŒ: Add a header.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K“hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÄubj)�”}”(hŒ!``pop_header``: Remove a header. ”h]”hï)�”}”(hŒ ``pop_header``: Remove a header.”h]”(hù)�”}”(hŒ``pop_header``”h]”hŒ pop_header”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj:ubhŒ: Remove a header.”…”�”}”(hj:h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K”hj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÄubeh}”(h]”h ]”h"]”h$]”h&]”jcjduh1jh³hÇh´K‘hjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K‘hj¡h²hubeh}”(h]”Œaction”ah ]”h"]”Œaction”ah$]”h&]”uh1hÈhjÙh²hh³hÇh´KŒubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒEntry”h]”hŒEntry”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjph²hh³hÇh´K—ubhï)�”}”(hXEntries of a specific table can be dumped on demand. Each eentry is identified with an index and its properties are described by a list of match/action values and specific counter. By dumping the tables content the interactions between tables can be resolved.”h]”hXEntries of a specific table can be dumped on demand. Each eentry is identified with an index and its properties are described by a list of match/action values and specific counter. By dumping the tables content the interactions between tables can be resolved.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K™hjph²hubeh}”(h]”Œentry”ah ]”h"]”Œentry”ah$]”h&]”uh1hÈhjÙh²hh³hÇh´K—ubeh}”(h]”Œmodel”ah ]”h"]”Œmodel”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KAubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒAbstraction Example”h]”hŒAbstraction Example”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŸh²hh³hÇh´KŸubhï)�”}”(hXThe following is an example of the abstraction model of the L3 part of Mellanox Spectrum ASIC. The blocks are described in the order they appear in the pipeline. The table sizes in the following examples are not real hardware sizes and are provided for demonstration purposes.”h]”hXThe following is an example of the abstraction model of the L3 part of Mellanox Spectrum ASIC. The blocks are described in the order they appear in the pipeline. The table sizes in the following examples are not real hardware sizes and are provided for demonstration purposes.”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¡hjŸh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒLPM”h]”hŒLPM”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¾h²hh³hÇh´K§ubhï)�”}”(hXThe LPM algorithm can be implemented as a list of hash tables. Each hash table contains routes with the same prefix length. The root of the list is /32, and in case of a miss the hardware will continue to the next hash table. The depth of the search will affect the data path latency.”h]”hXThe LPM algorithm can be implemented as a list of hash tables. Each hash table contains routes with the same prefix length. The root of the list is /32, and in case of a miss the hardware will continue to the next hash table. The depth of the search will affect the data path latency.”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K©hj¾h²hubhï)�”}”(hX$In case of a hit the entry contains information about the next stage of the pipeline which resolves the MAC address. The next stage can be either local host table for directly connected routes, or adjacency table for next-hops. The ``meta.lpm_prefix`` field is used to connect two LPM tables.”h]”(hŒèIn case of a hit the entry contains information about the next stage of the pipeline which resolves the MAC address. The next stage can be either local host table for directly connected routes, or adjacency table for next-hops. The ”…”�”}”(hjÝh²hh³Nh´Nubhù)�”}”(hŒ``meta.lpm_prefix``”h]”hŒmeta.lpm_prefix”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1høhjÝubhŒ) field is used to connect two LPM tables.”…”�”}”(hjÝh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K®hj¾h²hubhŒ literal_block”“”)�”}”(hXYtable lpm_prefix_16 { size: 4096, counters_enabled: true, match: { meta.vr_id: exact, ipv4.dst_addr: exact_mask, ipv6.dst_addr: exact_mask, meta.lpm_prefix: exact }, action: { meta.adj_index: set, meta.adj_group_size: set, meta.rif_port: set, meta.lpm_prefix: set }, }”h]”hXYtable lpm_prefix_16 { size: 4096, counters_enabled: true, match: { meta.vr_id: exact, ipv4.dst_addr: exact_mask, ipv6.dst_addr: exact_mask, meta.lpm_prefix: exact }, action: { meta.adj_index: set, meta.adj_group_size: set, meta.rif_port: set, meta.lpm_prefix: set }, }”…”�”}”hjÿsbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”hÅhÆŒlanguage”Œnone”uh1jýh³hÇh´K³hj¾h²hubeh}”(h]”Œlpm”ah ]”h"]”Œlpm”ah$]”h&]”uh1hÈhjŸh²hh³hÇh´K§ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Local Host”h]”hŒ Local Host”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KÃubhï)�”}”(hXIn the case of local routes the LPM lookup already resolves the egress router interface (RIF), yet the exact MAC address is not known. The local host table is a hash table combining the output interface id with destination IP address as a key. The result is the MAC address.”h]”hXIn the case of local routes the LPM lookup already resolves the egress router interface (RIF), yet the exact MAC address is not known. The local host table is a hash table combining the output interface id with destination IP address as a key. The result is the MAC address.”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÅhjh²hubjþ)�”}”(hŒ¡table local_host { size: 4096, counters_enabled: true, match: { meta.rif_port: exact, ipv4.dst_addr: exact}, action: { ethernet.daddr: set } }”h]”hŒ¡table local_host { size: 4096, counters_enabled: true, match: { meta.rif_port: exact, ipv4.dst_addr: exact}, action: { ethernet.daddr: set } }”…”�”}”hj9sbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”hÅhÆjjuh1jýh³hÇh´KÊhjh²hubeh}”(h]”Œ local-host”ah ]”h"]”Œ local host”ah$]”h&]”uh1hÈhjŸh²hh³hÇh´KÃubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Adjacency”h]”hŒ Adjacency”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjRh²hh³hÇh´KÕubhï)�”}”(hXRIn case of remote routes this table does the ECMP. The LPM lookup results in ECMP group size and index that serves as a global offset into this table. Concurrently a hash of the packet is generated. Based on the ECMP group size and the packet's hash a local offset is generated. Multiple LPM entries can point to the same adjacency group.”h]”hXTIn case of remote routes this table does the ECMP. The LPM lookup results in ECMP group size and index that serves as a global offset into this table. Concurrently a hash of the packet is generated. Based on the ECMP group size and the packet’s hash a local offset is generated. Multiple LPM entries can point to the same adjacency group.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K×hjRh²hubjþ)�”}”(hŒîtable adjacency { size: 4096, counters_enabled: true, match: { meta.adj_index: exact, meta.adj_group_size: exact, meta.packet_hash_index: exact }, action: { ethernet.daddr: set, meta.erif: set } }”h]”hŒîtable adjacency { size: 4096, counters_enabled: true, match: { meta.adj_index: exact, meta.adj_group_size: exact, meta.packet_hash_index: exact }, action: { ethernet.daddr: set, meta.erif: set } }”…”�”}”hjqsbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”hÅhÆjjuh1jýh³hÇh´KÝhjRh²hubeh}”(h]”Œ adjacency”ah ]”h"]”Œ adjacency”ah$]”h&]”uh1hÈhjŸh²hh³hÇh´KÕubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒERIF”h]”hŒERIF”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŠh²hh³hÇh´Kêubhï)�”}”(hX#In case the egress RIF and destination MAC have been resolved by previous tables this table does multiple operations like TTL decrease and MTU check. Then the decision of forward/drop is taken and the port L3 statistics are updated based on the packet's type (broadcast, unicast, multicast).”h]”hX%In case the egress RIF and destination MAC have been resolved by previous tables this table does multiple operations like TTL decrease and MTU check. Then the decision of forward/drop is taken and the port L3 statistics are updated based on the packet’s type (broadcast, unicast, multicast).”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KìhjŠh²hubjþ)�”}”(hXtable erif { size: 800, counters_enabled: true, match: { meta.rif_port: exact, meta.is_l3_unicast: exact, meta.is_l3_broadcast: exact, meta.is_l3_multicast, exact }, action: { meta.l3_drop: set, meta.l3_forward: set } }”h]”hXtable erif { size: 800, counters_enabled: true, match: { meta.rif_port: exact, meta.is_l3_unicast: exact, meta.is_l3_broadcast: exact, meta.is_l3_multicast, exact }, action: { meta.l3_drop: set, meta.l3_forward: set } }”…”�”}”hj©sbah}”(h]”h ]”h"]”h$]”h&]”Œforce”‰Œhighlight_args”}”hÅhÆjjuh1jýh³hÇh´KñhjŠh²hubeh}”(h]”Œerif”ah ]”h"]”Œerif”ah$]”h&]”uh1hÈhjŸh²hh³hÇh´Kêubeh}”(h]”Œabstraction-example”ah ]”h"]”Œabstraction example”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KŸubeh}”(h]”Œ devlink-dpipe”ah ]”h"]”Œ devlink dpipe”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jõŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÏjÌj]jZjÖjÓjœj™j�jŠjæjãjžj›jmjjj”j‘jÇjÄjjjOjLj‡j„j¿j¼uŒ nametypes”}”(jωj]‰jÖ‰jœ‰j�‰jæ‰jž‰jm‰j”‰jljj‰jO‰j‡‰j¿‰uh}”(jÌhÊjZhÝjÓj`j™jÙjŠjÁjãj�j›jéjjj¡j‘jpjÄjŸjj¾jLjj„jRj¼jŠuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.