Part 2 covered the API. This part covers the ARXML side — using the actual container and parameter names from chapter 10 of the SWS, not the simplified placeholders (EthSwtConfigSet, EthSwtVlan) that served as a working hypothesis in the original topic planning.

The container hierarchy

EthSwt
 └── EthSwtConfig                     (post-build configuration set)
      └── EthSwtPort                  (1..* — one instance per switch port)
           ├── EthSwtPortIdx
           ├── EthSwtPortTrcvRef
           ├── EthSwtPortMacLayerType / -Speed / -SubType
           ├── EthSwtPortRole
           ├── EthSwtPortTimeStampSupport
           ├── EthSwtFramePreemptionEnable
           ├── EthSwtPortMacSecEnabled (+ bypass lists)
           ├── EthSwtPortEgress        (1 — egress behavior)
           └── EthSwtPortIngress       (1 — ingress behavior, incl. VLAN)
                ├── EthSwtPortIngressDefaultVlan
                ├── EthSwtPortIngressDefaultPriority
                ├── EthSwtPortIngressDropUntagged
                ├── EthSwtPortIngressVlanTranslationTable (0..1)
                │    └── EthSwtPortIngressVlanTranslationTableEntry (0..*)
                │         (IngressVlanID → TranslatedVlanID)
                └── EthSwtPortPriorityRegeneration (exactly 8 — one per priority)

Contrary to the original assumption, there is no standalone EthSwtVlan container with a free-standing EthSwtVlanId. VLAN assignment is part of EthSwtPortIngress (default VLAN, ingress VLAN translation), and tagging/membership in the narrower sense is modeled via the ingress filtering in the functional specification (chapter 7.1.7.2.4.1, "Vlan-Membership"), which Part 4 of this series covers in depth.

The key parameters of EthSwtPort

ParameterMeaning

EthSwtPortIdx

Instance ID of the port (0..255) — pre-compile parameter, withAuto = true

EthSwtPortTrcvRef

Reference to the associated EthTrcv port (link to the EthTrcv series); optional — MAC-only ports without a PHY chip leave this empty

EthSwtPortMacLayerType / EthSwtPortMacLayerSpeed / -SubType

Connection type and speed of the port (e.g. ETH_MAC_LAYER_SPEED_1G, _2500M, _5G, _10G — the spec explicitly covers multi-gigabit interfaces)

EthSwtPortRole

Among others ETHSWT_UP_LINK_PORT — relevant for cascaded switches (see Part 1 and this series' Global Time post)

EthSwtPortTimeStampSupport

Enables hardware timestamps for this port (mandatory parameter, multiplicity 1) — the basis for EthTSyn/gPTP

EthSwtFramePreemptionEnable

Frame preemption (IEEE 802.1Q) for this port, default false — details in this series' TSN post

EthSwtPortMacSecEnabled + bypass lists

Enable MACsec directly on the switch port, including bypass for certain EtherTypes/VLANs/destination MAC addresses — covered in a dedicated post in this series

VLAN parameters in EthSwtPortIngress

ParameterMeaning

EthSwtPortIngressDefaultVlan

VLAN ID assigned to an incoming, untagged frame

EthSwtPortIngressDefaultPriority

Default priority (0–7) for incoming frames without a PCP tag

EthSwtPortIngressDropUntagged

Controls whether untagged frames are dropped at this port

EthSwtPortIngressVlanTranslationTable / …​TableEntry

Optional table of (IngressVlanID → TranslatedVlanID) pairs — the incoming VLAN ID is replaced by another one on ingress

EthSwtPortPriorityRegeneration

Exactly 8 entries (one per PCP value 0–7) mapping incoming priority to a regenerated priority — per the SWS always present, because a switch inherently performs priority regeneration

EthSwtPortPriorityRegeneration is a good example of how AUTOSAR necessarily mirrors hardware behavior: the SWS justifies the mandatory multiplicity of exactly 8 entries by stating that "an Ethernet switch always performs a priority regeneration" — so this isn’t an optional software feature, but a piece of switch-fabric behavior that has to be modeled in the ARXML whether you use it or not.

Complete ARXML example (excerpt, simplified)

<ECUC-CONTAINER-VALUE>
  <SHORT-NAME>EthSwtConfig_0</SHORT-NAME>
  <DEFINITION-REF>/AUTOSAR/EthSwt/EthSwtConfig</DEFINITION-REF>
  <SUB-CONTAINERS>

    <ECUC-CONTAINER-VALUE>
      <SHORT-NAME>EthSwtPort_0</SHORT-NAME>
      <DEFINITION-REF>/AUTOSAR/EthSwt/EthSwtConfig/EthSwtPort</DEFINITION-REF>
      <PARAMETER-VALUES>
        <ECUC-NUMERICAL-PARAM-VALUE>
          <DEFINITION-REF>.../EthSwtPortIdx</DEFINITION-REF>
          <VALUE>0</VALUE>
        </ECUC-NUMERICAL-PARAM-VALUE>
        <ECUC-TEXTUAL-PARAM-VALUE>
          <DEFINITION-REF>.../EthSwtPortMacLayerSpeed</DEFINITION-REF>
          <VALUE>ETH_MAC_LAYER_SPEED_1G</VALUE>
        </ECUC-TEXTUAL-PARAM-VALUE>
        <ECUC-REFERENCE-VALUE>
          <DEFINITION-REF>.../EthSwtPortTrcvRef</DEFINITION-REF>
          <VALUE-REF DEST="ECUC-CONTAINER-VALUE">/.../EthTrcv_Port0</VALUE-REF>
        </ECUC-REFERENCE-VALUE>
      </PARAMETER-VALUES>
      <SUB-CONTAINERS>
        <ECUC-CONTAINER-VALUE>
          <SHORT-NAME>EthSwtPortIngress_0</SHORT-NAME>
          <DEFINITION-REF>.../EthSwtPort/EthSwtPortIngress</DEFINITION-REF>
          <PARAMETER-VALUES>
            <ECUC-NUMERICAL-PARAM-VALUE>
              <DEFINITION-REF>.../EthSwtPortIngressDefaultVlan</DEFINITION-REF>
              <VALUE>10</VALUE>
            </ECUC-NUMERICAL-PARAM-VALUE>
            <ECUC-NUMERICAL-PARAM-VALUE>
              <DEFINITION-REF>.../EthSwtPortIngressDropUntagged</DEFINITION-REF>
              <VALUE>false</VALUE>
            </ECUC-NUMERICAL-PARAM-VALUE>
          </PARAMETER-VALUES>
        </ECUC-CONTAINER-VALUE>
      </SUB-CONTAINERS>
    </ECUC-CONTAINER-VALUE>

    <!-- further EthSwtPort instances (1..N) analogous -->

  </SUB-CONTAINERS>
</ECUC-CONTAINER-VALUE>

Typical configuration mistakes

  • Missing or wrong EthSwtPortTrcvRef — the port references no EthTrcv, or the wrong one, so EthSwt_GetSwitchPortMode later reports ETHSWT_E_SYNCPORT2PHY (see Part 2)

  • Incomplete EthSwtPortPriorityRegeneration — fewer or more than 8 entries is a configuration error per spec, not just a style issue

  • EthSwtPortIngressDropUntagged set incorrectly — untagged management or boot traffic gets dropped unintentionally

  • Confusing default VLAN with VLAN translation — a default VLAN only applies to untagged frames, whereas a translation table entry acts on frames that are already tagged with a matching IngressVlanID

Series

PartTopicStatus

1

Fundamentals, SWS & architecture

done

2

API & initialization

done

3

ARXML configuration

this post

4

VLAN management, mirroring & diagnostics

upcoming


Next in the EthSwt series: EthSwt Part 4 — VLAN Management, Mirroring & Diagnostics