# UNOS switch port configuration
#
# Read from /etc/network/ports, or if that file is absent, from every
# /etc/network/ports.d/*.cnf drop-in.
#
# SCOPE
#
# This file covers physical-layer properties of switch ports only. Anything
# the Linux kernel already models on a netdev belongs in
# /etc/network/interfaces.d/ and is applied by ifup:
#
#   addresses, gateway, netmask, metric ... iface <name> inet static
#   mtu .................................. mtu <bytes>
#   mac address .......................... hwaddress <addr>
#   admin state .......................... auto / allow-hotplug / ifdown
#   vlans ................................ iface swp1.100
#
# linkd learns all of that from netlink and mirrors it into the ASIC, so
# configuring it here as well would create two sources of truth for one value.
# Directives belonging to ifupdown are rejected rather than ignored.
#
# DIRECTIVES
#
#   speed     <mbit>            port speed in Mbit/s
#   fec       off|auto|rs|baser forward error correction
#   autoneg   on|off
#   breakout  <profile>         e.g. 4x25g -- splits one cage into several
#                               ports. Structural: it decides which netdevs
#                               exist at all, so it is applied before ifup runs.
#
# On generic x86_64 there is no ASIC and none of these apply; the kernel
# backend ignores them and Linux does the forwarding.

source ports.d/*.cnf

port swp1
  speed 25000
  fec rs
  autoneg off

port swp2
  speed 25000
  fec rs
  autoneg off

# 100G uplink
port swp49
  speed 100000
  fec rs

# 100G cage split into 4x25G -- yields swp50s0..swp50s3
port swp50
  breakout 4x25g
  speed 25000
  fec rs
