go.ligato.io/vpp-agent/v3@v3.5.0/proto/ligato/vpp/interfaces/interface.proto (about)

     1  syntax = "proto3";
     2  
     3  package ligato.vpp.interfaces;
     4  
     5  option go_package = "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces;vpp_interfaces";
     6  
     7  import "ligato/vpp/ipsec/ipsec.proto";
     8  import "ligato/annotations.proto";
     9  
    10  // Interface defines a VPP interface.
    11  message Interface {
    12      // Name is mandatory field representing logical name for the interface.
    13      // It must be unique across all configured VPP interfaces.
    14      string name = 1;
    15  
    16      // Type defines VPP interface types.
    17      enum Type {
    18          UNDEFINED_TYPE = 0;
    19          SUB_INTERFACE = 1;
    20          SOFTWARE_LOOPBACK = 2;
    21          DPDK = 3;
    22          MEMIF = 4;
    23          TAP = 5;
    24          AF_PACKET = 6;
    25          VXLAN_TUNNEL = 7;
    26          IPSEC_TUNNEL = 8 [deprecated=true]; // Deprecated in VPP 20.01+. Use IPIP_TUNNEL + ipsec.TunnelProtection instead.
    27          VMXNET3_INTERFACE = 9;
    28          BOND_INTERFACE = 10;
    29          GRE_TUNNEL = 11;
    30          GTPU_TUNNEL = 12;
    31          IPIP_TUNNEL = 13;
    32          WIREGUARD_TUNNEL = 14;
    33          RDMA = 15;
    34      };
    35      // Type represents the type of VPP interface and it must match the actual Link.
    36      Type type = 2;
    37  
    38      // Enabled controls if the interface should be UP.
    39      bool enabled = 3;
    40  
    41      // PhysAddress represents physical address (MAC) of the interface.
    42      // Random address will be assigned if left empty.
    43      string phys_address = 4;
    44  
    45      // IPAddresses define list of IP addresses for the interface and must be
    46      // defined in the following format: <ipAddress>/<ipPrefix>.
    47      // Interface IP address can be also allocated via netalloc plugin and
    48      // referenced here, see: api/models/netalloc/netalloc.proto
    49      repeated string ip_addresses = 5  [(ligato_options).type = IP_WITH_MASK];
    50  
    51      // Vrf defines the ID of VRF table that the interface is assigned to.
    52      // The VRF table must be explicitely configured (see api/models/vpp/l3/vrf.proto).
    53      // When using unnumbered interface the actual vrf is inherited from
    54      // the interface referenced by the numbered interface and this field is ignored.
    55      uint32 vrf = 6;
    56  
    57      // SetDhcpClient enables DHCP client on interface.
    58      bool set_dhcp_client = 7;
    59  
    60      // Ip6Nd is used to enable/disable IPv6 ND address autoconfiguration
    61      // and setting up default routes
    62      message IP6ND {
    63          // Enable IPv6 ND address autoconfiguration.
    64          bool address_autoconfig = 1;
    65          // Enable installing default routes.
    66          bool install_default_routes = 2;
    67      }
    68      IP6ND ip6_nd = 14;
    69  
    70      // Mtu sets MTU (Maximum Transmission Unit) for this interface.
    71      // If set to zero, default MTU (usually 9216) will be used.
    72      uint32 mtu = 8  [(ligato_options).int_range = {minimum: 0 maximum: 9216}];
    73  
    74      // Unnumbered is used for inheriting IP address from another interface.
    75      message Unnumbered {
    76          // InterfaceWithIp is the name of interface to inherit IP address from.
    77          string interface_with_ip = 1;
    78      }
    79      Unnumbered unnumbered = 9;
    80  
    81      message RxMode {
    82          uint32 queue = 1;
    83  
    84          // Type definition is from: vpp/include/vnet/interface.h
    85          enum Type {
    86              UNKNOWN = 0;
    87              POLLING = 1;
    88              INTERRUPT = 2;
    89              ADAPTIVE = 3;
    90              DEFAULT = 4;
    91          };
    92          Type mode = 2;
    93  
    94          // DefaultMode, if set to true, the <queue> field will be ignored
    95          // and the <mode> will be used as a default for all the queues.
    96          bool default_mode = 3;
    97      }
    98      repeated RxMode rx_modes = 12;
    99  
   100      message RxPlacement {
   101          // Select from interval <0, number-of-queues)
   102          uint32 queue = 1;
   103          // Select from interval <0, number-of-workers)
   104          uint32 worker = 2;
   105          // Let the main thread to process the given queue
   106          //  - if enabled, value of <worker> is ignored
   107          bool main_thread = 3;
   108      }
   109      repeated RxPlacement rx_placements = 13;
   110  
   111      // Link defines configuration for specific interface types.
   112      // It can be nil for some interfaces types like: loopback and DPDK.
   113      oneof link {
   114          SubInterface sub = 100;
   115          MemifLink memif = 101;
   116          AfpacketLink afpacket = 102;
   117          TapLink tap = 103;
   118          VxlanLink vxlan = 104;
   119          IPSecLink ipsec = 105 [deprecated=true]; // Deprecated in VPP 20.01+. Use IPIP_TUNNEL + ipsec.TunnelProtection instead.
   120          VmxNet3Link vmx_net3 = 106;
   121          BondLink bond = 107;
   122          GreLink gre = 108;
   123          GtpuLink gtpu = 109;
   124          IPIPLink ipip = 110;
   125          WireguardLink wireguard = 111;
   126          RDMALink rdma = 112;
   127      };
   128  };
   129  
   130  // SubInterface defines configuration for interface type: SUB_INTERFACE
   131  message SubInterface {
   132      // Name of the parent (super) interface
   133      string parent_name = 1;
   134      // SubInterface ID, used as VLAN
   135      uint32 sub_id = 2;
   136  
   137      enum TagRewriteOptions {
   138          DISABLED = 0;
   139          PUSH1 = 1;
   140          PUSH2 = 2;
   141          POP1 = 3;
   142          POP2 = 4;
   143          TRANSLATE11 = 5;
   144          TRANSLATE12 = 6;
   145          TRANSLATE21 = 7;
   146          TRANSLATE22 = 8;
   147      }
   148      // VLAN tag rewrite rule applied for given tag for sub-interface
   149      TagRewriteOptions tag_rw_option = 3;
   150      // Set ether-type of the first tag to dot1q if true, dot1ad otherwise
   151      bool push_dot1q = 4;
   152      // First tag (required for PUSH1 and any TRANSLATE)
   153      uint32 tag1 = 5;
   154      // Second tag (required for PUSH2 and any TRANSLATE)
   155      uint32 tag2 = 6;
   156  }
   157  
   158  // MemifLink defines configuration for interface type: MEMIF
   159  message MemifLink {
   160      enum MemifMode {
   161          ETHERNET = 0;
   162          IP = 1;
   163          PUNT_INJECT = 2;
   164      }
   165      MemifMode mode = 1;
   166  
   167      bool master = 2;
   168      // Id is a 32bit integer used to authenticate and match opposite sides of the connection
   169      uint32 id = 3;
   170      // Filename of the socket used for connection establishment
   171      string socket_filename = 4;
   172      string secret = 5;
   173      // The number of entries of RX/TX rings
   174      uint32 ring_size = 6;
   175      // Size of the buffer allocated for each ring entry
   176      uint32 buffer_size = 7;
   177      // Number of rx queues (only valid for slave)
   178      uint32 rx_queues = 8;
   179      // Number of tx queues (only valid for slave)
   180      uint32 tx_queues = 9;
   181  }
   182  
   183  // VxlanLink defines configuration for interface type: VXLAN_TUNNEL
   184  message VxlanLink {
   185      // SrcAddress is source VTEP address
   186      string src_address = 1  [(ligato_options).type = IP];
   187      // DstAddress is destination VTEP address
   188      string dst_address = 2  [(ligato_options).type = IP];
   189      // Vni stands for VXLAN Network Identifier 
   190      uint32 vni = 3;     
   191      // Multicast defines name of multicast interface     
   192      string multicast = 4;    
   193  
   194      // Gpe (Generic Protocol Extension) allows encapsulating not only Ethernet frame payload.
   195      message Gpe {
   196          uint32 decap_vrf_id = 1;
   197          enum Protocol {
   198              UNKNOWN = 0;
   199              IP4 = 1;
   200              IP6 = 2;
   201              ETHERNET = 3;
   202              NSH = 4;
   203          };
   204          // Protocol defines encapsulated protocol
   205          Protocol protocol = 2;
   206      }
   207      Gpe gpe = 5;
   208  }
   209  
   210  // AfpacketLink defines configuration for interface type: AF_PACKET
   211  message AfpacketLink {
   212      // Name of the host (Linux) interface to bind to.
   213      // This type of reference is suitable for scenarios when the target interface
   214      // is not managed (and should not be touched) by the agent. In such cases the interface
   215      // does not have logical name in the agent's namespace and can only be referenced
   216      // by the host interface name (i.e. the name used in the Linux network stack).
   217      // Please note that agent learns about externally created interfaces through netlink
   218      // notifications.
   219      // If, however, the target interface is managed by the agent, then it is recommended
   220      // to use the alternative reference <linux_interface> (see below), pointing to the interface
   221      // by its logical name. One advantage of such approach is, that if AF-PACKET and the target
   222      // Linux interface are requested to be created at the same time, then it can be done inside
   223      // the same transaction because the agent does not rely on any notification from the Linux.
   224      // It is mandatory to define either <host_if_name> or <linux_interface>.
   225      string host_if_name = 1;
   226  
   227      // Logical name of the Linux interface to bind to.
   228      // This is an alternative interface reference to <host_if_name> and preferred
   229      // if the target interface is managed by the agent and not created externally
   230      // (see comments for <host_if_name> for explanation).
   231      // It is mandatory to define either <host_if_name> or <linux_interface>.
   232      string linux_interface = 2;
   233  }
   234  
   235  // TapLink defines configuration for interface type: TAP
   236  message TapLink {
   237      // 1 / unset = use the original TAP interface; 2 = use a fast virtio-based TAP
   238      uint32 version = 1;     
   239      // Name of the TAP interface in the host OS;
   240      // if empty, it will be auto-generated (suitable for combination with TAP_TO_VPP
   241      // interface from Linux ifplugin, because then this name is only temporary anyway)
   242      string host_if_name = 2;
   243      // If TAP connects VPP with microservice, fill this parameter with the target
   244      // microservice name - should match with the namespace reference of the associated
   245      // TAP_TO_VPP interface (it is still moved to the namespace by Linux-ifplugin but
   246      // VPP-ifplugin needs to be aware of this dependency)
   247      string to_microservice = 3; 
   248      // Rx ring buffer size; must be power of 2; default is 256; only for TAP v.2
   249      uint32 rx_ring_size = 4;
   250      // Tx ring buffer size; must be power of 2; default is 256; only for TAP v.2
   251      uint32 tx_ring_size = 5;
   252      // EnableGso enables GSO mode for TAP interface.
   253      bool enable_gso = 6;
   254      // EnableTunnel enables tunnel mode for TAP interface.
   255      bool enable_tunnel = 7;
   256  }
   257  
   258  // IPSecLink defines configuration for interface type: IPSEC_TUNNEL
   259  // In VPP 21.06 and newer, IPSecLink serves just for creation of the link and thus only tunnel_mode is taken into
   260  // account and all of the remaining (deprecated) fields are ignored.
   261  // Please use separate SecurityPolicy, SecurityAssociation and TunnelProtection messages from ligato.vpp.ipsec
   262  // package to associate SA, SP and tunnel protection with the link.
   263  message IPSecLink {
   264      enum Mode {
   265          // point-to-point tunnel
   266          POINT_TO_POINT = 0;
   267          // point-to multipoint tunnel (supported starting from VPP 20.05)
   268          POINT_TO_MULTIPOINT = 1;
   269      };
   270      // Mode of the IPIP tunnel
   271      Mode tunnel_mode = 1;
   272  
   273      // Extended sequence number
   274      bool esn = 2 [deprecated=true];
   275      // Anti replay option
   276      bool anti_replay = 3 [deprecated=true];
   277      // Local IP address
   278      string local_ip = 4  [(ligato_options).type = IP, deprecated=true];
   279      // Remote IP address
   280      string remote_ip = 5  [(ligato_options).type = IP, deprecated=true];
   281      // Local security parameter index
   282      uint32 local_spi = 6 [deprecated=true];
   283      // Remote security parameter index
   284      uint32 remote_spi = 7 [deprecated=true];
   285  
   286      // Cryptographic algorithm for encryption
   287      ipsec.CryptoAlg crypto_alg = 8 [deprecated=true];
   288      string local_crypto_key = 9 [deprecated=true];
   289      string remote_crypto_key = 10 [deprecated=true];
   290  
   291      // Cryptographic algorithm for authentication
   292      ipsec.IntegAlg integ_alg = 11 [deprecated=true];
   293      string local_integ_key = 12 [deprecated=true];
   294      string remote_integ_key = 13 [deprecated=true];
   295  
   296      bool enable_udp_encap = 14 [deprecated=true];
   297  }
   298  
   299  // VmxNet3Link defines configuration for interface type: VMXNET3_INTERFACE
   300  // PCI address (unsigned 32bit int) is derived from vmxnet3 interface name. It is expected that the interface
   301  // name is in format `vmxnet3-<d>/<b>/<s>/<f>`, where `d` stands for domain (max ffff), `b` is bus (max ff),
   302  // `s` is slot (max 1f) and `f` is function (max 7). All values are base 16
   303  message VmxNet3Link {
   304      // Turn on elog
   305      bool enable_elog = 2;
   306      // Receive queue size (default is 1024)
   307      uint32 rxq_size = 3;
   308      // Transmit queue size (default is 1024)
   309      uint32 txq_size = 4;
   310  }
   311  
   312  // BondLink defines configuration for interface type: BOND_INTERFACE
   313  message BondLink {
   314      uint32 id = 1;
   315  
   316      enum Mode {
   317        UNKNOWN = 0;
   318        ROUND_ROBIN = 1;
   319        ACTIVE_BACKUP = 2;
   320        XOR = 3;
   321        BROADCAST = 4;
   322        LACP = 5;
   323      }
   324      Mode mode = 3;
   325  
   326      enum LoadBalance {
   327          L2 = 0;
   328          L34 = 1;
   329          L23 = 2;
   330          // Round robin
   331          RR = 3;
   332          // Broadcast
   333          BC = 4;
   334          // Active backup
   335          AB = 5;
   336      }
   337      // Load balance is optional and valid only for XOR and LACP modes
   338      LoadBalance lb = 4;
   339  
   340      message BondedInterface {
   341          string name = 1;
   342          bool is_passive = 2;
   343          bool is_long_timeout = 3;
   344      }
   345      repeated BondedInterface bonded_interfaces = 12;
   346  }
   347  
   348  message GreLink {
   349      enum Type {
   350          UNKNOWN = 0;
   351          // L3 GRE (i.e. this tunnel is in L3 mode)
   352          L3 = 1; 
   353          // TEB - Transparent Ethernet Bridging - the tunnel is in L2 mode
   354          TEB = 2; 
   355          // ERSPAN - the tunnel is for port mirror SPAN output
   356          ERSPAN = 3; 
   357      };
   358      Type tunnel_type = 1;
   359  
   360      string src_addr = 2  [(ligato_options).type = IP];
   361      string dst_addr = 3  [(ligato_options).type = IP];
   362  
   363      uint32 outer_fib_id = 4;
   364      uint32 session_id = 5;
   365  }
   366  
   367  message GtpuLink {
   368      enum NextNode {
   369          // The default next node is l2-input
   370          DEFAULT = 0;
   371          // l2-input
   372          L2 = 1;
   373          // ip4-input
   374          IP4 = 2;
   375          // ip6-input
   376          IP6 = 3;
   377      };
   378      // Source VTEP address
   379      string src_addr = 1  [(ligato_options).type = IP];
   380      // Destination VTEP address
   381      string dst_addr = 2  [(ligato_options).type = IP];
   382      // Name of multicast interface
   383      string multicast = 3;
   384      // Tunnel endpoint identifier - local
   385      uint32 teid = 4;
   386      // Tunnel endpoint identifier - remote
   387      uint32 remote_teid = 7;
   388      // VRF id for the encapsulated packets
   389      uint32 encap_vrf_id = 5;
   390      // DEPRECATED - use decap_next_node
   391      NextNode decap_next = 6 [deprecated=true];
   392      // Next VPP node after decapsulation
   393      uint32 decap_next_node = 8;
   394  }
   395  
   396  message IPIPLink {
   397      enum Mode {
   398          // point-to-point tunnel
   399          POINT_TO_POINT = 0;
   400          // point-to multipoint tunnel (supported starting from VPP 20.05)
   401          POINT_TO_MULTIPOINT = 1;
   402      };
   403      // Mode of the IPIP tunnel
   404      Mode tunnel_mode = 1;
   405  
   406      // Source VTEP IP address
   407      string src_addr = 2  [(ligato_options).type = IP];
   408      // Destination VTEP IP address
   409      string dst_addr = 3  [(ligato_options).type = IP];
   410  }
   411  
   412  message WireguardLink {
   413    // Private-key base64
   414    string private_key = 2;
   415  
   416    // Listen UDP port
   417    uint32 port = 3  [(ligato_options).int_range = {minimum: 0 maximum: 65535}];
   418  
   419    // Source IP address
   420    string src_addr = 4  [(ligato_options).type = IP];
   421  }
   422  
   423  // https://github.com/FDio/vpp/blob/master/src/plugins/rdma/rdma_doc.rst
   424  message RDMALink {
   425      enum Mode {
   426          AUTO = 0;
   427          // InfiniBand Verb (using libibverb).
   428          IBV = 1;
   429          // Direct Verb allows the driver to access the NIC HW RX/TX rings directly
   430          // instead of having to go through libibverb and suffering associated overhead.
   431          // It will be automatically selected if the adapter supports it.
   432          DV = 2;
   433      };
   434  
   435      // Linux interface name representing the RDMA-enabled network device to attach into.
   436      string host_if_name = 1;
   437  
   438      // Mode at which the RDMA driver operates.
   439      Mode mode = 2;
   440  
   441      // Number of receive queues.
   442      // By default only one RX queue is used.
   443      uint32 rxq_num = 3;
   444  
   445      // The size of each RX queue.
   446      // Default is 1024 bytes.
   447      uint32 rxq_size = 4;
   448  
   449      // The size of each TX queue.
   450      // Default is 1024 bytes.
   451      uint32 txq_size = 5;
   452  }