^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Devlink DPIPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Background
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) While performing the hardware offloading process, much of the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) specifics cannot be presented. These details are useful for debugging, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) ``devlink-dpipe`` provides a standardized way to provide visibility into the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) offloading process.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) For example, the routing longest prefix match (LPM) algorithm used by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Linux kernel may differ from the hardware implementation. The pipeline debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) API (DPIPE) is aimed at providing the user visibility into the ASIC's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) pipeline in a generic way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) The hardware offload process is expected to be done in a way that the user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) should not be able to distinguish between the hardware vs. software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) implementation. In this process, hardware specifics are neglected. In
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) reality those details can have lots of meaning and should be exposed in some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) standard way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) This problem is made even more complex when one wishes to offload the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) control path of the whole networking stack to a switch ASIC. Due to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) differences in the hardware and software models some processes cannot be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) represented correctly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) One example is the kernel's LPM algorithm which in many cases differs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) greatly to the hardware implementation. The configuration API is the same,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) but one cannot rely on the Forward Information Base (FIB) to look like the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) Level Path Compression trie (LPC-trie) in hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) In many situations trying to analyze systems failure solely based on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) kernel's dump may not be enough. By combining this data with complementary
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) information about the underlying hardware, this debugging can be made
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) easier; additionally, the information can be useful when debugging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) performance issues.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) Overview
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) The ``devlink-dpipe`` interface closes this gap. The hardware's pipeline is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) modeled as a graph of match/action tables. Each table represents a specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) hardware block. This model is not new, first being used by the P4 language.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Traditionally it has been used as an alternative model for hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) configuration, but the ``devlink-dpipe`` interface uses it for visibility
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) purposes as a standard complementary tool. The system's view from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) ``devlink-dpipe`` should change according to the changes done by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) standard configuration tools.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) For example, it’s quiet common to implement Access Control Lists (ACL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) using Ternary Content Addressable Memory (TCAM). The TCAM memory can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) divided into TCAM regions. Complex TC filters can have multiple rules with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) different priorities and different lookup keys. On the other hand hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) TCAM regions have a predefined lookup key. Offloading the TC filter rules
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) using TCAM engine can result in multiple TCAM regions being interconnected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) in a chain (which may affect the data path latency). In response to a new TC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) filter new tables should be created describing those regions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) Model
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) =====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) The ``DPIPE`` model introduces several objects:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) * headers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) * tables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) * entries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) A ``header`` describes packet formats and provides names for fields within
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) the packet. A ``table`` describes hardware blocks. An ``entry`` describes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) the actual content of a specific table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) The hardware pipeline is not port specific, but rather describes the whole
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) ASIC. Thus it is tied to the top of the ``devlink`` infrastructure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) Drivers can register and unregister tables at run time, in order to support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) dynamic behavior. This dynamic behavior is mandatory for describing hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) blocks like TCAM regions which can be allocated and freed dynamically.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) ``devlink-dpipe`` generally is not intended for configuration. The exception
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) is hardware counting for a specific table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) The following commands are used to obtain the ``dpipe`` objects from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) userspace:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) * ``table_get``: Receive a table's description.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) * ``headers_get``: Receive a device's supported headers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) * ``entries_get``: Receive a table's current entries.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) * ``counters_set``: Enable or disable counters on a table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) Table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) -----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) The driver should implement the following operations for each table:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) * ``matches_dump``: Dump the supported matches.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) * ``actions_dump``: Dump the supported actions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) * ``entries_dump``: Dump the actual content of the table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) * ``counters_set_update``: Synchronize hardware with counters enabled or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) Header/Field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) In a similar way to P4 headers and fields are used to describe a table's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) behavior. There is a slight difference between the standard protocol headers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) and specific ASIC metadata. The protocol headers should be declared in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) ``devlink`` core API. On the other hand ASIC meta data is driver specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) and should be defined in the driver. Additionally, each driver-specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) devlink documentation file should document the driver-specific ``dpipe``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) headers it implements. The headers and fields are identified by enumeration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) In order to provide further visibility some ASIC metadata fields could be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) mapped to kernel objects. For example, internal router interface indexes can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) be directly mapped to the net device ifindex. FIB table indexes used by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) different Virtual Routing and Forwarding (VRF) tables can be mapped to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) internal routing table indexes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) Match
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) -----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Matches are kept primitive and close to hardware operation. Match types like
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) LPM are not supported due to the fact that this is exactly a process we wish
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) to describe in full detail. Example of matches:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) * ``field_exact``: Exact match on a specific field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) * ``field_exact_mask``: Exact match on a specific field after masking.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) * ``field_range``: Match on a specific range.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) The id's of the header and the field should be specified in order to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) identify the specific field. Furthermore, the header index should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) specified in order to distinguish multiple headers of the same type in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) packet (tunneling).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) Action
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) Similar to match, the actions are kept primitive and close to hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) operation. For example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * ``field_modify``: Modify the field value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) * ``field_inc``: Increment the field value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * ``push_header``: Add a header.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) * ``pop_header``: Remove a header.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Entry
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) -----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) Entries of a specific table can be dumped on demand. Each eentry is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) identified with an index and its properties are described by a list of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) match/action values and specific counter. By dumping the tables content the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) interactions between tables can be resolved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) Abstraction Example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) ===================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) The following is an example of the abstraction model of the L3 part of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) Mellanox Spectrum ASIC. The blocks are described in the order they appear in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) the pipeline. The table sizes in the following examples are not real
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) hardware sizes and are provided for demonstration purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) LPM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) The LPM algorithm can be implemented as a list of hash tables. Each hash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) table contains routes with the same prefix length. The root of the list is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /32, and in case of a miss the hardware will continue to the next hash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) table. The depth of the search will affect the data path latency.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) In case of a hit the entry contains information about the next stage of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) pipeline which resolves the MAC address. The next stage can be either local
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) host table for directly connected routes, or adjacency table for next-hops.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) The ``meta.lpm_prefix`` field is used to connect two LPM tables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) .. code::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) table lpm_prefix_16 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) size: 4096,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) counters_enabled: true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) match: { meta.vr_id: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) ipv4.dst_addr: exact_mask,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) ipv6.dst_addr: exact_mask,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) meta.lpm_prefix: exact },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) action: { meta.adj_index: set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) meta.adj_group_size: set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) meta.rif_port: set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) meta.lpm_prefix: set },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) Local Host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) ----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) In the case of local routes the LPM lookup already resolves the egress
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) router interface (RIF), yet the exact MAC address is not known. The local
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) host table is a hash table combining the output interface id with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) destination IP address as a key. The result is the MAC address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) .. code::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) table local_host {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) size: 4096,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) counters_enabled: true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) match: { meta.rif_port: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) ipv4.dst_addr: exact},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) action: { ethernet.daddr: set }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) Adjacency
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) In case of remote routes this table does the ECMP. The LPM lookup results in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) ECMP group size and index that serves as a global offset into this table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) Concurrently a hash of the packet is generated. Based on the ECMP group size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) and the packet's hash a local offset is generated. Multiple LPM entries can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) point to the same adjacency group.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) .. code::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) table adjacency {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) size: 4096,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) counters_enabled: true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) match: { meta.adj_index: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) meta.adj_group_size: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) meta.packet_hash_index: exact },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) action: { ethernet.daddr: set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) meta.erif: set }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) ERIF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) In case the egress RIF and destination MAC have been resolved by previous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) tables this table does multiple operations like TTL decrease and MTU check.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) Then the decision of forward/drop is taken and the port L3 statistics are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) updated based on the packet's type (broadcast, unicast, multicast).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) .. code::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) table erif {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) size: 800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) counters_enabled: true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) match: { meta.rif_port: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) meta.is_l3_unicast: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) meta.is_l3_broadcast: exact,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) meta.is_l3_multicast, exact },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) action: { meta.l3_drop: set,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) meta.l3_forward: set }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) }