diff --git a/proto/config/appconfig.proto b/proto/config/appconfig.proto index c4f7e35..d979e3d 100644 --- a/proto/config/appconfig.proto +++ b/proto/config/appconfig.proto @@ -213,6 +213,16 @@ message AppInstanceConfig { // Custom resolution applies to VM that is running in FML mode only. string vm_resolution = 27; + + // Enables enforcement of user-defined ordering for network interfaces. + // This applies to both virtual interfaces (specified in the "interfaces" list) + // and directly assigned network adapters (specified in the "adapters" list as items + // of type "PhyIoNetEth", "PhyIoNetWLAN", "PhyIoNetWWAN", and "PhyIoNetEthVF"). + // Note: Older versions of EVE may not support enforcing the user-defined order + // of application network interfaces. The controller can check + // ZInfoDevice.api_capability to verify if the configured device supports the + // API capability API_CAPABILITY_ENFORCED_NET_INTERFACE_ORDER. + bool enforce_network_interface_order = 28; } message PatchEnvelopeRef { diff --git a/proto/config/devcommon.proto b/proto/config/devcommon.proto index cd19ec0..907b35d 100644 --- a/proto/config/devcommon.proto +++ b/proto/config/devcommon.proto @@ -50,6 +50,25 @@ message Adapter { org.lfedge.eve.common.PhyIoType type = 1; string name = 2; // Short hand name such as "com" from bundle EthVF eth_vf = 3; // Only relevant for PHY_IO_TYPE_PHY_IO_NET_ETH_VF + + // Optionally defines the network interface order relative to other directly assigned + // network devices and virtual network adapters (see "interface_order" in + // NetworkAdapter, file "netconfig.proto"). + // Only applies to (assignable) network adapters, i.e. types: "PhyIoNetEth", "PhyIoNetWLAN", + // "PhyIoNetWWAN" and "PhyIoNetEthVF". + // Interface with a lower order value will appear inside the application before + // interface with a higher order value. + // The implementation of this ordering may depend on the hypervisor. For example, + // the hypervisor might virtualize the PCI bus and assign lower PCI addresses to + // interfaces with lower order values. + // Two network interfaces (virtual or physical) assigned to the same application + // cannot share the same order value, except for the value `0`, which represents + // an undefined interface order. + // Since this field was introduced in later versions, older versions of EVE do not + // support user-defined interface ordering. For backward compatibility, the user-defined + // order is applied only if "enforce_network_interface_order" is enabled for the given + // application (see "AppInstanceConfig", file "appconfig.proto"). + uint32 interface_order = 4; } // Information regarding Virtual Function (VF) customisation diff --git a/proto/config/netconfig.proto b/proto/config/netconfig.proto index dab1e19..38891f1 100644 --- a/proto/config/netconfig.proto +++ b/proto/config/netconfig.proto @@ -70,6 +70,23 @@ message NetworkAdapter { // allow AppInstance to discover other AppInstances // attached to this network instance. Default is false bool allow_to_discover = 42; + + // Optionally defines the network interface order relative to other virtual + // network adapters and directly assigned network devices (see `interface_order` + // in Adapter, file `devcommon.proto`). + // Interface with a lower order value will appear inside the application before + // interface with a higher order value. + // The implementation of this ordering may depend on the hypervisor. For example, + // the hypervisor might virtualize the PCI bus and assign lower PCI addresses to + // interfaces with lower order values. + // Two network interfaces (virtual or physical) assigned to the same application + // cannot share the same order value, except for the value `0`, which represents + // an undefined interface order. + // Since this field was introduced in later versions, older versions of EVE do not + // support user-defined interface ordering. For backward compatibility, the user-defined + // order is applied only if "enforce_network_interface_order" is enabled for the given + // application (see "AppInstanceConfig", file "appconfig.proto"). + uint32 interface_order = 50; } message WirelessConfig { diff --git a/proto/info/info.proto b/proto/info/info.proto index 2bd5876..cfc1582 100644 --- a/proto/info/info.proto +++ b/proto/info/info.proto @@ -677,6 +677,7 @@ enum APICapability { API_CAPABILITY_BOOT_MODE = 7; // Support different boot modes for Edge Applications (VMs) API_CAPABILITY_MTU = 8; // Allows to set MTU for network adapters and network instances API_CAPABILITY_ADAPTER_USER_LABELS = 9; // Supports user-defined shared network adapter labels + API_CAPABILITY_ENFORCED_NET_INTERFACE_ORDER = 10; // Is able to enforce the user-defined order of application network interfaces // Add new values as new EdgeDevConfig API features are implemented }