Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^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) Identifier Locator Addressing (ILA)
^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) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) Identifier-locator addressing (ILA) is a technique used with IPv6 that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) differentiates between location and identity of a network node. Part of an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) address expresses the immutable identity of the node, and another part
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) indicates the location of the node which can be dynamic. Identifier-locator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) addressing can be used to efficiently implement overlay networks for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) network virtualization as well as solutions for use cases in mobility.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) ILA can be thought of as means to implement an overlay network without
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) encapsulation. This is accomplished by performing network address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) translation on destination addresses as a packet traverses a network. To
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) the network, an ILA translated packet appears to be no different than any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) other IPv6 packet. For instance, if the transport protocol is TCP then an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) ILA translated packet looks like just another TCP/IPv6 packet. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) advantage of this is that ILA is transparent to the network so that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) optimizations in the network, such as ECMP, RSS, GRO, GSO, etc., just work.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) The ILA protocol is described in Internet-Draft draft-herbert-intarea-ila.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) ILA terminology
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)   - Identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 		A number that identifies an addressable node in the network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		independent of its location. ILA identifiers are sixty-four
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		bit values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)   - Locator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 		A network prefix that routes to a physical host. Locators
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		provide the topological location of an addressed node. ILA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		locators are sixty-four bit prefixes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)   - ILA mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		A mapping of an ILA identifier to a locator (or to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 		locator and meta data). An ILA domain maintains a database
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		that contains mappings for all destinations in the domain.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)   - SIR address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		An IPv6 address composed of a SIR prefix (upper sixty-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		four bits) and an identifier (lower sixty-four bits).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		SIR addresses are visible to applications and provide a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		means for them to address nodes independent of their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		location.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)   - ILA address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		An IPv6 address composed of a locator (upper sixty-four
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		bits) and an identifier (low order sixty-four bits). ILA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		addresses are never visible to an application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)   - ILA host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		An end host that is capable of performing ILA translations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		on transmit or receive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)   - ILA router
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		A network node that performs ILA translation and forwarding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		of translated packets.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)   - ILA forwarding cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		A type of ILA router that only maintains a working set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		cache of mappings.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)   - ILA node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		A network node capable of performing ILA translations. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 		can be an ILA router, ILA forwarding cache, or ILA host.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) Operation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) There are two fundamental operations with ILA:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)   - Translate a SIR address to an ILA address. This is performed on ingress
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)     to an ILA overlay.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)   - Translate an ILA address to a SIR address. This is performed on egress
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)     from the ILA overlay.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) ILA can be deployed either on end hosts or intermediate devices in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) network; these are provided by "ILA hosts" and "ILA routers" respectively.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) Configuration and datapath for these two points of deployment is somewhat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) different.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) The diagram below illustrates the flow of packets through ILA as well
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) as showing ILA hosts and routers::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)     +--------+                                                +--------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)     | Host A +-+                                         +--->| Host B |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)     |        | |              (2) ILA                   (')   |        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)     +--------+ |            ...addressed....           (   )  +--------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	       V  +---+--+  .  packet      .  +---+--+  (_)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)    (1) SIR     |  | ILA  |----->-------->---->| ILA  |   |   (3) SIR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)     addressed  +->|router|  .              .  |router|->-+    addressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)     packet        +---+--+  .     IPv6     .  +---+--+        packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		   /        .    Network   .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		  /         .              .   +--+-++--------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)     +--------+   /          .              .   |ILA ||  Host  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)     |  Host  +--+           .              .- -|host||        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)     |        |              .              .   +--+-++--------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)     +--------+              ................
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) Transport checksum handling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) ===========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) When an address is translated by ILA, an encapsulated transport checksum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) that includes the translated address in a pseudo header may be rendered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) incorrect on the wire. This is a problem for intermediate devices,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) including checksum offload in NICs, that process the checksum. There are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) three options to deal with this:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) - no action	Allow the checksum to be incorrect on the wire. Before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		a receiver verifies a checksum the ILA to SIR address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		translation must be done.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) - adjust transport checksum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		When ILA translation is performed the packet is parsed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		and if a transport layer checksum is found then it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		adjusted to reflect the correct checksum per the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		translated address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) - checksum neutral mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		When an address is translated the difference can be offset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		elsewhere in a part of the packet that is covered by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		the checksum. The low order sixteen bits of the identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		are used. This method is preferred since it doesn't require
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		parsing a packet beyond the IP header and in most cases the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		adjustment can be precomputed and saved with the mapping.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) Note that the checksum neutral adjustment affects the low order sixteen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) bits of the identifier. When ILA to SIR address translation is done on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) egress the low order bits are restored to the original value which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) restores the identifier as it was originally sent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) Identifier types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) ILA defines different types of identifiers for different use cases.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) The defined types are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)       0: interface identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)       1: locally unique identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)       2: virtual networking identifier for IPv4 address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)       3: virtual networking identifier for IPv6 unicast address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)       4: virtual networking identifier for IPv6 multicast address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)       5: non-local address identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) In the current implementation of kernel ILA only locally unique identifiers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) (LUID) are supported. LUID allows for a generic, unformatted 64 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) identifier.
^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) Identifier formats
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Kernel ILA supports two optional fields in an identifier for formatting:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) "C-bit" and "identifier type". The presence of these fields is determined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) by configuration as demonstrated below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) If the identifier type is present it occupies the three highest order
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) bits of an identifier. The possible values are given in the above list.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) If the C-bit is present,  this is used as an indication that checksum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) neutral mapping has been done. The C-bit can only be set in an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) ILA address, never a SIR address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) In the simplest format the identifier types, C-bit, and checksum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) adjustment value are not present so an identifier is considered an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) unstructured sixty-four bit value::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)      |                            Identifier                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)      +                                                               +
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)      |                                                               |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) The checksum neutral adjustment may be configured to always be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) present using neutral-map-auto. In this case there is no C-bit, but the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) checksum adjustment is in the low order 16 bits. The identifier is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) still sixty-four bits::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)      |                            Identifier                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)      |                               |  Checksum-neutral adjustment  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) The C-bit may used to explicitly indicate that checksum neutral
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) mapping has been applied to an ILA address. The format is::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)      |     |C|                    Identifier                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)      |     +-+                       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)      |                               |  Checksum-neutral adjustment  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) The identifier type field may be present to indicate the identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) type. If it is not present then the type is inferred based on mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) configuration. The checksum neutral adjustment may automatically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) used with the identifier type as illustrated below::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)      | Type|                      Identifier                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)      +-+-+-+                         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)      |                               |  Checksum-neutral adjustment  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) If the identifier type and the C-bit can be present simultaneously so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) the identifier format would be::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)      | Type|C|                    Identifier                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)      +-+-+-+-+                       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)      |                               |  Checksum-neutral adjustment  |
^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) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) Configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) There are two methods to configure ILA mappings. One is by using LWT routes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) and the other is ila_xlat (called from NFHOOK PREROUTING hook). ila_xlat
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) is intended to be used in the receive path for ILA hosts .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) An ILA router has also been implemented in XDP. Description of that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) outside the scope of this document.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) The usage of for ILA LWT routes is:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) ip route add DEST/128 encap ila LOC csum-mode MODE ident-type TYPE via ADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) Destination (DEST) can either be a SIR address (for an ILA host or ingress
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) ILA router) or an ILA address (egress ILA router). LOC is the sixty-four
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) bit locator (with format W:X:Y:Z) that overwrites the upper sixty-four
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) bits of the destination address.  Checksum MODE is one of "no-action",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) "adj-transport", "neutral-map", and "neutral-map-auto". If neutral-map is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) set then the C-bit will be present. Identifier TYPE one of "luid" or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) "use-format." In the case of use-format, the identifier type field is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) present and the effective type is taken from that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) The usage of ila_xlat is:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) ip ila add loc_match MATCH loc LOC csum-mode MODE ident-type TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) MATCH indicates the incoming locator that must be matched to apply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) a the translaiton. LOC is the locator that overwrites the upper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) sixty-four bits of the destination address. MODE and TYPE have the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) same meanings as described above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) Some examples
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)      # Configure an ILA route that uses checksum neutral mapping as well
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)      # as type field. Note that the type field is set in the SIR address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)      # (the 2000 implies type is 1 which is LUID).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)      ip route add 3333:0:0:1:2000:0:1:87/128 encap ila 2001:0:87:0 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	  csum-mode neutral-map ident-type use-format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)      # Configure an ILA LWT route that uses auto checksum neutral mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)      # (no C-bit) and configure identifier type to be LUID so that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)      # identifier type field will not be present.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)      ip route add 3333:0:0:1:2000:0:2:87/128 encap ila 2001:0:87:1 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	  csum-mode neutral-map-auto ident-type luid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)      ila_xlat configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)      # Configure an ILA to SIR mapping that matches a locator and overwrites
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)      # it with a SIR address (3333:0:0:1 in this example). The C-bit and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)      # identifier field are used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)      ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	 csum-mode neutral-map-auto ident-type use-format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)      # Configure an ILA to SIR mapping where checksum neutral is automatically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293)      # set without the C-bit and the identifier type is configured to be LUID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294)      # so that the identifier type field is not present.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)      ip ila add loc_match 2001:0:119:0 loc 3333:0:0:1 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	 csum-mode neutral-map-auto ident-type use-format