RDMA over Converged Ethernet (RoCE) Bare Metal Provisioning

https://bugs.launchpad.net/ironic/+bug/2160651

To enable RDMA (Remote Direct Memory Access) over Converged Ethernet (RoCE) workloads on bare metal, Ironic needs to propagate switch port QoS configuration from trait-based networking rules through the Neutron binding profile to networking-generic-switch.

The RDMA fabric is modeled as a standard Neutron network. Each server has separate physical NICs for IP and RDMA traffic, each mapped to its own physical_network. Users select a Nova flavor, and the system handles scheduling, NIC firmware configuration, and switch port QoS policy application.

Note

This specification uses RoCE as shorthand for RoCEv2’s use of UDP packets on a common physical subnet. Converged adapters with hardware RDMA offload are not required – software RoCE (kernel rdma_rxe) works with any Ethernet NIC, though hardware offload is preferred for performance. The design is vendor-neutral: any switch with lossless Ethernet support, and any NIC with RDMA-capable hardware or software support for RDMA, will work.

Problem description

Operators want to offer RDMA-capable bare metal alongside standard compute. The typical configuration has two NICs per server – one for IP traffic, one dedicated to RDMA – each cabled to its own switch port and physical_network.

The core pieces already exist in Ironic: deploy templates for device configuration, trait-based networking for port-to-network mapping, and configdrive network metadata for OS interface setup.

What is missing is the ability to propagate switch port QoS configuration – specifically a named QoS policy, PFC, and storm control settings – from the trait-based networking rules through the binding profile to the switch management plugin. Without this, operators must manually pre-configure every RDMA switch port and cannot dynamically assign lossless QoS when a port is bound for RDMA traffic.

Proposed change

To facilitate this, Ironic must propagate specific switch QoS configuration parameters to the ML2 driver as part of the Neutron binding profile.

How Ironic Models This

Each server has two physically separate NICs, one for IP traffic and one for RDMA, each with its own cable and switch port. The two fabrics may share switches (isolated by VLAN, with the lossless QoS policy applied only to RDMA ports) or use separate physical switches.

One physical NIC = one Ironic port = one cable = one VIF = one Neutron network. Each Ironic port represents exactly one physical network connection, with its own MAC address, physical_network, and local_link_connection (see Recipe Step 2 below for a concrete example of both ports). The two ports’ differing physical_network values tell the ML2 plugin which switch to configure; when Ironic binds each port to its Neutron network, networking-generic-switch configures each switch port independently.

Fabric assignment is deterministic: a network lands on a fabric solely because a matching Ironic port – selected by the trait-based networking filter – carries the corresponding physical_network and local_link_connection, not because of scheduler weighting. The same pattern generalizes to any “this traffic belongs on that fabric” requirement (e.g. isolating storage traffic).

Note

This design targets clusters of bare metal nodes that communicate over the RDMA fabric. It is possible for virtual machines to participate on the same Neutron network, but doing so forces the traffic to be bridged through OVN, which defeats the point of a dedicated lossless fabric and is not advised. Deployments needing VM participation should treat that as a distinct, separate design concern – the recommended model here is to hand off a cluster of bare metal nodes.

Switch Port Configuration for Lossless Ethernet

Today, switch management plugins only configure VLAN assignment. RoCE requires additional per-port QoS settings (DSCP-to-traffic-class mapping, PFC, ETS, ECN, jumbo MTU, storm control disabled) to establish a lossless path. Operators encapsulate these in a named QoS policy on the switch (e.g., roce-ingress). The DSCP and CoS values within that policy are operator-chosen – DSCP 26 (AF31) to CoS 3 is conventional but not mandated. The host-side NIC must mark RoCE packets with the matching DSCP value, either via vendor NIC firmware configuration for hardware offload or via OS-level TOS configuration for software RoCE (rdma_rxe). Software RoCE defaults to TOS 0 (best-effort); operators should ensure tenant images or workload configuration explicitly set the DSCP value to match the switch QoS policy.

Trait-Based Networking Action Properties

The TraitAction dataclass leverages the relatively new “params” field, to convey additional parameters as part of the Neutron binding profile:

  • qos_policy: Name of a QoS policy-map pre-configured on the switch.

  • priority_flow_control: Boolean, enables PFC.

  • storm_control: Boolean, controls storm control.

networking-generic-switch applies these on bind and restores switch defaults on unbind (leaving PFC enabled on a non-RDMA port causes unexpected pause frames). Each switch vendor (Cisco NX-OS, Arista EOS, Dell OS10, Juniper Junos) needs its own command templates for this. Port MTU is set from the Neutron network MTU on bind via change 984832, already merged.

See Recipe Step 4 below for a full TBN YAML example. The qos_policy name used there references a policy already configured on the operator’s switches – the DSCP-to-CoS mapping, ETS bandwidth allocation, ECN thresholds, and DCBX settings live entirely within that switch-side policy, which Ironic does not need to know or manage. This model is not RDMA-specific – any use case requiring per-port QoS policy on the switch can use the same mechanism.

Example Switch QoS Policy

The policy name must match the qos_policy value in the TBN action. Syntax is vendor-specific; Cisco NX-OS is shown here as an example:

class-map type qos match-all roce-traffic
  match dscp 26
policy-map type qos roce-ingress
  class roce-traffic
    set qos-group 3

Note

Some switch platforms require explicit per-priority PFC statements as part of the same policy (e.g., Arista EOS’s priority-flow-control priority 3 no-drop). The traffic class number in such statements must match the class assigned in the policy-map above.

Recipe: Complete Operator Setup

Prerequisites:

  • Switches with a lossless QoS policy pre-configured for the RDMA traffic class.

  • Servers with RDMA-capable NICs (hardware offload or software RoCE).

  • An OS image containing the RDMA software stack. Build this using diskimage-builder with the rdma-roce element (see Dependencies), or using Packer, or your preferred tooling.

Step 1: Create the Neutron networks

The tenant network is a standard Neutron network (may already exist). The RDMA network needs a jumbo MTU and the rdma tag for TBN matching:

openstack network create rdma-net
openstack network set rdma-net --mtu 9000 --tag rdma

# RDMA subnet: static IPs, no DHCP, no gateway
openstack subnet create rdma-subnet \
  --network rdma-net \
  --subnet-range 10.0.100.0/24 \
  --no-dhcp \
  --no-gateway \
  --allocation-pool start=10.0.100.10,end=10.0.100.254

Step 2: Register nodes with RDMA capability

For each server (already registered with the BAREMETAL_RDMA resource class), add the RDMA trait and create one Ironic port per physical NIC:

openstack baremetal node add trait rdma-node-01 \
  CUSTOM_RDMA_ROCE

# Port A: Standard IP NIC
# This port is PXE-enabled (used for provisioning)
openstack baremetal port create aa:bb:cc:dd:ee:f0 \
  --node rdma-node-01 \
  --physical-network tenant-physnet \
  --pxe-enabled \
  --local-link-connection switch_id=aa:bb:cc:00:00:01 \
  --local-link-connection port_id=Ethernet1/1 \
  --local-link-connection switch_info=ip-leaf-01

# Port B: Dedicated RDMA NIC (different adapter,
# different cable, potentially different switch)
openstack baremetal port create 11:22:33:44:55:66 \
  --node rdma-node-01 \
  --physical-network rdma-physnet \
  --category CUSTOM_RDMA \
  --local-link-connection switch_id=dd:ee:ff:00:00:01 \
  --local-link-connection port_id=Ethernet1/5 \
  --local-link-connection switch_info=rdma-leaf-01

Each port represents a separate physical NIC with its own MAC address, its own cable, and its own switch port. The ML2 mechanism driver configures each switch port independently.

Step 3: Create a deploy template for device tuning (optional)

With the network port attachment logic in place, operators may separately define deploy steps which apply firmware settings to devices or even enable firmware upgrades in the deploy steps model – however that level of detail is not required when focusing on the base network modeling that is the needful prerequisite here. Such a template associates the CUSTOM_RDMA_ROCE trait with whatever NIC firmware or BIOS steps the operator’s hardware requires; see the deploy templates and deploy steps documentation for the mechanics.

Step 4: Configure trait-based networking

Create the YAML configuration file on the Ironic conductor that maps the CUSTOM_RDMA_ROCE trait to port-matching rules. The file location is set in ironic.conf via [conductor]trait_based_networking_config_file:

# /etc/ironic/trait_networking.yaml
CUSTOM_RDMA_ROCE:
  actions:
    - action: attach_port
      filter: >-
        port.category == 'CUSTOM_RDMA'
        && network.tags == 'rdma'
      params:
        qos_policy: roce-ingress
        storm_control: false
        priority_flow_control: true

This rule says: when a VIF attachment is requested for a node with the CUSTOM_RDMA_ROCE trait, find a port whose category is CUSTOM_RDMA and attach it to the network tagged rdma. The qos_policy, priority_flow_control, and storm_control properties are included in the Neutron binding profile and applied to the physical switch port by networking-generic-switch. Ports without the CUSTOM_RDMA category (i.e., the standard IP port) are handled by the default port-scheduling rules.

Enable trait-based networking in ironic.conf:

[conductor]
enable_trait_based_networking = true
trait_based_networking_config_file = \
  /etc/ironic/trait_networking.yaml

Note

Trait-based networking rules are currently managed through this YAML configuration file on the conductor host. In multi-conductor HA deployments, the file must be kept in sync across all hosts.

Step 5: Tie it together and deploy

The flavor’s resource class and trait drive scheduling, the deploy template, and the TBN rule; the user then requests it and attaches both networks:

openstack flavor create bm.rdma.large \
  --ram 131072 --disk 500 --vcpus 64 \
  --property resources:CUSTOM_BAREMETAL_RDMA=1 \
  --property trait:CUSTOM_RDMA_ROCE=required

openstack server create \
  --flavor bm.rdma.large \
  --image ubuntu-24.04-rdma \
  --network tenant-net \
  --network rdma-net \
  my-rdma-node

Deployment then proceeds normally: TBN attaches the rdma-net VIF to Port B and the tenant-net VIF to Port A, and networking-generic-switch applies the RDMA port’s QoS policy, PFC, and storm control settings when it binds.

Alternatives

  • Pre-configured NIC firmware on all nodes: Works for homogeneous RDMA-only fleets, but blocks reuse for non-RDMA workloads without a manual firmware reset.

  • InfiniBand instead of RoCE: Better RDMA performance, but requires a dedicated IB fabric that doesn’t scale like Ethernet.

Data model impact

None. This specification relies on the vendor and category fields being added to the Port object by the trait-based networking specification. No additional data model changes are proposed.

State Machine Impact

None.

REST API impact

None.

Client (CLI) impact

“openstack baremetal” CLI

No changes.

“openstacksdk”

No changes.

RPC API impact

None.

Driver API impact

None.

Nova driver impact

None. The existing mechanism of passing traits from flavors to Ironic’s instance_info is sufficient. Nova’s VIF attachment flow (attach VIFs before triggering deployment) provides the correct ordering for trait-based networking.

Ramdisk impact

None.

Security impact

  • NIC firmware and BIOS settings: Deploy templates are admin-only resources. A misconfigured template could disable network security features (e.g., turning off SR-IOV isolation) or degrade system stability (e.g., disabling ECC memory). Operators must review deploy template contents, and potentially enhance other templates to undo any specific changes which may be changed by their templates leveraged for RDMA.

  • RDMA network isolation: When the RDMA fabric uses dedicated switches, physical isolation provides the strongest boundary. When sharing switches with IP traffic, Neutron’s VLAN segmentation provides L2 isolation enforced by the switch hardware. In either case, RDMA does not have application-level authentication by default – any process on the node with access to the RDMA device can communicate with any other node on the same RDMA segment. Operators should scope RDMA networks to trusted tenants or use RoCEv2’s DSCP-based marking with switch ACLs to restrict access.

Other end user impact

End users interact with this feature solely through flavor selection and network attachment. The RDMA configuration details are abstracted behind traits and deploy templates managed by operators.

Scalability impact

NIC firmware and BIOS changes add 3-10 minutes of deployment time (for reboot cycles). This is per-node and does not affect conductor scalability or introduce additional network/database traffic.

Performance Impact

None Anticipated

Other deployer impact

See the Recipe above. The [conductor] options it uses are pre-existing from trait-based networking, not new.

Developer impact

None

Implementation

Assignee(s)

Primary assignee:

Julia Kreger (TheJulia) <juliaashleykreger@gmail.com>

Other contributors:

None

Work Items

  • Ironic TBN: Add the three new TraitAction fields described above.

  • networking-generic-switch: Apply/restore the QoS policy-map, PFC, and storm control on bind/unbind, with per-vendor command templates (Cisco NX-OS, Arista EOS, Dell OS10, Juniper Junos).

Dependencies

  • diskimage-builder rdma-roce element: Produces tenant OS images with the RoCEv2 software stack pre-installed. Proposed as change 990417.

Testing

Unit tested heavily; end-to-end testing in upstream CI isn’t practical given the hardware requirements. The cross-service interface – port binding information passed to Neutron – is otherwise stable and already tested.

Upgrades and Backwards Compatibility

All changes are additive and opt-in. The new TBN action properties are optional fields with None defaults – existing configurations are unaffected. No database migrations or API changes.

Documentation Impact

Ironic’s admin documentation should cover the end-to-end RDMA workflow, focused on the operator-facing pattern of use rather than Ironic’s internals.

References