Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Enumerations | Functions
Overlay (L2 Over L3 Tunnel) Configuration And Status [OPENAPI_L2OL3TUNNEL]

Data Structures

struct  open_l2ol3AccessPortInfo_t
 Access Port Entry Information. More...
 
struct  open_l2ol3ErrorStats_t
 Overlay Failure Statistics Information. More...
 
struct  open_l2ol3L2FwdEntry_t
 Tenant Forwarding Entry Information. More...
 
struct  open_l2ol3ResourceLimits_t
 Overlay Global Resource Limits. More...
 
struct  open_l2ol3ResourceStats_t
 Overlay Global Statistics Information. More...
 
struct  open_l2ol3TenantConfig_t
 Tenant Configuration Information. More...
 
struct  open_l2ol3TunnelInfo_t
 Tunnel Port Entry Information. More...
 
struct  open_l2ol3TunnelStats_t
 Tunnel Counters Information. More...
 
struct  open_l2ol3TunnelStatus_t
 Tunnel Status Information. More...
 

Macros

#define OPEN_L2OL3_TENANT_ID_MAX   (0xFFFFFE)
 Maximum value allowed for VXLAN VNID or NVGRE VSID.
 
#define OPEN_L2OL3_TENANT_ID_MIN   (1)
 Minimum value allowed for VXLAN VNID or NVGRE VSID.
 
#define OPEN_L2OL3_TENANT_ID_RESERVED   (0xFFFFFF)
 This is reserved ID and used for internal purposes. More...
 
#define OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT   (4789)
 Default: UDP port used by VXLAN in IPv4 UDP header. More...
 

Enumerations

enum  OPEN_L2OL3_ACCESS_MATCH_t { OPEN_L2OL3_ACCESS_MATCH_PORT = 1, OPEN_L2OL3_ACCESS_MATCH_PORT_VLAN = 2 }
 Tenant Access Port Classification Types. More...
 
enum  OPEN_L2OL3_CONFIG_t { OPEN_L2OL3_CONFIG_CREATE = 1, OPEN_L2OL3_CONFIG_UPDATE = 2 }
 Overlay Configuration Methods. More...
 
enum  OPEN_L2OL3_REASON_t { OPEN_L2OL3_REASON_INVALID = 0, OPEN_L2OL3_REASON_INITIATOR_NOT_RESOLVED = 1, OPEN_L2OL3_REASON_INITIATOR_FAILED = 2, OPEN_L2OL3_REASON_TERMINATOR_FAILED = 4 }
 Tunnel Status Reason Codes. More...
 
enum  OPEN_L2OL3_TUNNEL_TYPE_t { OPEN_L2OL3_TUNNEL_TYPE_INVALID = 0, OPEN_L2OL3_TUNNEL_TYPE_VXLAN = 2, OPEN_L2OL3_TUNNEL_TYPE_NVGRE = 4 }
 Overlay Types. More...
 

Functions

open_error_t openapiL2oL3AccessPortGet (openapiClientHandle_t *client_handle, uint32_t accessPortHandle, open_l2ol3AccessPortInfo_t *accessPortInfo)
 Gets access port information from the specified access port handle. More...
 
open_error_t openapiL2oL3AccessPortNextGet (openapiClientHandle_t *client_handle, uint32_t accessPortHandle, open_l2ol3AccessPortInfo_t *accessPortNextInfo)
 Gets next access port entry for the next numerically higher access port handle after the specified access port handle. More...
 
open_error_t openapiL2oL3ResourceLimitsGet (openapiClientHandle_t *client_handle, open_l2ol3ResourceLimits_t *resourceLimits)
 Get Overlay configuration maximum allowed limits. More...
 
open_error_t openapiL2oL3ResourceStatsGet (openapiClientHandle_t *client_handle, open_l2ol3ResourceStats_t *resourceStats)
 Get Overlay global statistics. More...
 
open_error_t openapiL2oL3SwitchTunnelModeGet (openapiClientHandle_t *client_handle, OPEN_L2OL3_TUNNEL_TYPE_t tunnelType, OPEN_CONTROL_t *mode)
 Gets the mode of the specified Overlay type. More...
 
open_error_t openapiL2oL3SwitchTunnelModeSet (openapiClientHandle_t *client_handle, OPEN_L2OL3_TUNNEL_TYPE_t tunnelType, OPEN_CONTROL_t mode)
 Set the switch mode for the specified type of Overlay functionality. More...
 
open_error_t openapiL2oL3SwitchVxlanUdpDestPortGet (openapiClientHandle_t *client_handle, uint32_t *udpDestPort)
 Gets VXLAN UDP port configured on the switch. More...
 
open_error_t openapiL2oL3SwitchVxlanUdpDestPortSet (openapiClientHandle_t *client_handle, uint32_t udpDestPort)
 Set VXLAN UDP port on the switch. More...
 
open_error_t openapiL2oL3TenantCreate (openapiClientHandle_t *client_handle, OPEN_L2OL3_CONFIG_t configType, uint32_t tenant, open_l2ol3TenantConfig_t tenantConfig)
 Creates or updates specified tenant configuration. More...
 
open_error_t openapiL2oL3TenantDelete (openapiClientHandle_t *client_handle, uint32_t tenant)
 Deletes specified tenant configuration. More...
 
open_error_t openapiL2oL3TenantGet (openapiClientHandle_t *client_handle, uint32_t tenant, open_l2ol3TenantConfig_t *tenantConfig)
 Get the configuration for a specified tenant. More...
 
open_error_t openapiL2oL3TenantL2FwdEntryAdd (openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, uint32_t destIntfHandle)
 Configures a forwarding entry for the specified tenant system. More...
 
open_error_t openapiL2oL3TenantL2FwdEntryDelete (openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress)
 Deletes a forwarding entry of the specified tenant system. More...
 
open_error_t openapiL2oL3TenantL2FwdEntryGet (openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, open_l2ol3L2FwdEntry_t *macEntry)
 Gets forwarding entry specified by tenant and MAC address. More...
 
open_error_t openapiL2oL3TenantL2FwdEntryNextGet (openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, open_l2ol3L2FwdEntry_t *nextMacEntry)
 Get the next forwarding entry available after the forwarding entry specified by tenant and MAC address. More...
 
open_error_t openapiL2oL3TenantNextGet (openapiClientHandle_t *client_handle, uint32_t tenant, uint32_t *nextTenant, open_l2ol3TenantConfig_t *nextTenantConfig)
 Get the next tenant entry for the next numerically higher tenant after the specified tenant. More...
 
open_error_t openapiL2oL3TunnelCapabilitiesGet (openapiClientHandle_t *client_handle, uint32_t *capabilities)
 Get Overlay capabilities of the Switch. More...
 
open_error_t openapiL2oL3TunnelCounterClear (openapiClientHandle_t *client_handle, uint32_t tunnelHandle)
 Clears packet/byte counters of the tenant tunnel specified by tunnel handle. More...
 
open_error_t openapiL2oL3TunnelCounterGet (openapiClientHandle_t *client_handle, uint32_t tunnelHandle, open_l2ol3TunnelStats_t *tunnelStats)
 Gets packet/byte counters of the tenant tunnel specified tunnel handle. More...
 
open_error_t openapiL2oL3TunnelCreate (openapiClientHandle_t *client_handle, OPEN_L2OL3_CONFIG_t configType, uint32_t tenant, uint32_t remoteIPAddr, uint32_t *tunnelHandle)
 Create a tunnel to a specified remote TEP for a specified tenant. More...
 
open_error_t openapiL2oL3TunnelDelete (openapiClientHandle_t *client_handle, uint32_t tunnelHandle)
 Delete a tenant tunnel specified by the tunnel handle. More...
 
open_error_t openapiL2oL3TunnelGet (openapiClientHandle_t *client_handle, uint32_t tunnelHandle, open_l2ol3TunnelInfo_t *tunnelInfo)
 Gets tenant tunnel entry from the specified tunnel handle. More...
 
open_error_t openapiL2oL3TunnelLocalIPAddrGet (openapiClientHandle_t *client_handle, uint32_t *ipAddr)
 Gets the preferred IP address that can be used as Local TEP or local Overlay Gateway IP address. More...
 
open_error_t openapiL2oL3TunnelNextGet (openapiClientHandle_t *client_handle, uint32_t tunnelId, open_l2ol3TunnelInfo_t *tunnelInfoNext)
 Gets tunnel entry for the next numerically higher tunnel handle after the specified tunnel handle. More...
 

Detailed Description

Macro Definition Documentation

#define OPEN_L2OL3_TENANT_ID_RESERVED   (0xFFFFFF)

This is reserved ID and used for internal purposes.

Definition at line 54 of file openapi_l2ol3tunnel.h.

#define OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT   (4789)

Default: UDP port used by VXLAN in IPv4 UDP header.

Switch also terminates VXLAN matching this UDP port

Definition at line 49 of file openapi_l2ol3tunnel.h.

Enumeration Type Documentation

Tenant Access Port Classification Types.

Enumerator
OPEN_L2OL3_ACCESS_MATCH_PORT 

Classifies based on incoming port.

OPEN_L2OL3_ACCESS_MATCH_PORT_VLAN 

Classifies based on incoming VLAN tag.

Definition at line 94 of file openapi_l2ol3tunnel.h.

Overlay Configuration Methods.

Enumerator
OPEN_L2OL3_CONFIG_CREATE 

Create Operation.

OPEN_L2OL3_CONFIG_UPDATE 

Update Operation.

Definition at line 69 of file openapi_l2ol3tunnel.h.

Tunnel Status Reason Codes.

Enumerator
OPEN_L2OL3_REASON_INITIATOR_NOT_RESOLVED 

Next-hop is not resolved.

OPEN_L2OL3_REASON_INITIATOR_FAILED 

Failed to configure initiator.

OPEN_L2OL3_REASON_TERMINATOR_FAILED 

Failed to configure terminator.

Definition at line 76 of file openapi_l2ol3tunnel.h.

Overlay Types.

Enumerator
OPEN_L2OL3_TUNNEL_TYPE_VXLAN 

VXLAN tunnel type.

OPEN_L2OL3_TUNNEL_TYPE_NVGRE 

NVGRE tunnel type.

Definition at line 61 of file openapi_l2ol3tunnel.h.

Function Documentation

open_error_t openapiL2oL3AccessPortGet ( openapiClientHandle_t client_handle,
uint32_t  accessPortHandle,
open_l2ol3AccessPortInfo_t accessPortInfo 
)

Gets access port information from the specified access port handle.

Parameters
[in]client_handleClient handle from registration API.
[in]accessPortHandleAccess Port Handle.
[out]accessPortInfoAccess Port Information.
Return values
OPEN_E_NONEAccess Port info get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDAccess Port does not exists
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3AccessPortNextGet ( openapiClientHandle_t client_handle,
uint32_t  accessPortHandle,
open_l2ol3AccessPortInfo_t accessPortNextInfo 
)

Gets next access port entry for the next numerically higher access port handle after the specified access port handle.

Parameters
[in]client_handleClient handle from registration API.
[in]accessPortHandleAccess Port Handle.
[out]accessPortNextInfoNext Access Port Information.
Return values
OPEN_E_NONENext access port info get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDNext access port was not found
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3ResourceLimitsGet ( openapiClientHandle_t client_handle,
open_l2ol3ResourceLimits_t resourceLimits 
)

Get Overlay configuration maximum allowed limits.

Parameters
[in]client_handleClient handle from registration API.
[out]resourceLimitsResource Limit Values.
Return values
OPEN_E_NONEResource limits retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSwitch does not support Overlays
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3ResourceStatsGet ( openapiClientHandle_t client_handle,
open_l2ol3ResourceStats_t resourceStats 
)

Get Overlay global statistics.

Parameters
[in]client_handleClient handle from registration API.
[out]resourceStatsGlobal statistics.
Return values
OPEN_E_NONEGlobal statistics retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSwitch does not support Overlays
Note
Certain error conditions cause SYSLOG events to be generated.
Both global counters reflecting the current resource usage and error stats are retrieved.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3SwitchTunnelModeGet ( openapiClientHandle_t client_handle,
OPEN_L2OL3_TUNNEL_TYPE_t  tunnelType,
OPEN_CONTROL_t mode 
)

Gets the mode of the specified Overlay type.

Parameters
[in]client_handleClient handle from registration API.
[in]tunnelTypeType of Overlay functionality.
[out]modeOverlay Mode.
Return values
OPEN_E_NONEMode retrieved successfully
OPEN_E_PARAMError in parameter passed
Note
OPEN_ENABLE - Overlay Functionality of specified type is enabled.
OPEN_DISABLE - Overlay Functionality of specified type is disabled.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3SwitchTunnelModeSet ( openapiClientHandle_t client_handle,
OPEN_L2OL3_TUNNEL_TYPE_t  tunnelType,
OPEN_CONTROL_t  mode 
)

Set the switch mode for the specified type of Overlay functionality.

Parameters
[in]client_handleClient handle from registration API.
[in]tunnelTypeType of Overlay functionality.
[in]modeOverlay Tunnel Mode.
Return values
OPEN_E_NONECapabilities retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_EXISTSSpecified Overlay mode already configured
Note
Switch can be set to do either VXLAN or NVGRE Overlay at a time. Eg: To enable VXLAN mode, NVGRE needs to be disabled, if configured.
OPEN_ENABLE - Overlay Functionality of specified type is enabled.
OPEN_DISABLE - Overlay Functionality of specified type is disabled. On disable, all the existing Overlay configuration on the switch is cleared from running configuration.
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3SwitchVxlanUdpDestPortGet ( openapiClientHandle_t client_handle,
uint32_t *  udpDestPort 
)

Gets VXLAN UDP port configured on the switch.

Parameters
[in]client_handleClient handle from registration API.
[out]udpDestPortUDP Port Number
Return values
OPEN_E_NONEVXLAN UDP port get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILVXLAN feature is not supported
Note
This is only valid when the switch mode is set to VXLAN.
By default, OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT is set as the VXLAN UDP port number on the Switch.
Valid Range of UDP port number for VXLAN: 1024-65535.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3SwitchVxlanUdpDestPortSet ( openapiClientHandle_t client_handle,
uint32_t  udpDestPort 
)

Set VXLAN UDP port on the switch.

Parameters
[in]client_handleClient handle from registration API.
[in]udpDestPortUDP Port Number
Return values
OPEN_E_NONEVXLAN UDP port set successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_EXISTSAlready configured
OPEN_E_FAILUREOperation failed due to no support for VXLAN or Overlay mode is not set to VXLAN or other failure.
Note
This is only valid when the switch mode is set to VXLAN.
When switch is configured with a valid VXLAN UDP port number, it is used by VXLAN in the UDP destination port field of IPv4 UDP header while encapsulating. Switch also terminates the incoming VXLAN that has a matching UDP destination port in the IPv4 UDP header.
By default, OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT is set as the VXLAN UDP port number on the Switch.
Valid Range of UDP port number for VXLAN: 1024-65535.
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantCreate ( openapiClientHandle_t client_handle,
OPEN_L2OL3_CONFIG_t  configType,
uint32_t  tenant,
open_l2ol3TenantConfig_t  tenantConfig 
)

Creates or updates specified tenant configuration.

Parameters
[in]client_handleClient handle from registration API.
[in]configTypeConfiguration Type.
[in]tenantTenant identifier.
[in]tenantConfigTenant configuration Information.
Return values
OPEN_E_NONETenant configured successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_ERROROverlay functionality is not enabled on the switch
OPEN_E_FULLAttempting to create an entry, but already reached maximum number of tenants
OPEN_E_EXISTSSpecified tenant already exists during update
OPEN_E_NOT_FOUNDSpecified tenant does not exist
OPEN_E_FAILTenant configuration failed
Note
Tenant Identifier accepts a value between OPEN_L2OL3_TENANT_ID_MIN and OPEN_L2OL3_TENANT_ID_MAX.
To create tenant configuration, apart from a valid tenantId and tunnelType, caller need to pass either VLAN or Local TEP or both information. open_l2ol3TenantConfig_t::vlanId and open_l2ol3TenantConfig_t::localTepIpAddr both cannot be set to 0 at any point of time.
open_l2ol3TenantConfig_t::vlanId is the VLAN that needs to be associated with Tenant. This API does not create the VLAN, it has to created by regular means of switch mgmt prior to this call. API will fail, when open_l2ol3TenantConfig_t::vlanId does not exist on the switch. All the interfaces those are current members of tenant VLAN becomes access ports for the Tenant. API creates tenant access ports for the existing members of the VLAN, if successful. A VLAN that is already mapped to a Tenant cannot be reused by other Tenants. VLAN to Tenant mapping is one-to-one.
When open_l2ol3TenantConfig_t::vlanId is set to 0: During create operation, no VLAN is associated with the tenant. No tenant access ports exists. During update operation, if there is a valid VLAN already associated with the tenant, all access ports created for the tenant are deleted and the association with the existing VLAN is removed.
When open_l2ol3TenantConfig_t::vlanId is set a valid VLAN Id: During create operation, VLAN is associated with the tenant and tenant access ports are created based on existing VLAN membership configuration.
During update operation, if there is a valid VLAN already associated with the tenant, all access ports created of the tenant are deleted and the association with the existing VLAN is removed. Tenant is associated with new open_l2ol3TenantConfig_t::vlanId and accordingly new access ports gets created for the tenant if operation is successful.
Tenant access ports information can be fetched using openapiL2oL3AccessPortGet() and openapiL2oL3AccessPortNextGet() APIs.
After the API call succeeds, tenant access ports automatically get created and deleted based open_l2ol3TenantConfig_t::vlanId membership configuration on the switch interfaces. The VLAN membership is configured using regular switch configuration through mgmt channels like CLI, SNMP, an application using dot1q OpEN API etc.
open_l2ol3TenantConfig_t::localTepIpAddr has to be passed in host byte order.
It is recommended that the loopback interface configured as local gateway should be a dedicated interface to do overlays and must not be used for any other purposes.
When open_l2ol3TenantConfig_t::localTepIpAddr is set to 0: During create operation, no Source TEP or Gateway IP address is associated with the tenant. During update operation, if there is a valid Source TEP already associated with the tenant then all existing tenant tunnels ports, if any, are removed from the hardware. No tenant can no more tunnel traffic to the configured remote TEPs, if any. Unless there is a valid local TEP information is configured for tenant, no tunnel is established to remote TEPs.
It is recommended to identify a dedicated loopback interface for the purpose of local TEP. The loopback interface need to configured with IPv4 address that is intended to be used as the source IP address in IPv4 header while tunneling the tenant traffic. Caller can invoke openapiL2oL3TunnelLocalIPAddrGet() to get a preferred IPv4 address that can be used as Local TEP IP address.
When open_l2ol3TenantConfig_t::localTepIpAddr is set to valid IP address: During create operation, this IP address will be used as the source IP address in the IPv4 header while tunneling the traffic after tenant tunnels are configured. During update operation, if there is a valid Source TEP already associated with the tenant then all existing tenant tunnels ports, if any, are removed from the hardware. New tunnel ports are created for configured tenant remote TEPs, if any, where open_l2ol3TenantConfig_t::localTepIpAddr is used as the source IP address in IPv4 header while tunneling tenant traffic. If a non existing IP address is selected, tunnels will be created in software only. They will not be active or applied in hardware. When a switch IP interface with a matching tenant local TEP IP address becomes available, switch applies the tunnels in hardware for this tenant whose remote TEPs are reachable.
At the time of API invocation, if there is no VLAN created on the switch, then open_l2ol3TenantConfig_t::vlanId parameter can be set to 0. The VLAN parameter can be applied by calling this API with the update method OPEN_L2OL3_CONFIG_UPDATE. Similarly, Local TEP configuration can also be updated.
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantDelete ( openapiClientHandle_t client_handle,
uint32_t  tenant 
)

Deletes specified tenant configuration.

Parameters
[in]client_handleClient handle from registration API.
[in]tenantTenant identifier.
Return values
OPEN_E_NONETenant deleted successfully
OPEN_E_NOT_FOUNDTenant does not exist
OPEN_E_ERRORSwitch mode not configured
OPEN_E_FAILTenant configuration clean up failed
Note
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantGet ( openapiClientHandle_t client_handle,
uint32_t  tenant,
open_l2ol3TenantConfig_t tenantConfig 
)

Get the configuration for a specified tenant.

Parameters
[in]client_handleClient handle from registration API.
[in]tenantTenant identifier.
[out]tenantConfigTenant Configuration Information
Return values
OPEN_E_NONETenant Information get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDTenant does not exist
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantL2FwdEntryAdd ( openapiClientHandle_t client_handle,
uint32_t  tenantId,
open_buffdesc macAddress,
uint32_t  destIntfHandle 
)

Configures a forwarding entry for the specified tenant system.

Parameters
[in]client_handleclient handle from registration API.
[in]tenantIdTenant identifier.
[in]macAddressMAC address of the tenant system.
[in]destIntfHandleDestination handle. This is tenant access handle or tunnel handle.
Return values
OPEN_E_NONEMAC address entry added successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_EXISTSAttempting to create an entry for a MAC address which already exists in the database
OPEN_E_NOT_FOUNDTenant does not exist or destIntfHandle is invalid
OPEN_E_FULLAttempting to create an entry, but already reached maximum number supported MAC entries
OPEN_E_FAILMAC entry add failed
OPEN_E_ERROROverlay functionality is not enabled on the switch
Note
Size of buffer allocated to macAddress->pstart and the value of macAddress->size must be greater than are equal to OPEN_MAC_ADDR_LEN.
API could return OPEN_E_FULL even though there is room in the forwarding table. It is possible that a specific allowed limit has reached. Check various allowed limits for access interfaces and remote tenant systems using openapiL2oL3ResourceLimitsGet() and usage statistics with openapiL2oL3ResourceStatsGet().
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantL2FwdEntryDelete ( openapiClientHandle_t client_handle,
uint32_t  tenantId,
open_buffdesc macAddress 
)

Deletes a forwarding entry of the specified tenant system.

Parameters
[in]client_handleclient handle from registration API.
[in]tenantIdTenant identifier.
[in]macAddressMAC address of the tenant system.
Return values
OPEN_E_NONEForwarding entry deleted
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDEither tenant or forwarding entry was not found
OPEN_E_FAILMAC entry delete failed
Note
Size of buffer allocated to macAddress->pstart and the value of macAddress->size must be greater than are equal to OPEN_MAC_ADDR_LEN.
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantL2FwdEntryGet ( openapiClientHandle_t client_handle,
uint32_t  tenantId,
open_buffdesc macAddress,
open_l2ol3L2FwdEntry_t macEntry 
)

Gets forwarding entry specified by tenant and MAC address.

Parameters
[in]client_handleClient handle from registration API.
[in]tenantIdTenant identifier.
[in]macAddressMAC address to search or get
[out]macEntryMAC entry information, if found
Return values
OPEN_E_NONEForwarding entry retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDForwarding entry was not found
Note
Size of buffer allocated to macAddress->pstart and the value of macAddress->size must be greater than are equal to OPEN_MAC_ADDR_LEN.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantL2FwdEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t  tenantId,
open_buffdesc macAddress,
open_l2ol3L2FwdEntry_t nextMacEntry 
)

Get the next forwarding entry available after the forwarding entry specified by tenant and MAC address.

Parameters
[in]client_handleClient handle from registration API.
[in]tenantIdTenant identifier.
[in]macAddressMAC address to search.
[out]nextMacEntryForwarding entry of the next host.
Return values
OPEN_E_NONENext forwarding entry retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDNext forwarding entry was not found
Note
Size of buffer allocated to macAddress->pstart and the value of macAddress->size must be greater than are equal to OPEN_MAC_ADDR_LEN.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TenantNextGet ( openapiClientHandle_t client_handle,
uint32_t  tenant,
uint32_t *  nextTenant,
open_l2ol3TenantConfig_t nextTenantConfig 
)

Get the next tenant entry for the next numerically higher tenant after the specified tenant.

Parameters
[in]client_handleClient handle from registration API.
[in]tenantTenant identifier.
[out]nextTenantNext Tenant identifier.
[out]nextTenantConfigNext Tenant information.
Return values
OPEN_E_NONENext tenant retrieved successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDNext tenant was not found
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelCapabilitiesGet ( openapiClientHandle_t client_handle,
uint32_t *  capabilities 
)

Get Overlay capabilities of the Switch.

Parameters
[in]client_handleClient handle from registration API.
[out]capabilitiesSupported Overlay tunnel capabilities.
Return values
OPEN_E_NONECapabilities retrieved successfully
OPEN_E_PARAMError in parameter passed
Note
For VXLAN, OPEN_L2OL3_TUNNEL_TYPE_VXLAN is set in 'capabilities'.
For NVGRE, OPEN_L2OL3_TUNNEL_TYPE_NVGRE is set in 'capabilities'.
To indicate no support for overlays, 'capabilities' is set to 0.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelCounterClear ( openapiClientHandle_t client_handle,
uint32_t  tunnelHandle 
)

Clears packet/byte counters of the tenant tunnel specified by tunnel handle.

Parameters
[in]client_handleclient handle from registration API.
[in]tunnelHandleTenant tunnel handle.
Return values
OPEN_E_NONETunnel counter cleared successfully
OPEN_E_NOT_FOUNDTunnel was not found
OPEN_E_FAILFailed to clear hardware tunnel counters
Note
This API returns OPEN_E_NONE:
  • When tunnel is installed in hardware and unicast packet and byte counters are cleared on the hardware tunnel.
  • When tunnel is not yet resolved or not installed in hardware.
Tunnels of different Tenants with matching {source TEP, remote TEP} will share the same tunnel in the hardware. Each tunnel in the hardware is created with individual unicast packet and byte counters. Even though the tunnel handles are different, Tenant tunnels sharing the same hardware tunnel, will always have same tunnel packet/byte counter values since they fetch the counters of the shared hardware tunnel. Similarly, when a clear operation is performed on a tenant tunnel, it would clear the counters on the shared hardware tunnel.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelCounterGet ( openapiClientHandle_t client_handle,
uint32_t  tunnelHandle,
open_l2ol3TunnelStats_t tunnelStats 
)

Gets packet/byte counters of the tenant tunnel specified tunnel handle.

Parameters
[in]client_handleclient handle from registration API.
[in]tunnelHandleTenant tunnel handle.
[out]tunnelStatsTunnel counters information.
Return values
OPEN_E_NONETunnel counter get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDTunnel was not found
OPEN_E_FAILFailed to get hardware tunnel counters
Note
This API returns OPEN_E_NONE:
  • When tunnel is installed in hardware and unicast packet and byte counters are fetched into 'tunnelStats'.
  • When tunnel is not yet resolved or not installed in hardware. It does not update the 'tunnelStats'.
Tunnels of different Tenants with matching {source TEP, remote TEP} will share the same tunnel in the hardware. Each tunnel in the hardware is created with individual unicast packet and byte counters. Even though the tunnel handles are different, Tenant tunnels sharing the same hardware tunnel, will always have same tunnel packet/byte counter values since they fetch the counters of the shared hardware tunnel.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelCreate ( openapiClientHandle_t client_handle,
OPEN_L2OL3_CONFIG_t  configType,
uint32_t  tenant,
uint32_t  remoteIPAddr,
uint32_t *  tunnelHandle 
)

Create a tunnel to a specified remote TEP for a specified tenant.

Parameters
[in]client_handleclient handle from registration API.
[in]configTypeConfiguration type.
[in]tenantTenant identifier.
[in]remoteIPAddrIP address of remote TEP.
[out]tunnelHandleUnique handle to tenant tunnel.
Return values
OPEN_E_NONETunnel creation successful
OPEN_E_PARAMError in parameters passed
OPEN_E_ERROROverlay functionality is not enabled on the switch
OPEN_E_UNAVAILTunnel update operation is not supported
OPEN_E_FULLAttempting to create an entry, but already reached maximum number of tunnels
OPEN_E_EXISTSTunnel to remoteIPAddr exists. API returns the handle to the existing tunnel in 'tunnelHandle'
OPEN_E_NOT_FOUNDTenant does not exist.
Note
Switch must be configured in routing mode and remote TEP 'remoteIPAddr' must be reachable.
'configType' OPEN_L2OL3_TUNNEL_CONFIG_UPDATE is not supported.
'remoteIPAddr' should be passed in host byte order.
A tunnel is created between local TEP tenantConfig.localTepIpAddr and remote TEP identified by 'remoteIPAddr'. Tunnel entry is created in software and a handle to it is returned in 'tunnelHandle'.
Return code OPEN_E_NONE only implies that tunnel has been successfully created in the software. Tunnels are installed in hardware by application and become active only when tenantConfig.localTepIpAddr is an IP address of an active IP/loopback interface and 'remoteIPAddr' (remote TEP) is resolved and becomes/is reachable.
If local TEP is 0 or local TEP IP interface is not active or unavailable then tunnels are not applied to the hardware. When it is becomes active, tunnels are installed to hardware.
Existing tunnels installed to hardware are removed when 'remoteIPAddr' is no more reachable or tenantConfig.localTepIpAddr becomes inactive or unavailable.
For VXLAN tunnels::
  • Switch generates entropy into UDP source port of the VXLAN header by default.
  • By default, application uses OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT as the UDP destination port in outer UDP header while encapsulation. Switch also terminates VXLAN matching the default UDP port. User can configure the VXLAN UDP port number to a preferred UDP port number using openapiL2oL3SwitchVxlanUdpDestPortSet().
Tunnels of different Tenants with matching {source TEP, remote TEP} will share the same tunnel in the hardware. Each unique tunnel, pair of source TEP and remote TEP, in the hardware is created with individual unicast packet and byte counters.
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelDelete ( openapiClientHandle_t client_handle,
uint32_t  tunnelHandle 
)

Delete a tenant tunnel specified by the tunnel handle.

Parameters
[in]client_handleclient handle from registration API.
[in]tunnelHandleUnique handle to the tenant tunnel.
Return values
OPEN_E_NONETunnel deleted successfully
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDTunnel does not exist
OPEN_E_FAILTunnel delete failed
Note
Certain error conditions cause SYSLOG events to be generated.
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelGet ( openapiClientHandle_t client_handle,
uint32_t  tunnelHandle,
open_l2ol3TunnelInfo_t tunnelInfo 
)

Gets tenant tunnel entry from the specified tunnel handle.

Parameters
[in]client_handleclient handle from registration API.
[in]tunnelHandleUnique handle to the tenant tunnel.
[out]tunnelInfoTenant tunnel information.
Return values
OPEN_E_NONETunnel info get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDTunnel does not exists
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.
open_error_t openapiL2oL3TunnelLocalIPAddrGet ( openapiClientHandle_t client_handle,
uint32_t *  ipAddr 
)

Gets the preferred IP address that can be used as Local TEP or local Overlay Gateway IP address.

Parameters
[in]client_handleClient handle from registration API.
[out]ipAddrIPv4 IP address
Return values
OPEN_E_NONEIP address get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILNo IP address available or IP address changed.
Note
The automatic IP addresses selection is done in the following order of preference.
  • Loopback interfaces: A loopback interface that is active and has a valid IP address (not 127.0.0.1) and is not tied to a Physical/LAG Interface/VLAN on the Switch is chosen, if available.
  • Routing interfaces: A valid active routing interface is chosen. This is not a recommended interface to use for Overlays.
The out of band management IP address or management network interface IP address cannot be used as Local TEP for this feature.
The API returned IP address is used until the selected interface goes down or the feature is disabled or a more preferred interface becomes available.
To indicate a change in preferred IP address, API returns failure. It is intended to be called again after the failure to get the new preferred IP address.
It is not a must to use this API. User can configure any known and valid loopback interface IP address that is active on the switch as the local TEP or tunneling gateway interface.
It is recommended that the loopback interface configured as local gateway should be a dedicated interface to do overlays and must not be used for any other purposes.
Returned IP address is in Host Byte Order.
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

open_error_t openapiL2oL3TunnelNextGet ( openapiClientHandle_t client_handle,
uint32_t  tunnelId,
open_l2ol3TunnelInfo_t tunnelInfoNext 
)

Gets tunnel entry for the next numerically higher tunnel handle after the specified tunnel handle.

Parameters
[in]client_handleclient handle from registration API.
[in]tunnelHandleTenant tunnel handle.
[out]tunnelInfoNextNext tunnel entry information.
Return values
OPEN_E_NONENext tunnel entry get successful
OPEN_E_PARAMError in parameter passed
OPEN_E_NOT_FOUNDNext tunnel entry was not found
Note
Certain error conditions cause SYSLOG events to be generated.

OpEN API Version: 1.3

Examples:
l2ol3tunnel_example.c.