Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
3 contributors

Users who have contributed to this file

@ondrej-fabry @VladoLavor @milanlenco
196 lines (173 sloc) 7.74 KB
syntax = "proto3";
package vpp.interfaces;
option go_package = "github.com/ligato/vpp-agent/api/models/vpp/interfaces;vpp_interfaces";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.messagename_all) = true;
import "models/vpp/ipsec/ipsec.proto";
message Interface {
enum Type {
UNDEFINED_TYPE = 0;
SUB_INTERFACE = 1;
SOFTWARE_LOOPBACK = 2;
DPDK = 3;
MEMIF = 4;
TAP = 5;
AF_PACKET = 6;
VXLAN_TUNNEL = 7;
IPSEC_TUNNEL = 8;
VMXNET3_INTERFACE = 9;
BOND_INTERFACE = 10;
};
string name = 1; /* Logical interface name unique across all configured interfaces (mandatory) */
Type type = 2;
bool enabled = 3;
string phys_address = 4;
repeated string ip_addresses = 5; /* IP addresses in the format <ipAddress>/<ipPrefix> */
uint32 vrf = 6; /* Non-zero VRF has to be explicitly created (see api/models/vpp/l3/vrf.proto).
Ignored for unnumbered interface - the VRF configuration is inherited from
the referenced numbered interface.*/
bool set_dhcp_client = 7;
uint32 mtu = 8;
message Unnumbered {
string interface_with_ip = 1;
}
Unnumbered unnumbered = 9;
message RxMode {
// from vpp/build-root/install-vpp-native/vpp/include/vnet/interface.h
enum Type {
UNKNOWN = 0;
POLLING = 1;
INTERRUPT = 2;
ADAPTIVE = 3;
DEFAULT = 4;
};
uint32 queue = 1;
Type mode = 2;
bool default_mode = 3; // if enabled, <queue> will be ignored and the given
// <mode> will be used for all queues without explicitly
// selected Rx mode
}
repeated RxMode rx_modes = 10;
message RxPlacement {
uint32 queue = 1; // select from interval <0, number-of-queues)
uint32 worker = 2; // select from interval <0, number-of-workers)
bool main_thread = 3; // let the main thread to process the given queue
// - if enabled, value of <worker> is ignored
}
repeated RxPlacement rx_placements = 11;
oneof link {
SubInterface sub = 100; /* sub-interface configuration */
MemifLink memif = 101; /* memif-specific configuration */
AfpacketLink afpacket = 102; /* AF-packet-specific configuration */
TapLink tap = 103; /* TAP-specific configuration */
VxlanLink vxlan = 104; /* VXLAN-specific configuration */
IPSecLink ipsec = 105; /* IPSec tunnel-specific configuration */
VmxNet3Link vmx_net3 = 106; /* VmxNet3-specific configuration */
BondLink bond = 107; /* Bond interface-specific configuration */
};
};
message SubInterface {
string parent_name = 1; /* Name of the parent (super) interface */
uint32 sub_id = 2; /* SubInterface ID, used as VLAN */
enum TagRewriteOptions { /* VLAN tag rewrite rule applied for given tag for sub-interface */
DISABLED = 0;
PUSH1 = 1;
PUSH2 = 2;
POP1 = 3;
POP2 = 4;
TRANSLATE11 = 5;
TRANSLATE12 = 6;
TRANSLATE21 = 7;
TRANSLATE22 = 8;
}
TagRewriteOptions tag_rw_option = 3;
bool push_dot1q = 4; /* Set ether-type of the first tag to dot1q if true, dot1ad otherwise */
uint32 tag1 = 5; /* First tag (required for PUSH1 and any TRANSLATE) */
uint32 tag2 = 6; /* Second tag (required for PUSH2 and any TRANSLATE) */
}
message MemifLink {
enum MemifMode {
ETHERNET = 0;
IP = 1;
PUNT_INJECT = 2;
}
MemifMode mode = 1;
bool master = 2;
uint32 id = 3; /* 32bit integer used to authenticate and match opposite sides of the connection */
string socket_filename = 4; /* filename of the socket used for connection establishment */
string secret = 5;
uint32 ring_size = 6; /* the number of entries of RX/TX rings */
uint32 buffer_size = 7; /* size of the buffer allocated for each ring entry */
uint32 rx_queues = 8; /* number of rx queues (only valid for slave) */
uint32 tx_queues = 9; /* number of tx queues (only valid for slave) */
}
message VxlanLink {
string src_address = 1; /* source VTEP address */
string dst_address = 2; /* destination VTEP address */
uint32 vni = 3; /* VXLAN Network Identifier */
string multicast = 4; /* multicast interface */
}
message AfpacketLink {
string host_if_name = 1; /* name of the host interface to bind to (mandatory) */
}
message TapLink {
uint32 version = 1; /* 1 / unset = use the original TAP interface; 2 = use a fast virtio-based TAP */
string host_if_name = 2; /* name of the TAP interface in the host OS;
if empty, it will be auto-generated (suitable for combination with TAP_TO_VPP
interface from Linux ifplugin, because then this name is only temporary anyway)
*/
string to_microservice = 3; /* if TAP connects VPP with microservice, fill this parameter with the target
microservice name - should match with the namespace reference of the associated
TAP_TO_VPP interface (it is still moved to the namespace by Linux-ifplugin but
VPP-ifplugin needs to be aware of this dependency) */
uint32 rx_ring_size = 4; /* Rx ring buffer size; must be power of 2; default is 256; only for TAP v.2 */
uint32 tx_ring_size = 5; /* Tx ring buffer size; must be power of 2; default is 256; only for TAP v.2 */
bool enable_gso = 6; /* Enable GSO */
}
message IPSecLink {
bool esn = 2; /* Extended sequence number */
bool anti_replay = 3; /* Anti replay option */
string local_ip = 4; /* Local IP address */
string remote_ip = 5; /* Remote IP address */
uint32 local_spi = 6; /* Local security parameter index */
uint32 remote_spi = 7; /* Remote security parameter index */
ipsec.CryptoAlg crypto_alg = 8; /* Cryptographic algorithm for encryption */
string local_crypto_key = 9;
string remote_crypto_key = 10;
ipsec.IntegAlg integ_alg = 11; /* Cryptographic algorithm for authentication */
string local_integ_key = 12;
string remote_integ_key = 13;
bool enable_udp_encap = 14; /* Enable UDP encapsulation */
}
/* PCI address (unsigned 32bit int) is derived from vmxnet3 interface name. It is expected that the interface
name is in format "vmxnet3-<d>/<b>/<s>/<f>", where 'd' stands for domain (max ffff), 'b' is bus (max ff),
's' is slot (max 1f) and 'f is function' (max 7). All values are base 16 */
message VmxNet3Link {
bool enable_elog = 2; /* turn on elog */
uint32 rxq_size = 3; /* receive queue size (default is 1024) */
uint32 txq_size = 4; /* transmit queue size (default is 1024) */
}
message BondLink {
uint32 id = 1;
enum Mode {
UNKNOWN = 0;
ROUND_ROBIN = 1;
ACTIVE_BACKUP = 2;
XOR = 3;
BROADCAST = 4;
LACP = 5;
}
Mode mode = 3;
enum LoadBalance {
L2 = 0;
L34 = 1;
L23 = 2;
}
LoadBalance lb = 4; // Load balance is optional and valid only for XOR and LACP modes
message BondedInterface {
string name = 1;
bool is_passive = 2;
bool is_long_timeout = 3;
}
repeated BondedInterface bonded_interfaces = 12;
}
You can’t perform that action at this time.