DEENESPTFRRUARHIKOZHNL

Ethernet Switch Driver (EthSwt)

ModulEthSwt (Ethernet Switch Driver)
BSW-Modul-ID89
Standard-Header#include "EthSwt.h"
SWS-SpezifikationAUTOSAR_CP_SWS_EthernetSwitchDriver.pdf, AUTOSAR_SWS_EthernetSwitchDriver.pdf
Umfang340 Records · 56 Snippets
ClusterEthernet-Stack

Ethernet Switch Driver (EthSwt)

AUTOSAR Classic Communication HW Abstraction-Modul Ethernet Switch Driver (EthSwt, Spezifikation: AUTOSAR_CP_SWS_EthernetSwitchDriver.pdf, AUTOSAR_SWS_EthernetSwitchDriver.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

函数 EthSwt_Init [SWS_EthSwt_00006] 📄 PDF

void EthSwt_Init(const EthSwt_ConfigType* CfgPtr);

Initializes the Ethernet Switch Driver

函数 EthSwt_GetPortMacAddr [SWS_EthSwt_00060] 📄 PDF

Std_ReturnType EthSwt_GetPortMacAddr(uint8 SwitchIdx, const uint8* MacAddrPtr, uint8* PortIdxPtr);

Obtains the port over which this MAC-address at the indexed switch can be reached. The result might be used for a DHCP-server which will need the port/MAC-resolution. If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK.

函数 EthSwt_StoreConfiguration [SWS_EthSwt_00086] 📄 PDF

Std_ReturnType EthSwt_StoreConfiguration(uint8 SwitchIdx);

Trigger the storage/reset of the configuration of the learned MAC/Port tables of a switch in a persistent manner and will be used by e.g. CDD.

函数 EthSwt_ResetConfiguration [SWS_EthSwt_00091] 📄 PDF

Std_ReturnType EthSwt_ResetConfiguration(uint8 SwitchIdx);

The function shall request to reset and store the configuration of the learned MAC/Port tables of a Ethernet switch in a persistent manner. This could be used by e.g. a CDD.

函数 EthSwt_GetArlTable [SWS_EthSwt_00111] 📄 PDF

Std_ReturnType EthSwt_GetArlTable(uint8 switchIdx, uint16* numberOfElements, Eth_MacVlanType* arlTableListPointer);

Obtains the address resolution table of a switch and copies the list into a user provided buffer. The function will copy all or numberOfElements into the output list. If input value of numberOf Elements is 0 the function will not copy any data but only return the number of valid entries in the cache. arlTableListPointer may be NULL_PTR in this case.

函数 EthSwt_MainFunction [SWS_EthSwt_00114] 📄 PDF

void EthSwt_MainFunction(void);

Service to support asynchronous behavior of API calls

函数 EthSwt_SetMacLearningMode [SWS_EthSwt_00182] 📄 PDF

Std_ReturnType EthSwt_SetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType MacLearningMode);

Sets the MAC learning mode in one of the tree modes: 1.) HW learning enabled, 2.) Hardware learning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes.

函数 EthSwt_GetMacLearningMode [SWS_EthSwt_00187] 📄 PDF

Std_ReturnType EthSwt_GetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningMode);

Returns the MAC learning mode, i.e. 1.) HW learning enabled, 2.) Hardware learning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes

函数 <EthSwtPersistentConfigurationResultCallback> [SWS_EthSwt_00193] 📄 PDF

void <EthSwtPersistentConfigurationResultCallback>(NvM_RequestResultType JobResult);

Job end notification of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration

函数 EthSwt_GetTxErrorCounterValues [SWS_EthSwt_91000] 📄 PDF

Std_ReturnType EthSwt_GetTxErrorCounterValues(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxErrorCounterValuesType* TxStats);

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643 defined with Eth_TxErrorCounterValuesType, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

函数 EthSwt_GetTxStats [SWS_EthSwt_91001] 📄 PDF

Std_ReturnType EthSwt_GetTxStats(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxStatsType* TxStats);

Returns the list of Transmission Statistics out of IETF RFC1213 defined with Eth_TxStatsType, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

函数 EthSwt_CheckWakeup [SWS_EthSwt_91003] 📄 PDF

Std_ReturnType EthSwt_CheckWakeup(uint8 SwitchIdx);

API is called by EthIf. The Ethernet switch driver request to check for a wake-up at all Ethernet switch ports which reference an EthTrcv. For those Ethernet switch ports the call is forwarded to the referenced EthTrcv. The function could be called in context of an interrupt service routine or on task level Note: Interrupt service routine consuming time has to be considered, since all EthSwtPorts of the maintained Ethernet switches has to be checked. Therefore the call is forwarded to the referred EthTrcv where the request to check for wake-up is stored. The check of the Ethernet hardware is done asynchronously in the context of the EthTrcv_MainFunction.

函数 EthSwt_EthRxFinishedIndication [SWS_EthSwt_91005] 📄 PDF

Std_ReturnType EthSwt_EthRxFinishedIndication(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Indication for a finished receive process for a specific Ethernet frame, which results in providing the management information retrieved during EthSwt_EthRxProcessFrame().

函数 EthSwt_EthTxPrepareFrame [SWS_EthSwt_91006] 📄 PDF

Std_ReturnType EthSwt_EthTxPrepareFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr);

Prepares the Ethernet frame for common Ethernet communication (frame shall be handled by switch according to the common address resolution behavior) and stores the information for processing of EthSwt_EthTxFinishedIndication().

函数 EthSwt_EthTxAdaptBufferLength [SWS_EthSwt_91007] 📄 PDF

void EthSwt_EthTxAdaptBufferLength(uint16* LengthPtr);

Modifies the buffer length to be able to insert management information.

函数 EthSwt_SetMgmtInfo [SWS_EthSwt_91008] 📄 PDF

Std_ReturnType EthSwt_SetMgmtInfo(uint8 CtrlIdx, Eth_BufIdxType BufIdx, const EthSwt_MgmtInfoType* MgmtInfoPtr);

Extends the Ethernet frame prepared previously by EthSwt_EthTxPrepareFrame() with the management information to achieve transmission only on specific ports.

函数 EthSwt_RunPortCableDiagnostic [SWS_EthSwt_91011] 📄 PDF

Std_ReturnType EthSwt_RunPortCableDiagnostic(uint8 SwitchIdxIdx, uint8 PortIdx);

Trigger the cable diagnostics of the given Ethernet Switch port (PortIdx) by calling EthTrcv_Run CableDiagnostic of the referenced Ethernet transceiver.

函数 EthSwt_SetForwardingMode [SWS_EthSwt_91013] 📄 PDF

Std_ReturnType EthSwt_SetForwardingMode(uint8 SwitchIdx, boolean mode);

Configures switch to start or stop forwarding for all ports. This API call may be used during switch configuration verification.

函数 EthSwt_GetPortSignalQuality [SWS_EthSwt_91014] 📄 PDF

Std_ReturnType EthSwt_GetPortSignalQuality(uint8 SwitchIdx, uint8 PortIdx, uint32* SignalQualityPtr);

The function retrieves the signal quality of the link of the indexed Ethernet switch port. If no transceiver is referenced the signal quality shall be set to 0xFFFFFFFF.

函数 EthSwt_GetSwitchIdentifier [SWS_EthSwt_91016] 📄 PDF

Std_ReturnType EthSwt_GetSwitchIdentifier(uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

Obtain the Organizationally Unique Identifier that is given by the IEEE of the indexed Ethernet switch. This function shall provide the OUI of Ethernet switch. The OUI has a size of 24 bit. If a ethernet switch can provide the OUI the 8 most significant bits of the OUI shall be set to 0x00xxxxxx. If a Ethernet switch can not provide the OUI the 8 most significant bits of the OUI shall be set to 0xFFxxxxxx.

函数 EthSwt_WritePortMirrorConfiguration [SWS_EthSwt_91018] 📄 PDF

Std_ReturnType EthSwt_WritePortMirrorConfiguration(uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Store the given port mirror configuration in a shadow buffer in the Ethernet switch driver for the given MirroredSwitchIdx.

函数 EthSwt_ReadPortMirrorConfiguration [SWS_EthSwt_91019] 📄 PDF

Std_ReturnType EthSwt_ReadPortMirrorConfiguration(uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Obtain the port mirror configuration of the given Ethernet switch.

函数 EthSwt_GetPortMirrorState [SWS_EthSwt_91021] 📄 PDF

Std_ReturnType EthSwt_GetPortMirrorState(uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType* PortMirrorStatePtr);

Obtain the current status of the port mirroring for the indexed Ethernet switch port

函数 EthSwt_SetPortMirrorState [SWS_EthSwt_91022] 📄 PDF

Std_ReturnType EthSwt_SetPortMirrorState(uint8 MirroredSwitchIdx, EthSwt_PortMirrorStateType PortMirrorState);

Request to set the given port mirroring state of the port mirror configuration for the given Ethernet switch.

函数 EthSwt_GetPortCableDiagnosticsResult [SWS_EthSwt_91025] 📄 PDF

Std_ReturnType EthSwt_GetPortCableDiagnosticsResult(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_CableDiagResultType* ResultPtr);

Retrieves the cable diagnostics result of the indexed Ethernet switch port respectively the referenced Ethernet Transceiver Driver.

函数 EthSwt_PortEnableTimeStamp [SWS_EthSwt_91028] 📄 PDF

Std_ReturnType EthSwt_PortEnableTimeStamp(uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfoPtr);

Activates egress time stamping on a dedicated message object on a dedicated port of a Switch if EthSwtPortTimeStampSupport is set to TRUE for this port. The selective activation of dedicated message objects for time stamping reduces the number of notification calls only to the required calls. Some HW does store once the egress time stamp marker and some HW needs it always before transmission. There will be no disabled functionality, due to the fact, that the message type is always "time stamped" by network design.

函数 <GetCfgDataRawDone> [SWS_EthSwt_91032] 📄 PDF

void <GetCfgDataRawDone>(uint8 SwitchIdx);

The call of the function EthSwt_GetCfgDataRaw() triggers a asynchrony read of a certain memory section of the Ethernet switch driver. If the read is done, the configured callout function <GetCfgDataRawDone> shall be called]

函数 EthSwt_DeletePortMirrorConfiguration [SWS_EthSwt_91034] 📄 PDF

Std_ReturnType EthSwt_DeletePortMirrorConfiguration(uint8 MirroredSwitchIdx);

Delete the stored port mirror configuration of the given MirroredSwitchIdx. If no port mirror configuration was found for the given MirroredSwitchIdx, the return value shall be E_OK.

函数 EthSwt_GetSwitchPortWakeupReason [SWS_EthSwt_91040] 📄 PDF

Std_ReturnType EthSwt_GetSwitchPortWakeupReason(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType Reason);

This function obtains the wake up reasons of the the indexed Ethernet switch port by calling Eth Trcv_GetBusWuReason(...) of the referenced EthTrcv

函数 EthSwt_SetStreamState [SWS_EthSwt_91041] 📄 PDF

void EthSwt_SetStreamState(uint8 SwitchIdx, uint8 StreamHandleIdx, boolean StreamActivityStatus);

This function is called by an upper layer application (e.g. diagnostic application) via the EthIf module to control the activity status of a configured stream (given with StreamHandleIdx) within an dedicated Ethernet switch (given with SwitchIdx). Tags: atp.Status=draft

函数 EthSwt_GetStreamHandleIdxStatistics [SWS_EthSwt_91042] 📄 PDF

void EthSwt_GetStreamHandleIdxStatistics(uint8 SwitchIdx);

Requests the bucket counter values from the switch Tags: atp.Status=draft

函数 EthSwt_GetMaxFIFOBufferFillLevel [SWS_EthSwt_91050] 📄 PDF

Std_ReturnType EthSwt_GetMaxFIFOBufferFillLevel(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);

The function retrieves the maximum amount of allocated FIFO buffer of the indexed Ethernet switch egress port. If the Ethernet switch hardware does not support Ethernet switch port based maximal FIFO buffer level, the content of SwitchPortEgressFifoBufferLevelPtr shall be set to 0xFFFFFFFF. This API may be called by e.g. a CDD.

函数 EthSwt_GetPortMacAddrVlan [SWS_EthSwt_91051] 📄 PDF

Std_ReturnType EthSwt_GetPortMacAddrVlan(uint8 SwitchIdx, const uint8* MacAddrPtr, const uint16* VlanIdPtr, uint32* PortBitMapPtr);

Obtains an Ethernet switch port bit map, where the given MAC-address with respect to the given VLAN-ID is assigned to. The return argument PortBitMapPtr points to uint32 value which shall be handled as Ethernet switch port bit map. Each bit of the Ethernet switch port bit map represents an EthSwtPortIdx, where the least significant bit (bit 0) represents EthSwitchPortIdx 0 and most significant bit (bit 32) represents EthSwitchPortIdx 31 (e.g. 0x0001 == EthSwitch PortIdx 0 is set; 0x8005 == EthSwitchPortIdx 0, 2 and 31 are set).

函数 EthSwt_BackgroundTask [SWS_EthSwt_91104] 📄 PDF

void EthSwt_BackgroundTask(void);

The background task should be scheduled as often as possible when no other task runs. It may be used for switch and port initialization in case the EthSwt_Init function needs too much time.

函数 EthSwt_PortLinkStateRequest [SWS_EthSwt_91123] 📄 PDF

Std_ReturnType EthSwt_PortLinkStateRequest(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_LinkStateType PortLinkState);

Request a link state by calling EthTrcv_TransceiverLinkStateRequest with the TrcvIdx of the Ethernet transceiver which is referenced by the Ethernet Switch port (PortIdx).

函数 EthSwt_MacSecUpdateSecY [SWS_EthSwt_91124] 📄 PDF

Std_ReturnType EthSwt_MacSecUpdateSecY(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_MacSecConfigType* MACsecCfgPtr, uint64 TxSci);

Requests the Ethernet Switch to update the SecY/PAC of the PHY with the provided parameters. A Transmission Secure Channel with the provided SCI shall be configured during the first call. A pointer to a MACsec Basic Parameters Configuration file shall be provided to create the Secure Channel. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecInitRxSc [SWS_EthSwt_91125] 📄 PDF

Std_ReturnType EthSwt_MacSecInitRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests the Ethernet Switch Driver to configure a Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecResetRxSc [SWS_EthSwt_91126] 📄 PDF

Std_ReturnType EthSwt_MacSecResetRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests the Ethernet Switch Driver to reset to default the MACsec values of the Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecAddTxSa [SWS_EthSwt_91127] 📄 PDF

Std_ReturnType EthSwt_MacSecAddTxSa(EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Requests the Ethernet Switch Driver to create a Transmission Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecUpdateTxSa [SWS_EthSwt_91128] 📄 PDF

Std_ReturnType EthSwt_MacSecUpdateTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, boolean Active);

Requests the Ethernet Switch Driver to update the Transmission Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecDeleteTxSa [SWS_EthSwt_91129] 📄 PDF

Std_ReturnType EthSwt_MacSecDeleteTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to remove the Transmission Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecAddRxSa [SWS_EthSwt_91130] 📄 PDF

Std_ReturnType EthSwt_MacSecAddRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Request the Ethernet Switch Driver to create a Reception Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecUpdateRxSa [SWS_EthSwt_91131] 📄 PDF

Std_ReturnType EthSwt_MacSecUpdateRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, boolean Active);

Request the Ethernet Switch Driver to update the Reception Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecDeleteRxSa [SWS_EthSwt_91132] 📄 PDF

Std_ReturnType EthSwt_MacSecDeleteRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to remove the Reception Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecGetTxSaNextPn [SWS_EthSwt_91133] 📄 PDF

Std_ReturnType EthSwt_MacSecGetTxSaNextPn(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64* NextPnPtr);

Request the Ethernet Switch Driver to return the Packet Number that is used for the next packet in the given Transmission Secure Association. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecGetMacSecStats [SWS_EthSwt_91134] 📄 PDF

Std_ReturnType EthSwt_MacSecGetMacSecStats(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Request the Ethernet Switch Driver to provide MACsec statistics. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecUpdateSecYNotification [SWS_EthSwt_91135] 📄 PDF

void EthSwt_MacSecUpdateSecYNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Callback to notify that EthSwt_MacSecUpdateSecY finished. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecAddTxSaNotification [SWS_EthSwt_91136] 📄 PDF

void EthSwt_MacSecAddTxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Callback to notify that EthSwt_MacSecAddTxSa finished. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecAddRxSaNotification [SWS_EthSwt_91137] 📄 PDF

void EthSwt_MacSecAddRxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Callback to notify that EthSwt_MacSecAddRxSa finished. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecGetMacSecStatsNotification [SWS_EthSwt_91138] 📄 PDF

void EthSwt_MacSecGetMacSecStatsNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_Stats_SecYType* MacSecStats);

Callback to notify that EthSwt_MacSecGetMacSecStats finished and provide the requested statistics. Tags: atp.Status=DRAFT

函数 EthSwt_MacSecSetControlledPortEnabled [SWS_EthSwt_91139] 📄 PDF

Std_ReturnType EthSwt_MacSecSetControlledPortEnabled(const EthSwt_MgmtInfoType* MgmtInfoPtr, boolean ControlledPortEnabled);

Requests to set the Controlled Port enabled parameter of a PAE. Tags: atp.Status=DRAFT

类型 EthSwt_StateType [SWS_EthSwt_00123] 📄 PDF

Status supervision used for Development Error Detection. The state shall be available for debugging.

类型 EthSwt_MgmtInfoType [SWS_EthSwt_91002] 📄 PDF

Type for holding the management information received/transmitted on Switches (ports).

类型 EthSwt_PortMirrorCfgType [SWS_EthSwt_91017] 📄 PDF

The EthSwt_PortMirrorCfgType specify the port mirror configuration which is set up per Ethernet switch. The configuration is written to the Ethernet switch driver by calling EthSwt_WritePortMirror Configuration. One port mirror configuration is maintained per Ethernet Switch.

类型 EthSwt_PortMirrorStateType [SWS_EthSwt_91020] 📄 PDF

Type to request or obtain the port mirroring state (enable/disable) for a particular port mirror configuration per Ethernet switch.

类型 EthSwt_MgmtObjectValidType [SWS_EthSwt_91036] 📄 PDF

Will be set from EthSwt and marks EthSwt_MgmtObject as valid or not. So the upper layer will be able to detect inconsistencies.

类型 EthSwt_MgmtObjectType [SWS_EthSwt_91037] 📄 PDF

Provides information about all struct member elements. The ownership gives information whether EthSwt has finished its activities in providing all struct member elements.

requirement SWS_EthSwt_00001 [SWS_EthSwt_00001] 📄 PDF

Type of error Related error code Error value Invalid switch index ETHSWT_E_INV_SWITCH_IDX 0x01 EthSwt module was not initialized ETHSWT_E_UNINIT 0x02 Invalid pointer in parameter list ETHSWT_E_PARAM_POINTER 0x03 Invalid API which is not available by another module ETHSWT_E_INV_API 0x05 Invalid switch port index ETHSWT_E_INV_SWITCHPORT_IDX 0x06 Invalid Controller Index ETHSWT_E_INV_CTRL_IDX 0x07 Invalid input parameter ETHSWT_E_INV_PARAM 0x08 Invalid configuration ETHSWT_E_INIT_FAILED 0x09

requirement SWS_EthSwt_00002 [SWS_EthSwt_00002] 📄 PDF

Module Header File Imported Type Rte_Dem_Type.h Dem_EventIdType Dem Rte_Dem_Type.h Dem_EventStatusType Eth_GeneralTypes.h Eth_BufIdxType Eth_GeneralTypes.h Eth_CounterType Eth_GeneralTypes.h Eth_DataType Eth_GeneralTypes.h Eth_MacVlanType Eth_GeneralTypes.h Eth_ModeType Eth_GeneralTypes.h Eth_RxStatsType Eth_GeneralTypes.h Eth_TimeStampType Eth_GeneralTypes.h Eth_TxErrorCounterValuesType Eth Eth_GeneralTypes.h Eth_TxStatsType Eth_GeneralTypes.h EthTrcv_BaudRateType Eth_GeneralTypes.h EthTrcv_CableDiagResultType Eth_GeneralTypes.h EthTrcv_DuplexModeType Eth_GeneralTypes.h EthTrcv_LinkStateType Eth_GeneralTypes.h EthTrcv_PhyLoopbackModeType Eth_GeneralTypes.h EthTrcv_PhyTestModeType Eth_GeneralTypes.h EthTrcv_PhyTxModeType EthTrcv Eth_GeneralTypes.h EthTrcv_WakeupReasonType Mka.h Mka_ConfidentialityOffsetType (DRAFT) Mka.h Mka_MacSecConfigType (DRAFT) Mka.h Mka_SakKeyPtrType (DRAFT) Mka.h Mka_Stats_Rx_ScType (DRAFT) Mka.h Mka_Stats_Rx_SecYType (DRAFT) Mka.h Mka_Stats_SecYType (DRAFT) Mka.h Mka_Stats_Tx_ScType (DRAFT) Mka.h Mka_Stats_Tx_SecYType (DRAFT) Mka Mka.h Mka_ValidateFramesType (DRAFT) Rte_NvM_Type.h NvM_BlockIdType Rte_NvM_Type.h NvM_BlockRequestType NvM Rte_NvM_Type.h NvM_RequestResultType Spi.h Spi_AsyncModeType Spi.h Spi_ChannelType Spi.h Spi_DataBufferType Spi Spi.h Spi_NumberOfDataType Module Header File Imported Type Spi.h Spi_SequenceType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType

requirement SWS_EthSwt_00007 [SWS_EthSwt_00007] 📄 PDF

The function EthSwt_Init shall store the access to the con- figuration structure for subsequent API calls.

requirement SWS_EthSwt_00008 [SWS_EthSwt_00008] 📄 PDF

The function EthSwt_Init shall change the state of all switches controlled by this Switch Driver from ETHSWT_STATE_UNINIT to ETHSWT_- STATE_INIT .

requirement SWS_EthSwt_00009 [SWS_EthSwt_00009] 📄 PDF

If development error detection is enabled, the function Eth- Swt_Init shall check the parameter CfgPtr for being valid. If the check fails, EthSwt_Init shall raise the development error ETHSWT_E_INIT_FAILED.

requirement SWS_EthSwt_00011 [SWS_EthSwt_00011] 📄 PDF

After initialization of the Ethernet switch within the EthSwt_- BackgroundTask , the Ethernet switch shall enter an inactive or low power mode if EthSwtLowPowerModeSupport is set to TRUE. If EthSwtLowPowerModeSupport is not defined or set to FALSE the Ethernet switch shall enter an active state.

requirement SWS_EthSwt_00016 [SWS_EthSwt_00016] 📄 PDF

The function EthSwt_SwitchInit shall check the access to the Ethernet Switch hardware, i.e. by trying to read or write registers during the configuration of the switch. If the access to the registers fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK .

requirement SWS_EthSwt_00019 [SWS_EthSwt_00019] 📄 PDF

The function EthSwt_SetSwitchPortMode shall put the in- dexed port of the switch into the specified mode. If EthSwtPort references an EthTrcv then the function EthTrcv_SetTransceiverMode of the Ethernet Transceiver Driver shall additionally be called with the corresponding transceiver mode.

requirement SWS_EthSwt_00022 [SWS_EthSwt_00022] 📄 PDF

The function EthSwt_SetSwitchPortMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- SetSwitchPortModeApi .

requirement SWS_EthSwt_00023 [SWS_EthSwt_00023] 📄 PDF

If the switch is already in the requested mode E_OK shall be returned and no development error shall be raised.

requirement SWS_EthSwt_00026 [SWS_EthSwt_00026] 📄 PDF

The function EthSwt_GetSwitchPortMode shall read the mode of the indexed port of the switch. If EthSwtPort references an EthTrcv then the function shall additionally call the corresponding function EthTrcv_Get- TransceiverMode of the Ethernet Transceiver Driver.

requirement SWS_EthSwt_00029 [SWS_EthSwt_00029] 📄 PDF

The function EthSwt_GetSwitchPortMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetSwitchPortModeApi .

requirement SWS_EthSwt_00032 [SWS_EthSwt_00032] 📄 PDF

The function EthSwt_StartSwitchPortAutoNegotia- tion shall restart the automatic negotiation of the used transmission parameters of the referenced Ethernet transceiver driver by calling the function EthTrcv_StartAu- toNegotiation .

requirement SWS_EthSwt_00035 [SWS_EthSwt_00035] 📄 PDF

The function EthSwt_StartSwitchPortAutoNegotia- tion shall be pre compile time configurable On/Off by the configuration parameter: EthSwtStartSwitchPortAutoNegotiationApi .

requirement SWS_EthSwt_00038 [SWS_EthSwt_00038] 📄 PDF

The function EthSwt_GetLinkState shall read the current (link) state of the indexed switch port. If the indexed Ethernet port references an Eth- ernet transceiver, the link state shall be obtained by calling the function EthTrcv_- GetLinkState of the Ethernet Transceiver Driver. If the indexed Ethernet Switch port does not reference an Ethernet transceiver, the state shall be obtained from the MAC interface of the Switch port. If the MAC interface is not able to provide a link state (e.g. Ethernet hardware does not support a link state of the MAC interface), the API shall return the following state which is derived from the current mode: • If the current mode of the indexed switch port is ETH_MODE_ACTIVE , then ETHTRCV_LINK_STATE_ACTIVE shall be returned • If the current mode of the indexed switch port is ETH_MODE_DOWN , then ETHTRCV_LINK_STATE_DOWN shall be returned

requirement SWS_EthSwt_00042 [SWS_EthSwt_00042] 📄 PDF

The function EthSwt_GetLinkState shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetLinkStateApi .

requirement SWS_EthSwt_00045 [SWS_EthSwt_00045] 📄 PDF

The function EthSwt_GetBaudRate shall read the current baud rate of the indexed switch port. If the indexed Ethernet port reference an Ethernet transceiver, the baud rate shall be obtained by the function EthTrcv_GetBaudRate of the Ethernet Transceiver Driver. If the indexed Ethernet Switch port does not reference an Ethernet transceiver, the baud rate shall be obtained from the MAC interface of the Switch port.

requirement SWS_EthSwt_00049 [SWS_EthSwt_00049] 📄 PDF

The function EthSwt_GetBaudRate shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetBaudRateApi .

requirement SWS_EthSwt_00052 [SWS_EthSwt_00052] 📄 PDF

The function EthSwt_GetDuplexMode shall read the cur- rent duplex mode of the indexed switch port. If the indexed Ethernet port reference an Ethernet transceiver, the duplex mode shall be obtained by calling the function EthTrcv_ GetDuplexMode of the Ethernet Transceiver Driver. If the indexed Ether- net Switch port does not reference an Ethernet transceiver, the duplex mode shall be obtained from the MAC interface of the Switch port.

requirement SWS_EthSwt_00056 [SWS_EthSwt_00056] 📄 PDF

The function EthSwt_GetDuplexMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetDuplexMod- eApi .

requirement SWS_EthSwt_00061 [SWS_EthSwt_00061] 📄 PDF

The function EthSwt_GetPortMacAddr shall return the port index over which the given MAC-address is reachable within the indexed switch. If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK .

requirement SWS_EthSwt_00087 [SWS_EthSwt_00087] 📄 PDF

The function EthSwt_StoreConfiguration shall request to store the configuration of the learned MAC/Port tables of a switch in a persistent manner. This can be done in two ways: 1.) Reading out the parameters and storing them in the NV-RAM of the host CPU using the NV-RAM manager. 2.) Advising the switch to store the configuration data in its local NV-RAM. In both alternatives <EthSwtPersistentConfigurationResultCallback> shall be invoked if EthSwtPersistentConfigurationResultCallback is configured. In case of storage to switch local NV-RAM, JobResult shall be set to NVM_REQ_OK to indi- cate success or to NVM_REQ_NOT_OK to indicate failure.

requirement SWS_EthSwt_00090 [SWS_EthSwt_00090] 📄 PDF

The function EthSwt_StoreConfiguration shall be pre compile time configurable On/Off by the configuration parameter: EthSwtStoreCon- figurationApi .

requirement SWS_EthSwt_00092 [SWS_EthSwt_00092] 📄 PDF

The function EthSwt_ResetConfiguration shall request to reset the configuration of the learned MAC/Port tables of a switch in a persistent manner. This can be done in two ways: 1.) Overwriting the learned parameters in the NV-RAM of the host CPU with preconfigured default values. 2.) Advising the switch to reset the learned configuration data in its local NV-RAM. In both alternatives <EthSwtPersistentConfigurationResultCallback> shall be invoked if EthSwtPersistentConfigurationResultCallback is configured. In case of storage to switch local NV-RAM, JobResult shall be set to NVM_REQ_OK to indi- cate success or to NVM_REQ_NOT_OK to indicate failure.

requirement SWS_EthSwt_00095 [SWS_EthSwt_00095] 📄 PDF

The function EthSwt_ResetConfiguration shall be pre compile time configurable On/Off by the configuration parameter: EthSwtResetCon- figurationApi .

requirement SWS_EthSwt_00098 [SWS_EthSwt_00098] 📄 PDF

Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/Dem ConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING) Det_ReportError Det.h Service to report development errors. Eth_ReadMii Eth.h Reads a transceiver register Eth_WriteMii Eth.h Configures a transceiver register or triggers a function offered by the receiver EthTrcv_GetBaudRate EthTrcv.h Obtains the baud rate of the indexed transceiver EthTrcv_GetDuplexMode EthTrcv.h Obtains the duplex mode of the indexed transceiver EthTrcv_GetLinkState EthTrcv.h Obtains the link state of the indexed transceiver EthTrcv_GetTransceiverMode EthTrcv.h Obtains the state of the indexed transceiver EthTrcv_SetTransceiverMode EthTrcv.h Enables / disables the indexed transceiver EthTrcv_StartAutoNegotiation EthTrcv.h Restarts the negotiation of the transmission parameters used by the indexed transceiver NvM_GetErrorStatus NvM.h Service to read the block dependent error/status information. NvM_ReadBlock NvM.h Service to copy the data of the NV block to its corresponding RAM block. NvM_WriteBlock NvM.h Service to copy the data of the RAM block to its corresponding NV block. Spi_AsyncTransmit Spi.h Service to transmit data on the SPI bus. Spi_Cancel Spi.h Service cancels the specified on-going sequence transmission. Spi_ReadIB Spi.h Service for reading synchronously one or more data from an IB SPI Handler/Driver Channel specified by parameter. Spi_SetAsyncMode Spi.h Service to set the asynchronous mechanism mode for SPI busses handled asynchronously. Spi_SetupEB Spi.h Service to setup the buffers and the length of data for the EB SPI Handler/Driver Channel specified. Spi_SyncTransmit Spi.h Service to transmit data on the SPI bus Spi_WriteIB Spi.h Service for writing one or more data to an IB SPI Handler/Driver Channel specified by parameter.

requirement SWS_EthSwt_00099 [SWS_EthSwt_00099] 📄 PDF

The Ethernet Switch Driver shall use a zero-based index to abstract the access for upper software layers.

requirement SWS_EthSwt_00106 [SWS_EthSwt_00106] 📄 PDF

EthSwt_GetCounterValues shall read a list with drop counter values of the corresponding port of the switch. The meaning of these values is described at Eth_CounterType .

requirement SWS_EthSwt_00109 [SWS_EthSwt_00109] 📄 PDF

The function EthSwt_GetCounterValues shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetCoun- terValuesApi .

requirement SWS_EthSwt_00113 [SWS_EthSwt_00113] 📄 PDF

Error Name: ETHSWT_E_ACCESS Short Description: Ethernet Switch Access Failure Long Description: This production error shall be issued when the switch is not accessible. Recommended DTC: N/A Fail When access to the Ethernet Switch fails the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREFAILED to DEM. Detection Criteria: Pass When access to the Ethernet Switch succeeds the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREPASSED to DEM. Secondary Parameters: N/A Time Required: N/A Monitor Frequency N/A MIL illumination: N/A Table 7.5: ETHSWT_E_ACCESS

requirement SWS_EthSwt_00115 [SWS_EthSwt_00115] 📄 PDF

The EthSwt_MainFunction support asynchronous behav- ior of API calls. This function is directly called by Basic Software Scheduler.

requirement SWS_EthSwt_00118 [SWS_EthSwt_00118] 📄 PDF

The function <EthSwtLinkDownCallout> shall be called if a link, which is configured, goes down (link loss). The function provides the Switch index and the Port index, such that the port which went down can be identified.

requirement SWS_EthSwt_00120 [SWS_EthSwt_00120] 📄 PDF

The parameter EthSwtIdx within the configuration shall cor- respond to the argument used in the API.

requirement SWS_EthSwt_00124 [SWS_EthSwt_00124] 📄 PDF

The function EthSwt_GetVersionInfo shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtVersionIn- foApi .

requirement SWS_EthSwt_00126 [SWS_EthSwt_00126] 📄 PDF

The function EthSwt_NvmSingleBlockCallback shall be called by the NVRAMManager [13] after the switch configuration has been stored or reset in the the NV RAM.

requirement SWS_EthSwt_00127 [SWS_EthSwt_00127] 📄 PDF

The function EthSwt_NvmSingleBlockCallback shall al- ways return E_OK according to SWS_NvM_00368 .

requirement SWS_EthSwt_00128 [SWS_EthSwt_00128] 📄 PDF

The function EthSwt_NvmSingleBlockCallback shall raise a development error if the JobResult equals NVM_REQ_NOT_OK , i.e. the write request has been finished unsuccessfully.

requirement SWS_EthSwt_00129 [SWS_EthSwt_00129] 📄 PDF

The function EthSwt_NvmSingleBlockCallback shall be pre compile time configurable On/Off by the existence of the container EthSwtNvm .

requirement SWS_EthSwt_00131 [SWS_EthSwt_00131] 📄 PDF

In case different Switch devices are used in one ECU, the function names of the different Ethernet Switch drivers must be modified such that no two functions with the same names are generated. It is the responsibility of the user to take care that no two functions with the same names are configured. The names may be extended with a vendor ID or a type ID.

requirement SWS_EthSwt_00132 [SWS_EthSwt_00132] 📄 PDF

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00496]. The configuration of the Ethernet switch driver shall support different egress port struc- tures by the configuration EthSwtPortEgressScheduler .

requirement SWS_EthSwt_00133 [SWS_EthSwt_00133] 📄 PDF

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00495]. The Ethernet switch configuration shall support to configure the linkage between the priority of an received Ethernet frame and the according queue of an egress port via the traffic class assignment. Therefore the priority to traffic class assignment at an ingress port (exclusively either via EthSwtPortTrafficClassAssignment or Eth- SwtPriorityTrafficClassAssignment ) and the traffic class to a queue assign- ment at the egress port ( via EthSwtPortQueueTrafficClassAssignment ) shall be configured.

requirement SWS_EthSwt_00134 [SWS_EthSwt_00134] 📄 PDF

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00450]. The switch configuration shall support the configuration how packets will be forwarded with respect to configured VLANs by using the configuration parameters of the subcon- tainer EthSwtVlanMembership .

requirement SWS_EthSwt_00135 [SWS_EthSwt_00135] 📄 PDF

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00451]. The switch configuration shall support the configuration how VLANs will be inserted into Ethernet frames or existing VLANs will be modified by the configuration EthSwt- PortIngressVlanModification .

requirement SWS_EthSwt_00136 [SWS_EthSwt_00136] 📄 PDF

The Ethernet Switch driver shall support an API which allows to store learned parameters like address resolution tables in a persistent manner by using the API EthSwt_StoreConfiguration . This persistent storage can be done in an NVRAM of the host CPU which runs the Ethernet Switch driver. Alternatively, this can be done in a memory of the switch itself. The trigger for storing the learned configuration or resetting the stored configuration can be done e.g. by a DCM.

requirement SWS_EthSwt_00154 [SWS_EthSwt_00154] 📄 PDF

If development error detection is activated by EthSwt- DevErrorDetect , the function EthSwt_GetLinkState shall check whether the EthTrcv_GetLinkState API of the indexed transceiver driver is available by check- ing whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_- API.

requirement SWS_EthSwt_00156 [SWS_EthSwt_00156] 📄 PDF

The function EthSwt_SetSwitchPortMode shall check whether the EthTrcv_SetTransceiverMode API of the indexed transceiver driver is available by checking whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_API.

requirement SWS_EthSwt_00157 [SWS_EthSwt_00157] 📄 PDF

The function EthSwt_GetSwitchPortMode shall check whether the EthTrcv_GetTransceiverMode API of the indexed transceiver driver is available by checking whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_API.

requirement SWS_EthSwt_00162 [SWS_EthSwt_00162] 📄 PDF

The switch driver shall provide APIs to read the MAC-address to switch port mapping from the switch device to support the IP-address assignment by using the API EthSwt_GetPortMacAddr .

requirement SWS_EthSwt_00164 [SWS_EthSwt_00164] 📄 PDF

The switch driver shall check whether the lower layer driver, i.e. the EthTrcv provides the APIs which can be called by an upper layer module (Eth If) of the switch driver and will be forwarded to the lower layer. In case of missing APIs, the switch driver shall raise the development error ETHSWT_E_INV_API if APIs are missing in the lower layer module.

requirement SWS_EthSwt_00173 [SWS_EthSwt_00173] 📄 PDF

The function EthSwt_EnableVlan shall enable or disable a pre-configured VLAN at a certain port of a switch.

requirement SWS_EthSwt_00177 [SWS_EthSwt_00177] 📄 PDF

The function EthSwt_EnableVlan shall be pre compile time configurable On/Off by the configuration parameter: EthSwtEnableVlanApi .

requirement SWS_EthSwt_00178 [SWS_EthSwt_00178] 📄 PDF

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00458]. The switch configuration shall support the configuration how the PCP field of incom- ing Ethernet frames will be modified before they are forwarded to the egress port, i.e. a priority regeneration table can be configured (Please refer to EthSwtPriori- tyRegeneration , EthSwtPriorityRegenerationIngressPriority and Eth- SwtPriorityRegenerationRegeneratedPriority .

requirement SWS_EthSwt_00179 [SWS_EthSwt_00179] 📄 PDF

The switch configuration shall support the configuration of a default traffic class for incoming untagged Ethernet frames (Please also refer to Eth- SwtPortTrafficClassAssignment ).

requirement SWS_EthSwt_00180 [SWS_EthSwt_00180] 📄 PDF

The parameter EthSwtIndex shall be used to distinguish different instances of a switch driver module in case the API Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId) is called.

requirement SWS_EthSwt_00181 [SWS_EthSwt_00181] 📄 PDF

The Ethernet Switch driver shall support an API which allows to reset learned parameters like address resolution tables by using the API EthSwt_- ResetConfiguration .

requirement SWS_EthSwt_00183 [SWS_EthSwt_00183] 📄 PDF

The function EthSwt_SetMacLearningMode shall set the MAC learning mode according to EthSwt_MacLearningType .

requirement SWS_EthSwt_00186 [SWS_EthSwt_00186] 📄 PDF

The function EthSwt_SetMacLearningMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSet- MacLearningModeApi .

requirement SWS_EthSwt_00188 [SWS_EthSwt_00188] 📄 PDF

The function EthSwt_GetMacLearningMode shall return the MAC learning mode according to EthSwt_MacLearningType .

requirement SWS_EthSwt_00191 [SWS_EthSwt_00191] 📄 PDF

The function EthSwt_GetMacLearningMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGet- MacLearningModeApi .

requirement SWS_EthSwt_00192 [SWS_EthSwt_00192] 📄 PDF

The NvM APIs will only be used if the respective block is not configured for NvM_ReadAll and NvM_WriteAll .

requirement SWS_EthSwt_00194 [SWS_EthSwt_00194] 📄 PDF

The callback function <EthSwtPersistentConfigurationResult- Callback> shall be called by the EthSwt_NvmSingleBlockCallback to inform the caller of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration about the state of the past calls.

requirement SWS_EthSwt_00196 [SWS_EthSwt_00196] 📄 PDF

The function EthSwt_NvmSingleBlockCallback shall call the function <user>_PersistentConfigurationResult to provide the JobResult to the caller of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration .

requirement SWS_EthSwt_00197 [SWS_EthSwt_00197] 📄 PDF

If the numberOfElements is greater 0x00, the arlTableList- Pointer shall be filled with up to numberOfElements elements. numberOfElements shall return the number of copied elements.

requirement SWS_EthSwt_00199 [SWS_EthSwt_00199] 📄 PDF

EthSwt_GetRxStats shall return a list of statistic counters defined with Eth_RxStatsType . The majority of these Counters are derived from the IETF RFC2819.

requirement SWS_EthSwt_00202 [SWS_EthSwt_00202] 📄 PDF

The function EthSwt_GetRxStats shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetRxStatsApi .

requirement SWS_EthSwt_00204 [SWS_EthSwt_00204] 📄 PDF

The function <EthSwtLinkUpCallout> shall be called if a link, which is configured, goes up. The function provides the Switch index and the Port index, such that the port which went up can be identified.

requirement SWS_EthSwt_00207 [SWS_EthSwt_00207] 📄 PDF

The function EthSwt_GetSwitchReg shall read the content of a switch register.

requirement SWS_EthSwt_00210 [SWS_EthSwt_00210] 📄 PDF

The function EthSwt_GetSwitchReg shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetSwitchRe- gApi .

requirement SWS_EthSwt_00212 [SWS_EthSwt_00212] 📄 PDF

The function EthSwt_SetSwitchReg shall write the content to the switch register.

requirement SWS_EthSwt_00215 [SWS_EthSwt_00215] 📄 PDF

The function EthSwt_SetSwitchReg shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetSwitchRe- gApi .

requirement SWS_EthSwt_00217 [SWS_EthSwt_00217] 📄 PDF

The function EthSwt_ReadTrcvRegister shall read the specified transceiver register through the MII or SPI of the indexed switch port.

requirement SWS_EthSwt_00220 [SWS_EthSwt_00220] 📄 PDF

The function EthSwt_ReadTrcvRegister shall be pre compile time configurable On/Off by the configuration parameter: EthSwtReadTr- cvRegisterApi .

requirement SWS_EthSwt_00222 [SWS_EthSwt_00222] 📄 PDF

The function EthSwt_WriteTrcvRegister shall write the specified transceiver register through the MII or SPI of the indexed switch port.

requirement SWS_EthSwt_00225 [SWS_EthSwt_00225] 📄 PDF

The function EthSwt_WriteTrcvRegister shall be pre compile time configurable On/Off by the configuration parameter: EthSwtWriteTr- cvRegisterApi .

requirement SWS_EthSwt_00226 [SWS_EthSwt_00226] 📄 PDF

The switch driver shall support a learning phase which can be divided into several sequential steps.

requirement SWS_EthSwt_00228 [SWS_EthSwt_00228] 📄 PDF

The function EthSwt_GetArlTable shall provide a list of structs with MAC-address, VLAN-ID and port for the indexed switch.

requirement SWS_EthSwt_00229 [SWS_EthSwt_00229] 📄 PDF

The function EthSwt_GetArlTable shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetArlTableApi .

requirement SWS_EthSwt_00230 [SWS_EthSwt_00230] 📄 PDF

The function EthSwt_GetPortMacAddr shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtGetPort- MacAddrApi .

requirement SWS_EthSwt_00233 [SWS_EthSwt_00233] 📄 PDF

If the parameter EthSwtDropDoubleTagged is set to TRUE , the double tagged frames shall be dropped independent on which Ethernet switch port this Ethernet frame has been received.

requirement SWS_EthSwt_00234 [SWS_EthSwt_00234] 📄 PDF

The Parameter EthSwtPortQueueMinimumLength shall define the minimum length for one queue of an dedicated egress port.

requirement SWS_EthSwt_00235 [SWS_EthSwt_00235] 📄 PDF

The EthSwt_GetArlTable API shall return only the num- berOfElements if the numberOfElements is set to 0x00. In this case no data will be copied and a NULLPTR can be used for the arlTableListPointer.

requirement SWS_EthSwt_00240 [SWS_EthSwt_00240] 📄 PDF

The Switch driver shall offer Switch management APIs • EthSwt_EthRxProcessFrame • EthSwt_EthRxFinishedIndication • EthSwt_EthTxAdaptBufferLength • EthSwt_EthTxPrepareFrame • EthSwt_SetMgmtInfo • EthSwt_EthTxProcessFrame and • EthSwt_EthTxFinishedIndication if EthSwtManagementSupportApi is set to TRUE .

requirement SWS_EthSwt_00241 [SWS_EthSwt_00241] 📄 PDF

The Switch Driver management APIs • EthSwt_EthRxProcessFrame • EthSwt_EthRxFinishedIndication • EthSwt_EthTxAdaptBufferLength • EthSwt_EthTxPrepareFrame • EthSwt_SetMgmtInfo • EthSwt_EthTxProcessFrame and • EthSwt_EthTxFinishedIndication shall support the Ethernet Driver to gather the Switch specific management information out of an Ethernet frame for reception or to prepare an Ethernet frame for management mode conformant frame transmission, e.g. the egress route of a frame.

requirement SWS_EthSwt_00242 [SWS_EthSwt_00242] 📄 PDF

The Switch Driver management APIs EthSwt_EthTxPro- cessFrame and EthSwt_EthTxFinishedIndication shall return immediately, if EthSwt_SetMgmtInfo has not been called before a call of EthSwt_EthTxPro- cessFrame .

requirement SWS_EthSwt_00243 [SWS_EthSwt_00243] 📄 PDF

The Switch driver shall access the port specific hardware time stamps if EthSwtPortTimeStampSupport of the port is set to TRUE .

requirement SWS_EthSwt_00245 [SWS_EthSwt_00245] 📄 PDF

The Switch driver shall inform the EthIf about the availability of port specific ingress and egress timestamps us- ing the APIs EthIf_SwitchIngressTimeStampIndication and EthIf_SwitchEgressTimeStampIndication , if EthSwtGlobalTimeSup- portApi is set to TRUE .

requirement SWS_EthSwt_00249 [SWS_EthSwt_00249] 📄 PDF

The function EthSwt_EthRxProcessFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

requirement SWS_EthSwt_00253 [SWS_EthSwt_00253] 📄 PDF

The function EthSwt_EthRxFinishedIndication shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwt- ManagementSupportApi .

requirement SWS_EthSwt_00257 [SWS_EthSwt_00257] 📄 PDF

The function EthSwt_EthTxPrepareFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

requirement SWS_EthSwt_00261 [SWS_EthSwt_00261] 📄 PDF

The function EthSwt_EthTxAdaptBufferLength shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtMan- agementSupportApi .

requirement SWS_EthSwt_00264 [SWS_EthSwt_00264] 📄 PDF

The function EthSwt_SetMgmtInfo shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManagementSup- portApi .

requirement SWS_EthSwt_00268 [SWS_EthSwt_00268] 📄 PDF

The function EthSwt_EthTxProcessFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

requirement SWS_EthSwt_00273 [SWS_EthSwt_00273] 📄 PDF

The function EthSwt_EthTxFinishedIndication shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwt- ManagementSupportApi .

requirement SWS_EthSwt_00282 [SWS_EthSwt_00282] 📄 PDF

If the management information for reception will not be avail- able within the time specified in the configuration parameter EthSwtMgmtInfoIndi- cationTimeout , the pointer MgmtInfoPtr shall be set to NULL before calling the function EthIf_SwitchMgmtInfoIndication .

requirement SWS_EthSwt_00287 [SWS_EthSwt_00287] 📄 PDF

The function EthSwt_VerifyConfig shall be compile time configurable On/Off by the configuration parameter: EthSwtVerifyConfigApi .

requirement SWS_EthSwt_00291 [SWS_EthSwt_00291] 📄 PDF

The function EthSwt_SetForwardingMode shall be com- pile time configurable On/Off by the configuration parameter: EthSwtSetForward- ingModeApi .

requirement SWS_EthSwt_00292 [SWS_EthSwt_00292] 📄 PDF

If the parameter EthSwtVerifyConfigApi is set to TRUE the function EthSwt_VerifyConfig shall be used to verify switch configuration.

requirement SWS_EthSwt_00293 [SWS_EthSwt_00293] 📄 PDF

The function EthSwt_GetPortSignalQuality shall obtain the signal quality by calling the function EthTrcv_GetPhySignalQuality of the referenced Ethernet Transceiver Driver. If the current signal quality is not available, the signal quality shall be set to 0xFFFFFFFF .

requirement SWS_EthSwt_00297 [SWS_EthSwt_00297] 📄 PDF

The function EthSwt_GetPortSignalQuality shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGet- PortSignalQualityApi .

requirement SWS_EthSwt_00299 [SWS_EthSwt_00299] 📄 PDF

The function EthSwt_GetPortIdentifier shall return the value of the organizationally unique identifier (OUI 24 bit) of the indexed Ethernet switch port that is connected to the indexed Ethernet switch. It shall set the 8 most significant bits of the OUI to 0xFFxxxxxx. If the Ethernet switch port references an Ethernet transceiver, the function shall obtain the OUI by calling the function EthTrcv_Get- PhyIdentifier and set the 8 most significant bits of the OUI to 0x00xxxxxx.

requirement SWS_EthSwt_00303 [SWS_EthSwt_00303] 📄 PDF

The function EthSwt_GetPortIdentifier shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPor- tIdentifierApi .

requirement SWS_EthSwt_00305 [SWS_EthSwt_00305] 📄 PDF

The function EthSwt_GetSwitchIdentifier shall return the value of the organizationally unique identifier of the indexed Ethernet switch.

requirement SWS_EthSwt_00308 [SWS_EthSwt_00308] 📄 PDF

The function EthSwt_GetSwitchIdentifier shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetSwitchIdentifierApi .

requirement SWS_EthSwt_00309 [SWS_EthSwt_00309] 📄 PDF

The function EthSwt_WritePortMirrorConfiguration shall store the port mirror configuration of the given MirroredSwitchIdx in a shadow buffer. The MirroredSwitchIdx shall be used to identify the port mirror configura- tion within the Ethernet switch driver.

requirement SWS_EthSwt_00312 [SWS_EthSwt_00312] 📄 PDF

The function EthSwt_WritePortMirrorConfiguration shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtWritePortMirrorConfigurationApi .

requirement SWS_EthSwt_00313 [SWS_EthSwt_00313] 📄 PDF

The function EthSwt_ReadPortMirrorConfiguration shall return the port mirror configuration identified by the given MirroredSwitchIdx. If no port mirror configuration is found for the MirroredSwitchIdx, the function shall return E_NOT_OK .

requirement SWS_EthSwt_00317 [SWS_EthSwt_00317] 📄 PDF

The function EthSwt_ReadPortMirrorConfiguration shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtReadPortMirrorConfigurationApi .

requirement SWS_EthSwt_00318 [SWS_EthSwt_00318] 📄 PDF

The function EthSwt_GetPortMirrorState shall return the port mirroring state of the indexed ethernet switch port.

requirement SWS_EthSwt_00322 [SWS_EthSwt_00322] 📄 PDF

The function EthSwt_GetPortMirrorState shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPort- MirrorStateApi .

requirement SWS_EthSwt_00323 [SWS_EthSwt_00323] 📄 PDF

The function EthSwt_SetPortMirrorState shall request the given port mirroring state for the port mirroring configuration of the indexed Ethernet switch, and store the requested port mirror state in a shadow buffer.

requirement SWS_EthSwt_00327 [SWS_EthSwt_00327] 📄 PDF

The function EthSwt_SetPortMirrorState shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPort- MirrorStateApi .

requirement SWS_EthSwt_00328 [SWS_EthSwt_00328] 📄 PDF

The function EthSwt_SetPortTestMode shall forward the call with the given test mode by calling the function EthTrcv_SetPhyTestMode of the referenced Ethernet Transceiver Driver.

requirement SWS_EthSwt_00332 [SWS_EthSwt_00332] 📄 PDF

The function EthSwt_SetPortTestMode shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtSetPortTest- ModeApi .

requirement SWS_EthSwt_00334 [SWS_EthSwt_00334] 📄 PDF

The function EthSwt_SetPortLoopbackMode shall forward the call with the given loop-back mode by calling the function EthTrcv_SetPhyLoop- backMode of the referenced Ethernet Transceiver Driver.

requirement SWS_EthSwt_00338 [SWS_EthSwt_00338] 📄 PDF

The function EthSwt_SetPortLoopbackMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPort- LoopbackModeApi .

requirement SWS_EthSwt_00340 [SWS_EthSwt_00340] 📄 PDF

The function EthSwt_SetPortTxMode shall forward the call with the given transmission mode by calling the function EthTrcv_SetPhyTxMode of the referenced Ethernet Transceiver Driver.

requirement SWS_EthSwt_00344 [SWS_EthSwt_00344] 📄 PDF

The function EthSwt_SetPortTxMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPortTxMod- eApi .

requirement SWS_EthSwt_00346 [SWS_EthSwt_00346] 📄 PDF

The function EthSwt_GetPortCableDiagnosticsRe- sult shall obtain the cable diagnostics result by calling the function EthTrcv_Get- CableDiagnosticsResult of the referenced Ethernet Transceiver Driver.

requirement SWS_EthSwt_00350 [SWS_EthSwt_00350] 📄 PDF

The function EthSwt_GetPortCableDiagnosticsRe- sult shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPortCableDiagnosticsResultApi .

requirement SWS_EthSwt_00362 [SWS_EthSwt_00362] 📄 PDF

The function EthSwt_GetTxStats shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetTxStatsApi .

requirement SWS_EthSwt_00370 [SWS_EthSwt_00370] 📄 PDF

The function EthSwt_GetTxErrorCounterValues shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetTxErrorCounterValuesApi .

requirement SWS_EthSwt_00372 [SWS_EthSwt_00372] 📄 PDF

EthSwt_GetTxStats shall return the list of Transmission Statistics out of IETF RFC1213 defined with Eth_TxStatsType , where the maxi- mal possible value shall denote an invalid value, e.g. this counter is not available.

requirement SWS_EthSwt_00373 [SWS_EthSwt_00373] 📄 PDF

EthSwt_GetTxErrorCounterValues returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643 defined with Eth_- TxErrorCounterValuesType , where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

requirement SWS_EthSwt_00374 [SWS_EthSwt_00374] 📄 PDF

All Ethernet switch HW ports which are not configured as a EthSwtPort shall be switched off during initialization. This Ethernet switch HW ports shall never be switched on during runtime

requirement SWS_EthSwt_00376 [SWS_EthSwt_00376] 📄 PDF

If EthSwtLowPowerModeSupport is set to TRUE and at least one EthSwtPort of a Ethernet switch is enabled and the corresponding Ether- net switch HW is in an inactive or low power mode the Ethernet switch HW shall be set to an active mode in which forwarding of Ethernet frames is possible.

requirement SWS_EthSwt_00377 [SWS_EthSwt_00377] 📄 PDF

If EthSwtLowPowerModeSupport is set to TRUE and no Eth SwtPort for a certain Ethernet switch is enabled, the corresponding Ethernet switch HW shall be set to an inactive or low power mode.

requirement SWS_EthSwt_00378 [SWS_EthSwt_00378] 📄 PDF

If EthSwt_PortEnableTimeStamp is called for a PortIdx , the switch driver shall enable the time-stamping for this port if EthSwtPortTimeS- tampSupport is set to TRUE for this port.

requirement SWS_EthSwt_00379 [SWS_EthSwt_00379] 📄 PDF

The function EthSwt_PortEnableTimeStamp shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtGlobal- TimeSupportApi .

requirement SWS_EthSwt_00386 [SWS_EthSwt_00386] 📄 PDF

If development error detection is activated by EthSwtDev- ErrorDetect , all functions except EthSwt_Init shall check that the service Eth- Swt_Init was previously called. If the check fails, the function shall raise the devel- opment error ETHSWT_E_UNINIT.

requirement SWS_EthSwt_00387 [SWS_EthSwt_00387] 📄 PDF

If development error detection is activated by EthSwtDev- ErrorDetect , all functions with input parameter SwitchIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETH- SWT_E_INV_SWITCH_IDX.

requirement SWS_EthSwt_00389 [SWS_EthSwt_00389] 📄 PDF

If development error detection is enabled, all functions with input parameter SwitchPortIdx or PortIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_- INV_SWITCH_IDX.

requirement SWS_EthSwt_00390 [SWS_EthSwt_00390] 📄 PDF

If development error detection is enabled, all functions with input parameter CtrlIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_INV_CTRL_IDX.

requirement SWS_EthSwt_00391 [SWS_EthSwt_00391] 📄 PDF

If development error detection is enabled, all functions with input parameter BufIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_INV_PARAM.

requirement SWS_EthSwt_00392 [SWS_EthSwt_00392] 📄 PDF

If development error detection is enabled, all functions with inout or output pointer parameter shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_PARAM_POINTER.

requirement SWS_EthSwt_00393 [SWS_EthSwt_00393] 📄 PDF

If development error tracing is activated by EthSwtDevEr- rorDetect , the functions which call an Ethernet Transceiver API and do not obtain the functionality directly from the switch port interface shall check whether the API of the indexed transceiver driver is available. If this is not the case, the functions shall raise the development error ETHSWT_E_INV_API.

requirement SWS_EthSwt_00394 [SWS_EthSwt_00394] 📄 PDF

If neither the Ethernet switch port nor the Ethernet Transceiver Driver can provide an OUI the function EthSwt_GetPortIdentifier shall return E_NOT_OK .

requirement SWS_EthSwt_00395 [SWS_EthSwt_00395] 📄 PDF

Error Name: ETHSWT_E_SYNCPORT2PHY Short Description: Ethernet switch port and the referenced Ethernet transceiver are in contradicting modes. Long Description: While getting the Ethernet switch port mode, the Ethernet switch driver detected an inconsistent state between Ethernet switch port and the referenced Ethernet transceiver Mode. Recommended DTC: N/A Fail When getting the Ethernet switch port mode together with the Ethernet transceiver mode and the mode of the two referenced modules was found inconsistent the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREFAILED to DEM. Detection Criteria: Pass When getting the Ethernet switch port mode together with the Ethernet transceiver mode and the mode of the two referenced modules was found consistent the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREPASSED to DEM. Secondary Parameters: N/A Time Required: N/A Monitor Frequency N/A MIL illumination: N/A Table 7.6: ETHSWT_E_SYNCPORT2PHY

requirement SWS_EthSwt_00396 [SWS_EthSwt_00396] 📄 PDF

When calling the function EthSwt_SetSwitchPortMode with mode ETH_MODE_DOWN , the EthSwt shall disable the Ethernet switch port directly for reduction of power consumption, if it is possible.

requirement SWS_EthSwt_00397 [SWS_EthSwt_00397] 📄 PDF

When calling the function EthSwt_SetSwitchPortMode , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

requirement SWS_EthSwt_00398 [SWS_EthSwt_00398] 📄 PDF

If EthSwtPort does not references an EthTrcv, EthSwt shall indicate a mode of the port by the API EthIf_SwitchPortModeIndication latest during the next EthSwt_MainFunction .

requirement SWS_EthSwt_00399 [SWS_EthSwt_00399] 📄 PDF

If the obtained modes of the EthSwtPort and the EthTrcv are not aligned, the function EthSwt_GetSwitchPortMode shall raise the extended pro- duction error ETHSWT_E_SYNCPORT2PHY and return E_NOT_OK . If EthTrcv_GetTransceiverMode returns E_NOT_OK , the EthSwt_GetSwitch- PortMode shall also return E_NOT_OK without raising an error.

requirement SWS_EthSwt_00400 [SWS_EthSwt_00400] 📄 PDF

If the function EthSwt_GetSwitchPortMode is called, the function shall check the access to the Ethernet Switch Driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and re- turn E_NOT_OK , otherwise pass the production error ETHSWT_E_ACCESS and return E_OK .

requirement SWS_EthSwt_00403 [SWS_EthSwt_00403] 📄 PDF

The function EthSwt_GetCfgDataRaw shall only be avail- able if parameter EthSwtGetCfgRaw is set to TRUE.

requirement SWS_EthSwt_00404 [SWS_EthSwt_00404] 📄 PDF

When calling the function EthSwt_GetCfgDataRaw , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

requirement SWS_EthSwt_00405 [SWS_EthSwt_00405] 📄 PDF

The function EthSwt_GetCfgDataInfo shall only be avail- able if parameter EthSwtGetCfgRaw is set to TRUE.

requirement SWS_EthSwt_00406 [SWS_EthSwt_00406] 📄 PDF

When calling the function EthSwt_GetCfgDataInfo , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

requirement SWS_EthSwt_00407 [SWS_EthSwt_00407] 📄 PDF

Unused ARL table entries shall be removed from the ARL ta- ble after the timeout configured via EthSwtArlTableEntryTimeout , if this parame- ters is present in the configuration.

requirement SWS_EthSwt_00408 [SWS_EthSwt_00408] 📄 PDF

The Switch driver shall enable clock synchronization with an- other Ethernet switch to which it is connected via uplink port, if EthSwtClockSyn- chronizationSupport is set to TRUE .

requirement SWS_EthSwt_00414 [SWS_EthSwt_00414] 📄 PDF

The Ethernet Switch Driver module shall reject configurations with partition mappings which are not supported by the implementation.

requirement SWS_EthSwt_00415 [SWS_EthSwt_00415] 📄 PDF

The function EthSwt_PortLinkStateRequest shall re- quest the given link state for the indexed Ethernet switch port of the switch by call- ing the EthTrcv_TransceiverLinkStateRequest with the given EthTrcv_- LinkStateType . If the EthSwtPort does not reference an EthTrcv, then the function shall return E_NOT_OK .

requirement SWS_EthSwt_00416 [SWS_EthSwt_00416] 📄 PDF

The port mirror configuration (see [SWS_EthSwt_91017] ) shall be written to a shadow buffer of the Ethernet switch driver per Ethernet Switch by calling EthSwt_WritePortMirrorConfiguration .

requirement SWS_EthSwt_00417 [SWS_EthSwt_00417] 📄 PDF

The port mirror configuration shall be enabled and disabled, respectively, per Ethernet Switch by calling EthSwt_SetPortMirrorState . The current state of the stored port mirror configuration shall be stored persistently, to out- last an ECU reset and to restore the port mirroring activities after an ECU reset.

requirement SWS_EthSwt_00418 [SWS_EthSwt_00418] 📄 PDF

The stored port mirror configuration shall be marked as "to be deleted" by calling EthSwt_DeletePortMirrorConfiguration , if the port mirror- ing of the given Ethernet switch index is disabled (see [SWS_EthSwt_91022]. Other- wise the request to delete the port mirror configuration shall be rejected.

requirement SWS_EthSwt_00419 [SWS_EthSwt_00419] 📄 PDF

The current port mirroring state shall be returned by calling EthSwt_GetPortMirrorState .

requirement SWS_EthSwt_00420 [SWS_EthSwt_00420] 📄 PDF

The port mirror configuration per Ethernet switch shall be re- turned by calling EthSwt_ReadPortMirrorConfiguration .

requirement SWS_EthSwt_00421 [SWS_EthSwt_00421] 📄 PDF

The EthSwt shall check for enabled port mirror configuration. The enabled port mirror configuration shall be activated by reconfiguring the Ethernet switch hardware according to the port mirror configuration, before frame forwarding is being enabled.

requirement SWS_EthSwt_00422 [SWS_EthSwt_00422] 📄 PDF

If the PortMirrorState is set to 0x01 (port mirroring enabled), then the stored port mirror configuration for the given Ethernet switch shall be written to hardware registers of the given Ethernet switch and enable port mirroring.

requirement SWS_EthSwt_00423 [SWS_EthSwt_00423] 📄 PDF

If the PortMirrorState is set to 0x00 (port mirroring disabled) the corresponding hardware registers of the given Ethernet switch shall be reset (to the HW's default values) and the port mirroring shall be disabled.

requirement SWS_EthSwt_00424 [SWS_EthSwt_00424] 📄 PDF

The function shall return with ETH- SWT_PORT_MIRRORING_CONFIGURATION_NOT_SUPPORTED , if the port mirroring configuration is not supported by the Ethernet switch driver or by the Ethernet switch hardware, e.g.: • the configured mirrored traffic direction (see [SWS_EthSwt_91017] "TrafficDirec- tionIngressBitMask" and "TrafficDirectionEgressBitMask") for ingress and egress traffic of the same port is not supported • mirrored ports and capture ports, respectively, are not available within the Ether- net switch driver

requirement SWS_EthSwt_00425 [SWS_EthSwt_00425] 📄 PDF

The function EthSwt_DeletePortMirrorConfigura- tion shall mark the stored port mirror configuration in the shadow buffer of the given MirroredSwitchIdx as "to be deleted".

requirement SWS_EthSwt_00426 [SWS_EthSwt_00426] 📄 PDF

If a port mirroring for the given MirroredSwitchIdx is enabled, the request to delete the configuration shall be rejected by returning E_NOT_OK . Only those port configurations are allowed to be deleted, where the port mirroring of the given MirroredSwitchIdx is disabled.

requirement SWS_EthSwt_00427 [SWS_EthSwt_00427] 📄 PDF

The function EthSwt_DeletePortMirrorConfigura- tion shall be pre compile time configurable On/Off by the configuration parameter: EthSwtDeletePortMirrorConfigurationApi .

requirement SWS_EthSwt_00428 [SWS_EthSwt_00428] 📄 PDF

The cable diagnostic APIs ( EthSwt_RunPortCableDiag- nostic , EthSwt_GetPortCableDiagnosticsResult ) shall only be called for Eth- ernet switch ports of a Ethernet switch, where the Ethernet switch ports reference an Ethernet transceiver.

requirement SWS_EthSwt_00429 [SWS_EthSwt_00429] 📄 PDF

The function EthSwt_RunPortCableDiagnostic shall for- ward the call by calling EthTrcv_RunCableDiagnostic of the referenced Ethernet Transceiver Driver.

requirement SWS_EthSwt_00430 [SWS_EthSwt_00430] 📄 PDF

The function EthSwt_GetMaxFIFOBufferFillLevel shall read out the maximum amount of allocated FIFO buffer since the last read out.

requirement SWS_EthSwt_00431 [SWS_EthSwt_00431] 📄 PDF

When the maximum amount of allocated FIFO buffer is read out, the value shall be reset to 0x00000000 explicitly, if it is not done by the hardware.

requirement SWS_EthSwt_00432 [SWS_EthSwt_00432] 📄 PDF

The function EthSwt_GetMaxFIFOBufferFillLevel shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtGetMaxFIFOBufferFillLevelApi .

requirement SWS_EthSwt_00433 [SWS_EthSwt_00433] 📄 PDF

A MgmtObject is just allowed to be owned between EthSwt and only one <UPPER_LAYER>. The structure element can be identified unambigu- ously using the DataPtr in Rx- and BufIdx in Tx-context, because both elements are definitively unique within the RxIndication() / TxConfirmation() context.

requirement SWS_EthSwt_00434 [SWS_EthSwt_00434] 📄 PDF

Type of error Related error code Error value Initialization of ports is not finished ETHSWT_INIT_NOT_COMPLETED 0x01

requirement SWS_EthSwt_00435 [SWS_EthSwt_00435] 📄 PDF

All functions apart from EthSwt_SetSwitchPortMode , EthSwt_GetSwitchPortMode , EthSwt_StartSwitchPortAutoNegotiation , EthSwt_GetLinkState , EthSwt_GetBaudRate , EthSwt_GetDuplexMode , EthSwt_ReadTrcvRegister , EthSwt_WriteTrcvRegister , EthSwt_Init , EthSwt_MainFunction and EthSwt_BackgroundTask may only be called in state ETHSWT_STATE_ACTIVE . If a function which can only run (succeed with E_OK ) in the states ETHSWT_STATE_- PORTINIT_COMPLETED and ETHSWT_STATE_ACTIVE is called before state ETH- SWT_STATE_PORTINIT_COMPLETED is reached, the Ethernet switch driver shall raise the runtime error ETHSWT_INIT_NOT_COMPLETED .

requirement SWS_EthSwt_00436 [SWS_EthSwt_00436] 📄 PDF

ETHSWT_STATE_PORTINIT_COMPLETED shall be reached as soon as the port initialization has finished.

requirement SWS_EthSwt_00437 [SWS_EthSwt_00437] 📄 PDF

ETHSWT_STATE_ACTIVE shall be reached, when the Ether- net switch initialization has finished.

requirement SWS_EthSwt_00439 [SWS_EthSwt_00439] 📄 PDF

The function shall report the active mode always as ETH_MODE_ACTIVE , even though the previous requested (via EthSwt_SetSwitch- PortMode ) mode was ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST .

requirement SWS_EthSwt_00440 [SWS_EthSwt_00440] 📄 PDF

The function EthSwt_CheckWakeup shall iterate over the Ethernet switch ports of the indexed Ethernet switch and forward the call to EthTrcv_- CheckWakeup for those Ethernet switch ports, which reference an EthTrcv.

requirement SWS_EthSwt_00441 [SWS_EthSwt_00441] 📄 PDF

The function EthSwt_CheckWakeup shall be pre compile time configurable On/Off by the configuration parameter: EthSwtCheckWakeupApi

requirement SWS_EthSwt_00442 [SWS_EthSwt_00442] 📄 PDF

The function EthSwt_GetSwitchPortWakeupReason shall read the current wake-up reason of the indexed Ethernet switch port by forwarding the call to EthTrcv_GetBusWuReason of the referenced EthTrcv. If the indexed Eth- ernet switch port has no reference to an EthTrcv, the function shall return E_NOT_OK .

requirement SWS_EthSwt_00443 [SWS_EthSwt_00443] 📄 PDF

The function EthSwt_GetSwitchPortWakeupReason shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtGetSwitchPortWakeupReasonApi

requirement SWS_EthSwt_00448 [SWS_EthSwt_00448] 📄 PDF

[SWS_EthSwt_00448] Behaviour if EthSwtMacAddressLearningMode is set to IVL Upstream requirements: SRS_Eth_00087 ⌈if EthSwtMacAddressLearningMode is set to IVL then the EthSwt driver shall return with E_NOT_OK.⌋ Note: If EthSwtMacAddressLearningMode is set to IVL, then the MAC-address to Ethernet switch port assignment is learned with respect to the according VLAN. With IVL the presence of an VLAN-ID is needed.

requirement SWS_EthSwt_00449 [SWS_EthSwt_00449] 📄 PDF

[SWS_EthSwt_00449] Behaviour if given MAC-address is available at exactly one Ethernet port Upstream requirements: SRS_Eth_00087 ⌈If the given MAC-address is available at exact one Ethernet switch port, then the EthSwt driver shall return the port index via PortIdxPtr and report E_OK.⌋

requirement SWS_EthSwt_00455 [SWS_EthSwt_00455] 📄 PDF

{DRAFT} If an Ethernet switch has to elect an priority value for an received Ethernet frame, then the priority election process shall be performed according the following order: • If the Ethernet switch detect that the received Ethernet frame is handled by an per-stream filtering and policing (see EthSwtPSFP ) and the corresponding stream gate (see EthSwtStreamGate ) has an IPV configured, then this value shall be used as priority to map this Ethernet frame to a traffic class. Otherwise the Ethernet switch shall proceed as discribed within the next point. • Else if the Ethernet switch detect that a regenerated priority value (see EthSwt- PriorityRegeneration ) is available, then this value shall be used as priority to map this Ethernet frame to a traffic class. Otherwise the Ethernet switch shall proceed as discribed within the next point. • Else if neither a IPV nor a regenerated priority value is available, then the PCP of the received Ethernet frame shall be used as priority to map this Ethernet frame to a traffic class.

requirement SWS_EthSwt_00460 [SWS_EthSwt_00460] 📄 PDF

{DRAFT} If an Ethernet frame has to be transmitted on a par- ticular egress port, this Ethernet frame is transmitted with an VLAN tag and a outbound VLAN priority is assgined to this Ethernet frame, then this Ethernet frame shall be transmitted with the VLAN priority set to the assigned outbound VLAN priority

requirement SWS_EthSwt_00461 [SWS_EthSwt_00461] 📄 PDF

{DRAFT} If the destination MAC address of a received Ether- net frame is qualified as a MAC unicast/multicast address and this MAC address is available in the ARL table, then this Ethernet frame shall be forwarded for further pro- cessing. Otherwise this Ethernet frame shall be dropped and the forwarding process shall be aborted.

requirement SWS_EthSwt_00462 [SWS_EthSwt_00462] 📄 PDF

{DRAFT} If the VLAN membership of a egress port match to the VLAN-ID of a received Ethernet frame and this Ethernet frame has been assigned to this egress port, then the assignment of this Ethernet frame to this egress port shall be kept. Otherwise the assignment of this Ethernet frame to the affected egress port shall be removed.

requirement SWS_EthSwt_00463 [SWS_EthSwt_00463] 📄 PDF

{DRAFT} After the egress filtering has been finalized for an received Ethernet frame and the Ethernet frame is still assigned to a least one egress port, then this Ethernet frame shall be forwarded for further processing. Otherwise this Ethernet frame shall be dropped and the forwarding process shall be aborted.

requirement SWS_EthSwt_00465 [SWS_EthSwt_00465] 📄 PDF

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion references one or multiple ingress ports, then the stream identification shall be processed for streams received via any of the referencing ingress ports.

requirement SWS_EthSwt_00466 [SWS_EthSwt_00466] 📄 PDF

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion references one or multiple egress ports, then the stream identification shall be processed for streams which are forwarded to all referenced egress ports.

requirement SWS_EthSwt_00467 [SWS_EthSwt_00467] 📄 PDF

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion neither reference ingress ports nor egress ports, then the stream identification shall be processed for all streams received via any ingress port regardless to which egress port the stream is forwarded.

requirement SWS_EthSwt_00469 [SWS_EthSwt_00469] 📄 PDF

{DRAFT} If an Ethernet frame (i.e stream) has been received, then the stream identification shall be processed by instances of configured EthSwt- StreamIdentification where the internal stream route match.

requirement SWS_EthSwt_00471 [SWS_EthSwt_00471] 📄 PDF

{DRAFT} If a Ethernet frame (i.e stream) has been received, then the Ethernet switch shall check for a matching instance of EthSwtStreamI- dentification in ascending order according the EthSwtStreamIdentifica- tionPosition , starting with EthSwtStreamIdentificationPosition config- ured with value 0.

requirement SWS_EthSwt_00472 [SWS_EthSwt_00472] 📄 PDF

{DRAFT} If a received Ethernet frame (i.e stream) does not match any instances of EthSwtStreamIdentification s, the Ethernet frame shall be forwarded to the next frame processing level without applying any further stream identification handling.

requirement SWS_EthSwt_00475 [SWS_EthSwt_00475] 📄 PDF

{DRAFT} If a Ethernet frame (i.e. stream) has been received and the internal stream route match to an instance of a configured EthSwtStreamI- dentification , then this stream identification shall be processed in the following order: • Perform the EthSwtStreamFilterRule • Perform the EthSwtStreamFilterAction , if configured • Perform the EthSwtPSFP , if configured and if the Ethernet frame has passed the EthSwtStreamFilterRule and EthSwtStreamFilterAction • Perform the EthSwtPortATSScheduler , if configured and if the Ethernet frame has passed the EthSwtStreamFilterRule and EthSwtStreamFilterAc- tion

requirement SWS_EthSwt_00476 [SWS_EthSwt_00476] 📄 PDF

{DRAFT} A configured instance of an EthSwtStreamIden- tification where no optional elements are configured, shall be considered as empty stream identification, where incoming Ethernet frames always pass.

requirement SWS_EthSwt_00477 [SWS_EthSwt_00477] 📄 PDF

{DRAFT} If an EthSwtStreamFilterRule have multiple fil- ter rule primitives configured (e.g. EthSwtStreamFilterMACSrcAddress and EthSwtStreamFilterVlanId ), then the filter rule primitives shall be considered as AND-linked filter rules.

requirement SWS_EthSwt_00478 [SWS_EthSwt_00478] 📄 PDF

{DRAFT} If a Ethernet frame (i.e. stream) has been received, the internal stream route for this Ethernet frame matches to an instance of a configured EthSwtStreamIdentification , the EthSwtStreamFilterRule of this instance has filter rule primitives configured (e.g. EthSwtStreamFilterMACSrcAddress and EthSwtStreamFilterVlanId ) and the Ethernet frame matches all configured filter rule primitives, then this Ethernet frame shall be qualified as matching stream.

requirement SWS_EthSwt_00479 [SWS_EthSwt_00479] 📄 PDF

{DRAFT} If an Ethernet frame (i.e. stream) has been received, the internal stream route for this Ethernet frame matches to an instance of a configured EthSwtStreamIdentification and a particular filter rule primitive in the EthSwt- StreamFilterRule of this instance is not configured, then this filter rule primitive shall be considered a matching filter rule primitive.

requirement SWS_EthSwt_00480 [SWS_EthSwt_00480] 📄 PDF

{DRAFT} If a Ethernet frame (i.e. stream) has been qualified as matching stream and an EthSwtStreamFilterAction is configured, then this filter action shall be applied on this Ethernet frame.

requirement SWS_EthSwt_00481 [SWS_EthSwt_00481] 📄 PDF

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction has EthSwtStream- FilterActionDropFrame set to TRUE , then this Ethernet frame shall be dropped.

requirement SWS_EthSwt_00482 [SWS_EthSwt_00482] 📄 PDF

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction EthSwtStreamFil- terActionBlockSource set to TRUE, then this Ethernet frame and all sub se- quential receptions of Ethernet frames with the same source MAC address shall be blocked.

requirement SWS_EthSwt_00483 [SWS_EthSwt_00483] 📄 PDF

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction has an EthSwt- StreamFilterActionVlanModification configured, then the VLAN-ID of this Ethernet frame shall be modified with the configured VLAN-ID given by EthSwt- StreamFilterActionVlanModificationVlanId .

requirement SWS_EthSwt_00484 [SWS_EthSwt_00484] 📄 PDF

{DRAFT} If a filter action EthSwtStreamFilterAction- DestinationPortModification is configured, then the egress destination which is used for the modification shall be determined according the configured references to egress ports via EthSwtStreamFilterActionDestinationPortModifica- tionEgressPortRef .

requirement SWS_EthSwt_00486 [SWS_EthSwt_00486] 📄 PDF

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream), the corresponding EthSwtStreamFilterAction has an Eth- SwtStreamFilterActionDestinationPortModification configured and the EthSwtStreamFilterActionDestinationPortModificationType is set to ETHSWT_STREAM_EGRESS_DESTINATION_OVERWRITE , then the egress destina- tion of this Ethernet frame shall be overwritten with the configured egress des- tination (see EthSwtStreamFilterActionDestinationPortModificationE- gressPortRef ).

requirement SWS_EthSwt_00487 [SWS_EthSwt_00487] 📄 PDF

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream), the corresponding EthSwtStreamFilterAction has an EthSwtStream- FilterActionDestinationPortModification configured and the EthSwtStreamFil- terActionDestinationPortModificationType is set to ETHSWT_STREAM_- EGRESS_DESTINATION_EXTEND , then the egress destination of this Ethernet frame shall be extended with the configured egress destination (see EthSwtStreamFil- terActionDestinationPortModificationEgressPortRef ).

requirement SWS_EthSwt_00490 [SWS_EthSwt_00490] 📄 PDF

{DRAFT} If a EthSwtPSFP is available, the corresponding EthSwtStreamGate has an EthSwtStreamGateIPV (internal priority value) config- ured and an Ethernet frame pass through the gate, then the internal priority value shall be assigned to this Ethernet frame.

requirement SWS_EthSwt_00491 [SWS_EthSwt_00491] 📄 PDF

{DRAFT} If an Ethernet frame match to EthSwtStreamIden- tification , this Ethernet frame pass the filtering and a EthSwtFlowMetering is available, then this Ethernet frame shall be handled by this EthSwtFlowMetering .

requirement SWS_EthSwt_00492 [SWS_EthSwt_00492] 📄 PDF

{DRAFT} A configured EthSwtFlowMetering shall per- form the metering according to the configuration: EthSwtFlowMeteringColor- Mode , EthSwtFlowMeteringCIR , EthSwtFlowMeteringCBS , EthSwtFlowMe- teringEIR , EthSwtFlowMeteringEBS and EthSwtFlowMeterCF

requirement SWS_EthSwt_00493 [SWS_EthSwt_00493] 📄 PDF

{DRAFT} If an Ethernet frame match to EthSwtStreamIden- tification , this Ethernet frame pass the filtering and a EthSwtPortATSSched- uler is available, then a elegibility time shall be assigned to this Ethernet frame and scheduled by this EthSwtPortATSScheduler .

requirement SWS_EthSwt_00494 [SWS_EthSwt_00494] 📄 PDF

{DRAFT} A configured EthSwtPortATSScheduler shall perform the scheduling according to the following configuration: EthSwtPor- tATSCommitedBurstSize , EthSwtPortATSCommitedInformationRate and EthSwtATSGroupMaximumResidenceTime .

requirement SWS_EthSwt_00511 [SWS_EthSwt_00511] 📄 PDF

[SWS_EthSwt_00511] Behaviour if given MAC-address is available at multiple Ethernet ports Upstream requirements: SRS_Eth_00087 ⌈If the given MAC-address is available at multiple Ethernet switch ports, then the Eth- Swt driver shall return with E_NOT_OK.⌋ Note: If EthSwtMacAddressLearningMode is set to SVL and the MAC-address given with MacAddrPtr is a MAC multicast address, then the given MAC-address could be available at serveral Ethernet switch ports of the Ethernet switch addressed with SwitchIdx.

requirement SWS_EthSwt_00512 [SWS_EthSwt_00512] 📄 PDF

[SWS_EthSwt_00512] Behaviour if EthSwtMacAddressLearningMode is set to SVL Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to SVL, then the EthSwt driver shall consider the given the MAC-address and ignore the given VLAN-ID to determine the MAC-address to Ethernet port assignment.⌋ Note: If EthSwtMacAddressLearningMode is set to SVL, the MAC-address to port assignment is shared across all VLANs and therefore the given VLAN is ignored.

requirement SWS_EthSwt_00513 [SWS_EthSwt_00513] 📄 PDF

[SWS_EthSwt_00513] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to value in a range from 1 to 4095 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to a value in a range from 1 to 4095, then the EthSwt driver shall consider the given the MAC-address and the given VLAN-ID to determine the MAC-address to Ethernet port assignment.⌋

requirement SWS_EthSwt_00514 [SWS_EthSwt_00514] 📄 PDF

[SWS_EthSwt_00514] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to 0 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to 0, then the EthSwt driver shall consider the given the MAC-address to determine the MAC-address to Ethernet port assignment irrespective of the VLAN.⌋

requirement SWS_EthSwt_00515 [SWS_EthSwt_00515] 📄 PDF

[SWS_EthSwt_00515] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to a value greater than 4095 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to a value greater that 4095, then the EthSwt driver shall return with E_NOT_OK.⌋

requirement SWS_EthSwt_00516 [SWS_EthSwt_00516] 📄 PDF

[SWS_EthSwt_00516] Creation of Ethernet switch port bit map Upstream requirements: SRS_Eth_00087 ⌈The function shall create a Ethernet switch port bit map addressed by PortBitMapPtr with respect to [SWS_EthSwt_00512], [SWS_EthSwt_00513] and

requirement SWS_EthSwt_00517 [SWS_EthSwt_00517] 📄 PDF

[SWS_EthSwt_00517] Behaviour for creation of Ethernet switch port bit map Upstream requirements: SRS_Eth_00087 ⌈If the creation of the Ethernet switch port bit map was successful finalized and trans- fered to the location addressed with PortBitMapPtr, then the EthSwt driver shall return with E_OK.⌋

requirement SWS_EthSwt_00518 [SWS_EthSwt_00518] 📄 PDF

[SWS_EthSwt_00518] Behaviour if Ethernet switch port bit map exceeds uint32 data type Upstream requirements: SRS_Eth_00087 ⌈If the resulting Ethernet switch port bit map exceeds the unit32 data type, then the EthSwt driver shall return with E_NOT_OK.⌋

requirement SWS_EthSwt_00519 [SWS_EthSwt_00519] 📄 PDF

[SWS_EthSwt_00519] compile configuration for API Upstream requirements: SRS_BSW_00171 ⌈The function EthSwt_GetPortMacAddrVlan shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPortMacAddrVlanApi.⌋

requirement SWS_EthSwt_00560 [SWS_EthSwt_00560] 📄 PDF

[SWS_EthSwt_00560] EthSwt_ReadMmd functionality ⌈The function EthSwt_- ReadMmd shall read the specified transceiver register through the MII or SPI of the indexed switch port.⌋

requirement SWS_EthSwt_00561 [SWS_EthSwt_00561] 📄 PDF

[SWS_EthSwt_00561] Configuring EthSwt_ReadMmd availability ⌈The function EthSwt_ReadMmd shall be precompile time configurable On/Off by the configuration parameter: EthSwtReadMmdApi.⌋

requirement SWS_EthSwt_00562 [SWS_EthSwt_00562] 📄 PDF

[SWS_EthSwt_00562] EthSwt_WriteMmd functionality ⌈The function EthSwt_- WriteMmd shall write a value to the specified transceiver register through the MII of the indexed switch port.⌋

requirement SWS_EthSwt_00563 [SWS_EthSwt_00563] 📄 PDF

[SWS_EthSwt_00563] Configuring EthSwt_WriteMmd availability ⌈The function EthSwt_WriteMmd shall be precompile time configurable On/Off by the configuration parameter: EthSwtWriteMmdApi.⌋

requirement SWS_EthSwt_91033 [SWS_EthSwt_91033] 📄 PDF

Overlayed return value of Std_ReturnType for Ethernet switch driver API EthSwt_WritePortMirror Configuration, if the port mirroring configuration is not supported by Ethernet switch driver or by the Ethernet switch hardware (e.g. the configured mirrored traffic direction (see SWS_EthSwt_91017 "TrafficDirectionIngressBitMask" and "TrafficDirectionEgressBitMask") for ingress and egress traffic of the same port is not supported, or the addressed Ethernet switch ports within the port mirror configuration are not accessible by the Ethernet switch driver)

requirement SWS_EthSwt_CONSTR_00409 [SWS_EthSwt_CONSTR_00409] 📄 PDF

The port specific timestamping (EthSwtPortTime StampSupport) can be set to TRUE , if clock synchronization for connected Ethernet switches is deactivated ( EthSwtClockSynchronizationSupport set to FALSE ).

requirement SWS_EthSwt_CONSTR_00410 [SWS_EthSwt_CONSTR_00410] 📄 PDF

The port specific timestamping ( EthSwtPort- TimeStampSupport ) can be set to TRUE , if EthSwtClockSynchronization- Support is activated and EthSwtPortRole is not ETHSWT_UP_LINK_PORT . Eth SwtPorts with EthSwtPortRole ETHSWT_UP_LINK_PORT are connected to another Ethernet switch and not considered for the time delay compensation, if EthSwt- ClockSynchronizationSupport is activated.

requirement SWS_EthSwt_CONSTR_00411 [SWS_EthSwt_CONSTR_00411] 📄 PDF

The ECUC partitions referenced by EthSwtCon- figEcucPartitionRef shall be a subset of the ECUC partitions referenced by Eth- SwtEcucPartitionRef .

requirement SWS_EthSwt_CONSTR_00412 [SWS_EthSwt_CONSTR_00412] 📄 PDF

EthSwtConfig , EthCtrlConfig and EthTr- cvConfig of one communication channel shall all reference the same ECUC parti- tion.

requirement SWS_EthSwt_CONSTR_00413 [SWS_EthSwt_CONSTR_00413] 📄 PDF

The module will operate as an independent in- stance in each of the partitions (see EthSwtEcucPartitionRef ), means the called API will only target the partition it is called in.

requirement SWS_EthSwt_CONSTR_00438 [SWS_EthSwt_CONSTR_00438] 📄 PDF

If EthSwtEcucPartitionRef references one or more ECUC partitions, EthSwtConfigEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well.

requirement SWS_EthSwt_CONSTR_00450 [SWS_EthSwt_CONSTR_00450] 📄 PDF

{DRAFT} The switch configuration shall support the configuration how packets will be forwarded with respect to configured VLANs by using the configuration parameters of the subcontainer EthSwtVlanMembership .

requirement SWS_EthSwt_CONSTR_00451 [SWS_EthSwt_CONSTR_00451] 📄 PDF

{DRAFT} The switch configuration shall support the configuration how VLANs will be inserted into Ethernet frames or existing VLANs will be modified by the configuration EthSwtPortIngressVlanModification .

requirement SWS_EthSwt_CONSTR_00452 [SWS_EthSwt_CONSTR_00452] 📄 PDF

{DRAFT} If EthSwtPortIngressDefaultVlan and EthSwtPortIngressDefaultPriority for a particular Ethernet port is avail- able, then the default VLAN and the default priority of this hardware Ethernet switch port shall be configured with the available values.

requirement SWS_EthSwt_CONSTR_00453 [SWS_EthSwt_CONSTR_00453] 📄 PDF

{DRAFT} If Ethernet frames without a VLAN tag (untagged Ethernet frame) which are received on a particular Ethernet port shall be dropped, then the parameter EthSwtPortIngressDropUntagged of this Ethernet port shall be set to TRUE and the parameters EthSwtPortIngressDefaultVlan and EthSwtPortIngressDefaultPriority of this Ethernet port shall not be con- figured (multiplicity of both parameters are 0 )

requirement SWS_EthSwt_CONSTR_00454 [SWS_EthSwt_CONSTR_00454] 📄 PDF

{DRAFT} If Ethernet frames without a VLAN tag (untagged Ethernet frame) which are received on a particular Ethernet port shall be handled for further processing with a dedicated VLAN-ID and VLAN priority, then the parameter EthSwtPortIngressDropUntagged of this Ethernet port shall be set to FALSE and the parameters EthSwtPortIngressDefaultVlan and EthSwtPort- IngressDefaultPriority of this Ethernet port shall be configured.

requirement SWS_EthSwt_CONSTR_00456 [SWS_EthSwt_CONSTR_00456] 📄 PDF

{DRAFT} The switch configuration shall support the configuration of priority to traffic class mapping per ingress port, i.e. a priority to traf- fic class table can be configured (see EthSwtPortTrafficClassAssignment ).

requirement SWS_EthSwt_CONSTR_00457 [SWS_EthSwt_CONSTR_00457] 📄 PDF

{DRAFT} If the same EthSwtPortIngress need to configure a priority to traffic class assignment, then exclusively either EthSwt- PortTrafficClassAssignment or EthSwtPriorityTrafficClassAssign- ment shall be configured.

requirement SWS_EthSwt_CONSTR_00458 [SWS_EthSwt_CONSTR_00458] 📄 PDF

{DRAFT} The switch configuration shall support the configuration how the PCP field of incoming Ethernet frames will be modified be- fore they are forwarded to the egress port, i.e. a priority regeneration table can be configured (Please refer to EthSwtPriorityRegeneration , EthSwtPriorityRe- generationIngressPriority and EthSwtPriorityRegenerationRegener- atedPriority .

requirement SWS_EthSwt_CONSTR_00459 [SWS_EthSwt_CONSTR_00459] 📄 PDF

{DRAFT} The Ethernet switch configuration shall support a port based configuration at ingress side to assign an outbound VLAN pri- ority to incoming Ethernet frames according to their regenerated VLAN priority (a.k.a. PCP field, see [SWS_EthSwt_00178]), i.e. an outbound VLAN priority assignment can be configured (see EthSwtPortOutboundVlanPriorityAssignment , Eth- SwtPriorityRegeneratedIngressVlanPriority , and EthSwtPriorityOut- boundVlanPriority ).

requirement SWS_EthSwt_CONSTR_00464 [SWS_EthSwt_CONSTR_00464] 📄 PDF

{DRAFT} If an instance of an EthSwtStreamI- dentification is configured, then it shall be possible that this EthSwtStreamI- dentification could reference none, one or multiple ingress and egress ports via EthSwtPortIngressStreamIndentificationRef and EthSwtPortEgressStreamIdentifi- cationRef respectively.

requirement SWS_EthSwt_CONSTR_00468 [SWS_EthSwt_CONSTR_00468] 📄 PDF

{DRAFT} If an instance of a configured Eth- SwtStreamIdentification references an EthSwtPortIngress or EthSwt- PortEgress , then this instance of stream identification definition shall reference the same EthSwtPortIngress or EthSwtPortEgress exclusively one time.

requirement SWS_EthSwt_CONSTR_00470 [SWS_EthSwt_CONSTR_00470] 📄 PDF

{DRAFT} Every instance of EthSwtStreamIden- tification shall have a unique position value configured via EthSwtStreamIden- tificationPosition . The value shall start with 0 and continue in ascending order with no gaps for each subsequential instance of EthSwtStreamIdentification .

requirement SWS_EthSwt_CONSTR_00473 [SWS_EthSwt_CONSTR_00473] 📄 PDF

{DRAFT} The configuration shall allow to have exlu- sively either EthSwtFlowMetering or EthSwtPortATSScheduler in the same EthSwtStreamIdentification configured.

requirement SWS_EthSwt_CONSTR_00474 [SWS_EthSwt_CONSTR_00474] 📄 PDF

{DRAFT} If an EthSwtPortATSScheduler is configured, then additionally a EthSwtPSFP shall be available in the same EthSwt- StreamIdentification .

requirement SWS_EthSwt_CONSTR_00485 [SWS_EthSwt_CONSTR_00485] 📄 PDF

{DRAFT} If a filter action EthSwtStreamFilter- ActionDestinationPortModification is configured, then this EthSwtStream- FilterActionDestinationPortModification shall reference the same Eth- SwtPortEgress via EthSwtStreamFilterActionDestinationPortModifi- cationEgressPortRef exclusively one time.

requirement SWS_EthSwt_CONSTR_00488 [SWS_EthSwt_CONSTR_00488] 📄 PDF

{DRAFT} If a EthSwtStreamIdentification has a EthSwtPSFP configured, then a EthSwtStreamGate shall be configured.

requirement SWS_EthSwt_CONSTR_00489 [SWS_EthSwt_CONSTR_00489] 📄 PDF

{DRAFT} If a EthSwtPSFP is configured, then the corresponding Ethernet switch hardware shall be configured such that Ethernet frames (i.e. streams) could always pass through (open gate).

requirement SWS_EthSwt_CONSTR_00495 [SWS_EthSwt_CONSTR_00495] 📄 PDF

{DRAFT} The Ethernet switch configuration shall support to configure the linkage between the priority of an received Ethernet frame and the according queue of an egress port via the traffic class assignment. There- fore the priority to traffic class assignment at an ingress port (exclusively either via EthSwtPortTrafficClassAssignment or EthSwtPriorityTrafficClassAs- signment ) and the traffic class to a queue assignment at the egress port ( via EthSwtPortQueueTrafficClassAssignment ) shall be configured.

requirement SWS_EthSwt_CONSTR_00496 [SWS_EthSwt_CONSTR_00496] 📄 PDF

{DRAFT} The configuration of the Ethernet switch driver shall support different egress port structures by the configuration EthSwt- PortEgressScheduler .

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_EthSwt
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_EthSwt@rel:R20-11#07a3d7a1
Content hash
07a3d7a1
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_EthernetSwitchDriver.pdf#nameddest=SWS_EthSwt_00006

主题图

服务

76
EthSwt_BackgroundTaskEthSwt_CheckWakeupEthSwt_DeletePortMirrorConfigurationEthSwt_EnableVlanEthSwt_EthRxFinishedIndicationEthSwt_EthRxProcessFrameEthSwt_EthTxAdaptBufferLengthEthSwt_EthTxFinishedIndicationEthSwt_EthTxPrepareFrameEthSwt_EthTxProcessFrameEthSwt_ExtractStreamHandleIdxEthSwt_GetArlTableEthSwt_GetBaudRateEthSwt_GetCfgDataInfoEthSwt_GetCfgDataRawEthSwt_GetCounterValuesEthSwt_GetDuplexModeEthSwt_GetLinkStateEthSwt_GetMacLearningModeEthSwt_GetMaxFIFOBufferFillLevelEthSwt_GetPortCableDiagnosticsResultEthSwt_GetPortIdentifierEthSwt_GetPortMacAddrEthSwt_GetPortMacAddrVlanEthSwt_GetPortMirrorStateEthSwt_GetPortSignalQualityEthSwt_GetRxMgmtObjectEthSwt_GetRxStatsEthSwt_GetStreamHandleIdxStatisticsEthSwt_GetSwitchIdentifierEthSwt_GetSwitchPortModeEthSwt_GetSwitchPortWakeupReasonEthSwt_GetSwitchRegEthSwt_GetTxErrorCounterValuesEthSwt_GetTxMgmtObjectEthSwt_GetTxStatsEthSwt_MacSecAddRxSaEthSwt_MacSecAddRxSaNotificationEthSwt_MacSecAddTxSaEthSwt_MacSecAddTxSaNotificationEthSwt_MacSecDeleteRxSaEthSwt_MacSecDeleteTxSaEthSwt_MacSecGetMacSecStatsEthSwt_MacSecGetMacSecStatsNotificationEthSwt_MacSecGetTxSaNextPnEthSwt_MacSecInitRxScEthSwt_MacSecResetRxScEthSwt_MacSecSetControlledPortEnabledEthSwt_MacSecUpdateRxSaEthSwt_MacSecUpdateSecYEthSwt_MacSecUpdateSecYNotificationEthSwt_MacSecUpdateTxSaEthSwt_NvmSingleBlockCallbackEthSwt_PortEnableTimeStampEthSwt_PortLinkStateRequestEthSwt_ReadMmdEthSwt_ReadPortMirrorConfigurationEthSwt_ReadTrcvRegisterEthSwt_ResetConfigurationEthSwt_RunPortCableDiagnosticEthSwt_SetForwardingModeEthSwt_SetMacLearningModeEthSwt_SetMgmtInfoEthSwt_SetPortLoopbackModeEthSwt_SetPortMirrorStateEthSwt_SetPortTestModeEthSwt_SetPortTxModeEthSwt_SetStreamStateEthSwt_SetSwitchPortModeEthSwt_SetSwitchRegEthSwt_StartSwitchPortAutoNegotiationEthSwt_StoreConfigurationEthSwt_VerifyConfigEthSwt_WriteMmdEthSwt_WritePortMirrorConfigurationEthSwt_WriteTrcvRegister

需求

248
SWS_EthSwt_00001SWS_EthSwt_00002SWS_EthSwt_00007SWS_EthSwt_00008SWS_EthSwt_00009SWS_EthSwt_00011SWS_EthSwt_00016SWS_EthSwt_00019SWS_EthSwt_00022SWS_EthSwt_00023SWS_EthSwt_00026SWS_EthSwt_00029SWS_EthSwt_00032SWS_EthSwt_00035SWS_EthSwt_00038SWS_EthSwt_00042SWS_EthSwt_00045SWS_EthSwt_00049SWS_EthSwt_00052SWS_EthSwt_00056SWS_EthSwt_00061SWS_EthSwt_00087SWS_EthSwt_00090SWS_EthSwt_00092SWS_EthSwt_00095SWS_EthSwt_00098SWS_EthSwt_00099SWS_EthSwt_00106SWS_EthSwt_00109SWS_EthSwt_00113SWS_EthSwt_00115SWS_EthSwt_00118SWS_EthSwt_00120SWS_EthSwt_00124SWS_EthSwt_00126SWS_EthSwt_00127SWS_EthSwt_00128SWS_EthSwt_00129SWS_EthSwt_00130SWS_EthSwt_00131SWS_EthSwt_00132SWS_EthSwt_00133SWS_EthSwt_00134SWS_EthSwt_00135SWS_EthSwt_00136SWS_EthSwt_00154SWS_EthSwt_00156SWS_EthSwt_00157SWS_EthSwt_00162SWS_EthSwt_00164SWS_EthSwt_00173SWS_EthSwt_00177SWS_EthSwt_00178SWS_EthSwt_00179SWS_EthSwt_00180SWS_EthSwt_00181SWS_EthSwt_00183SWS_EthSwt_00186SWS_EthSwt_00188SWS_EthSwt_00191SWS_EthSwt_00192SWS_EthSwt_00194SWS_EthSwt_00196SWS_EthSwt_00197SWS_EthSwt_00199SWS_EthSwt_00202SWS_EthSwt_00204SWS_EthSwt_00207SWS_EthSwt_00210SWS_EthSwt_00212SWS_EthSwt_00215SWS_EthSwt_00217SWS_EthSwt_00220SWS_EthSwt_00222SWS_EthSwt_00225SWS_EthSwt_00226SWS_EthSwt_00228SWS_EthSwt_00229SWS_EthSwt_00230SWS_EthSwt_00233SWS_EthSwt_00234SWS_EthSwt_00235SWS_EthSwt_00240SWS_EthSwt_00241SWS_EthSwt_00242SWS_EthSwt_00243SWS_EthSwt_00245SWS_EthSwt_00249SWS_EthSwt_00253SWS_EthSwt_00257SWS_EthSwt_00261SWS_EthSwt_00264SWS_EthSwt_00268SWS_EthSwt_00273SWS_EthSwt_00282SWS_EthSwt_00287SWS_EthSwt_00291SWS_EthSwt_00292SWS_EthSwt_00293SWS_EthSwt_00297SWS_EthSwt_00299SWS_EthSwt_00303SWS_EthSwt_00305SWS_EthSwt_00308SWS_EthSwt_00309SWS_EthSwt_00312SWS_EthSwt_00313SWS_EthSwt_00317SWS_EthSwt_00318SWS_EthSwt_00322SWS_EthSwt_00323SWS_EthSwt_00327SWS_EthSwt_00328SWS_EthSwt_00332SWS_EthSwt_00334SWS_EthSwt_00338SWS_EthSwt_00340SWS_EthSwt_00344SWS_EthSwt_00346SWS_EthSwt_00350SWS_EthSwt_00362SWS_EthSwt_00370SWS_EthSwt_00372SWS_EthSwt_00373SWS_EthSwt_00374SWS_EthSwt_00375SWS_EthSwt_00376SWS_EthSwt_00377SWS_EthSwt_00378SWS_EthSwt_00379SWS_EthSwt_00386SWS_EthSwt_00387SWS_EthSwt_00389SWS_EthSwt_00390SWS_EthSwt_00391SWS_EthSwt_00392SWS_EthSwt_00393SWS_EthSwt_00394SWS_EthSwt_00395SWS_EthSwt_00396SWS_EthSwt_00397SWS_EthSwt_00398SWS_EthSwt_00399SWS_EthSwt_00400SWS_EthSwt_00403SWS_EthSwt_00404SWS_EthSwt_00405SWS_EthSwt_00406SWS_EthSwt_00407SWS_EthSwt_00408SWS_EthSwt_00414SWS_EthSwt_00415SWS_EthSwt_00416SWS_EthSwt_00417SWS_EthSwt_00418SWS_EthSwt_00419SWS_EthSwt_00420SWS_EthSwt_00421SWS_EthSwt_00422SWS_EthSwt_00423SWS_EthSwt_00424SWS_EthSwt_00425SWS_EthSwt_00426SWS_EthSwt_00427SWS_EthSwt_00428SWS_EthSwt_00429SWS_EthSwt_00430SWS_EthSwt_00431SWS_EthSwt_00432SWS_EthSwt_00433SWS_EthSwt_00434SWS_EthSwt_00435SWS_EthSwt_00436SWS_EthSwt_00437SWS_EthSwt_00439SWS_EthSwt_00440SWS_EthSwt_00441SWS_EthSwt_00442SWS_EthSwt_00443SWS_EthSwt_00448SWS_EthSwt_00449SWS_EthSwt_00455SWS_EthSwt_00460SWS_EthSwt_00461SWS_EthSwt_00462SWS_EthSwt_00463SWS_EthSwt_00465SWS_EthSwt_00466SWS_EthSwt_00467SWS_EthSwt_00469SWS_EthSwt_00471SWS_EthSwt_00472SWS_EthSwt_00475SWS_EthSwt_00476SWS_EthSwt_00477SWS_EthSwt_00478SWS_EthSwt_00479SWS_EthSwt_00480SWS_EthSwt_00481SWS_EthSwt_00482SWS_EthSwt_00483SWS_EthSwt_00484SWS_EthSwt_00486SWS_EthSwt_00487SWS_EthSwt_00490SWS_EthSwt_00491SWS_EthSwt_00492SWS_EthSwt_00493SWS_EthSwt_00494SWS_EthSwt_00511SWS_EthSwt_00512SWS_EthSwt_00513SWS_EthSwt_00514SWS_EthSwt_00515SWS_EthSwt_00516SWS_EthSwt_00517SWS_EthSwt_00518SWS_EthSwt_00519SWS_EthSwt_00560SWS_EthSwt_00561SWS_EthSwt_00562SWS_EthSwt_00563SWS_EthSwt_91033SWS_EthSwt_CONSTR_00409SWS_EthSwt_CONSTR_00410SWS_EthSwt_CONSTR_00411SWS_EthSwt_CONSTR_00412SWS_EthSwt_CONSTR_00413SWS_EthSwt_CONSTR_00438SWS_EthSwt_CONSTR_00450SWS_EthSwt_CONSTR_00451SWS_EthSwt_CONSTR_00452SWS_EthSwt_CONSTR_00453SWS_EthSwt_CONSTR_00454SWS_EthSwt_CONSTR_00456SWS_EthSwt_CONSTR_00457SWS_EthSwt_CONSTR_00458SWS_EthSwt_CONSTR_00459SWS_EthSwt_CONSTR_00464SWS_EthSwt_CONSTR_00468SWS_EthSwt_CONSTR_00470SWS_EthSwt_CONSTR_00473SWS_EthSwt_CONSTR_00474SWS_EthSwt_CONSTR_00485SWS_EthSwt_CONSTR_00488SWS_EthSwt_CONSTR_00489SWS_EthSwt_CONSTR_00495SWS_EthSwt_CONSTR_00496

详细视图

请在大纲中选择一个条目。

初始化与状态

Returns the version information of this module.

void EthSwt_GetVersionInfo(Std_VersionInfoType* VersionInfoPtr);

Initializes the Ethernet Switch Driver

void EthSwt_Init(const EthSwt_ConfigType* CfgPtr);

服务

The background task should be scheduled as often as possible when no other task runs. It may be used for switch and port initialization in case the EthSwt_Init function needs too much time.

void EthSwt_BackgroundTask(void);

API is called by EthIf. The Ethernet switch driver request to check for a wake-up at all Ethernet switch ports which reference an EthTrcv. For those Ethernet switch ports the call is forwarded to the referenced EthTrcv. The function could be called in context of an interrupt service routine or on task level Note: Interrupt service routine consuming time has to be considered, since all EthSwtPorts of the maintained Ethernet switches has to be checked. Therefore the call is forwarded to the referred EthTrcv where the request to check for wake-up is stored. The check of the Ethernet hardware is done asynchronously in the context of the EthTrcv_MainFunction.

Std_ReturnType EthSwt_CheckWakeup(uint8 SwitchIdx);

Delete the stored port mirror configuration of the given MirroredSwitchIdx. If no port mirror configuration was found for the given MirroredSwitchIdx, the return value shall be E_OK.

Std_ReturnType EthSwt_DeletePortMirrorConfiguration(uint8 MirroredSwitchIdx);

Enables or disables a pre-configured VLAN at a certain port of a switch.

Std_ReturnType EthSwt_EnableVlan(uint8 SwitchIdx, uint8 SwitchPortIdx, uint16 VlanId, boolean Enable);

Indication for a finished receive process for a specific Ethernet frame, which results in providing the management information retrieved during EthSwt_EthRxProcessFrame().

Std_ReturnType EthSwt_EthRxFinishedIndication(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Function inspects the Ethernet frame passed by the data pointer for management information and stores it for later use in EthSwt_EthRxFinishedIndication().

Std_ReturnType EthSwt_EthRxProcessFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr, boolean* IsMgmtFrameOnlyPtr);

Modifies the buffer length to be able to insert management information.

void EthSwt_EthTxAdaptBufferLength(uint16* LengthPtr);

Indication for a finished transmit process for a specific Ethernet frame.

Std_ReturnType EthSwt_EthTxFinishedIndication(uint8 CtrlIdx, Eth_BufIdxType BufIdx);

Prepares the Ethernet frame for common Ethernet communication (frame shall be handled by switch according to the common address resolution behavior) and stores the information for processing of EthSwt_EthTxFinishedIndication().

Std_ReturnType EthSwt_EthTxPrepareFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr);

Function inserts management information into the Ethernet frame.

Std_ReturnType EthSwt_EthTxProcessFrame(uint8 CtrlIdx, Eth_BufIdxType BufIdx, uint8* * DataPtr, uint16* LengthPtr);

Extracts the StreamHandleIdx from the switch vendor specific part of the network packet header Tags: atp.Status=draft

Std_ReturnType EthSwt_ExtractStreamHandleIdx(const Eth_DataType* DataPtr, uint16 LenByte, uint16* StreamHandleIdxPtr);

Obtains the address resolution table of a switch and copies the list into a user provided buffer. The function will copy all or numberOfElements into the output list. If input value of numberOf Elements is 0 the function will not copy any data but only return the number of valid entries in the cache. arlTableListPointer may be NULL_PTR in this case.

Std_ReturnType EthSwt_GetArlTable(uint8 switchIdx, uint16* numberOfElements, Eth_MacVlanType* arlTableListPointer);

Obtains the baud rate of the indexed switch port

Std_ReturnType EthSwt_GetBaudRate(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_BaudRateType* BaudRatePtr);

Retrieves the total size of data and the memory start address of the indexed Ethernet Switch.

Std_ReturnType EthSwt_GetCfgDataInfo(uint8 SwitchIdx, uint32* DataSizePtr, uint32* DataAdressPtr);

Retrieves the data in memory of the indexed Ethernet switch in variable length

Std_ReturnType EthSwt_GetCfgDataRaw(uint8 SwitchIdx, uint32 Offset, uint16 Length, uint8* BufferPtr);

Reads a list with drop counter values of the corresponding port of the switch. The meaning of these values is described at Eth_CounterType.

Std_ReturnType EthSwt_GetCounterValues(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_CounterType* CounterPtr);

Obtains the duplex mode of the indexed switch port

Std_ReturnType EthSwt_GetDuplexMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_DuplexModeType* DuplexModePtr);

Obtains the link state of the indexed switch port

Std_ReturnType EthSwt_GetLinkState(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_LinkStateType* LinkStatePtr);

Returns the MAC learning mode, i.e. 1.) HW learning enabled, 2.) Hardware learning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes

Std_ReturnType EthSwt_GetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType* MacLearningMode);

The function retrieves the maximum amount of allocated FIFO buffer of the indexed Ethernet switch egress port. If the Ethernet switch hardware does not support Ethernet switch port based maximal FIFO buffer level, the content of SwitchPortEgressFifoBufferLevelPtr shall be set to 0xFFFFFFFF. This API may be called by e.g. a CDD.

Std_ReturnType EthSwt_GetMaxFIFOBufferFillLevel(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 SwitchPortEgressFifoIdx, uint32* SwitchPortEgressFifoBufferLevelPtr);

Retrieves the cable diagnostics result of the indexed Ethernet switch port respectively the referenced Ethernet Transceiver Driver.

Std_ReturnType EthSwt_GetPortCableDiagnosticsResult(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_CableDiagResultType* ResultPtr);

This function retrieves the OUI (24 bit) of the indexed Ethernet switch port.

Std_ReturnType EthSwt_GetPortIdentifier(uint8 SwitchIdx, uint8 PortIdx, uint32* OrgUniqueIdPtr, uint8* ModelNrPtr, uint8* RevisionNrPtr);

Obtains the port over which this MAC-address at the indexed switch can be reached. The result might be used for a DHCP-server which will need the port/MAC-resolution. If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK.

Std_ReturnType EthSwt_GetPortMacAddr(uint8 SwitchIdx, const uint8* MacAddrPtr, uint8* PortIdxPtr);

Obtains an Ethernet switch port bit map, where the given MAC-address with respect to the given VLAN-ID is assigned to. The return argument PortBitMapPtr points to uint32 value which shall be handled as Ethernet switch port bit map. Each bit of the Ethernet switch port bit map represents an EthSwtPortIdx, where the least significant bit (bit 0) represents EthSwitchPortIdx 0 and most significant bit (bit 32) represents EthSwitchPortIdx 31 (e.g. 0x0001 == EthSwitch PortIdx 0 is set; 0x8005 == EthSwitchPortIdx 0, 2 and 31 are set).

Std_ReturnType EthSwt_GetPortMacAddrVlan(uint8 SwitchIdx, const uint8* MacAddrPtr, const uint16* VlanIdPtr, uint32* PortBitMapPtr);

Obtain the current status of the port mirroring for the indexed Ethernet switch port

Std_ReturnType EthSwt_GetPortMirrorState(uint8 SwitchIdx, uint8 PortIdx, EthSwt_PortMirrorStateType* PortMirrorStatePtr);

The function retrieves the signal quality of the link of the indexed Ethernet switch port. If no transceiver is referenced the signal quality shall be set to 0xFFFFFFFF.

Std_ReturnType EthSwt_GetPortSignalQuality(uint8 SwitchIdx, uint8 PortIdx, uint32* SignalQualityPtr);

Obtains the MgmtObject of the (in this context) unique DataPtr.

Std_ReturnType EthSwt_GetRxMgmtObject(uint8 CtrlIdx, Eth_DataType* DataPtr, EthSwt_MgmtObjectType* * MgmtObjectPtr);

Returns a list of statistic counters defined with Eth_RxTatsType. The majority of these Counters are derived from the IETF RFC2819.

Std_ReturnType EthSwt_GetRxStats(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_RxStatsType* RxStats);

Requests the bucket counter values from the switch Tags: atp.Status=draft

void EthSwt_GetStreamHandleIdxStatistics(uint8 SwitchIdx);

Obtain the Organizationally Unique Identifier that is given by the IEEE of the indexed Ethernet switch. This function shall provide the OUI of Ethernet switch. The OUI has a size of 24 bit. If a ethernet switch can provide the OUI the 8 most significant bits of the OUI shall be set to 0x00xxxxxx. If a Ethernet switch can not provide the OUI the 8 most significant bits of the OUI shall be set to 0xFFxxxxxx.

Std_ReturnType EthSwt_GetSwitchIdentifier(uint8 SwitchIdx, uint32* OrgUniqueIdPtr);

Obtains the mode of the indexed switch port

Std_ReturnType EthSwt_GetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType* SwitchModePtr);

This function obtains the wake up reasons of the the indexed Ethernet switch port by calling Eth Trcv_GetBusWuReason(...) of the referenced EthTrcv

Std_ReturnType EthSwt_GetSwitchPortWakeupReason(uint8 SwitchIdx, uint8 SwitchPortIdx, EthTrcv_WakeupReasonType Reason);

Generic API for reading the content of a switch register

Std_ReturnType EthSwt_GetSwitchReg(uint8 SwitchIdx, uint32 page, uint32 register, uint32* registerContent);

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643 defined with Eth_TxErrorCounterValuesType, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

Std_ReturnType EthSwt_GetTxErrorCounterValues(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxErrorCounterValuesType* TxStats);

Obtains the MgmtObject of the (in this context) unique BufIdx.

Std_ReturnType EthSwt_GetTxMgmtObject(uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtObjectType* * MgmtObjectPtr);

Returns the list of Transmission Statistics out of IETF RFC1213 defined with Eth_TxStatsType, where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

Std_ReturnType EthSwt_GetTxStats(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_TxStatsType* TxStats);

Request the Ethernet Switch Driver to create a Reception Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecAddRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Callback to notify that EthSwt_MacSecAddRxSa finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecAddRxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Requests the Ethernet Switch Driver to create a Transmission Secure Association in the Transceiver. The Short Secure Channel Identifier is included to support XPN configurations. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecAddTxSa(EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, uint32 Ssci, const Mka_SakKeyPtrType* KeysPtr, boolean Active);

Callback to notify that EthSwt_MacSecAddTxSa finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecAddTxSaNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Request the Ethernet Switch Driver to remove the Reception Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecDeleteRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to remove the Transmission Secure Association identified by the provided Association Number. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecDeleteTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An);

Request the Ethernet Switch Driver to provide MACsec statistics. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecGetMacSecStats(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Callback to notify that EthSwt_MacSecGetMacSecStats finished and provide the requested statistics. Tags: atp.Status=DRAFT

void EthSwt_MacSecGetMacSecStatsNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_Stats_SecYType* MacSecStats);

Request the Ethernet Switch Driver to return the Packet Number that is used for the next packet in the given Transmission Secure Association. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecGetTxSaNextPn(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64* NextPnPtr);

Requests the Ethernet Switch Driver to configure a Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecInitRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests the Ethernet Switch Driver to reset to default the MACsec values of the Reception Secure Channel for the given Secure Channel Identifier. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecResetRxSc(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint64 Sci);

Requests to set the Controlled Port enabled parameter of a PAE. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecSetControlledPortEnabled(const EthSwt_MgmtInfoType* MgmtInfoPtr, boolean ControlledPortEnabled);

Request the Ethernet Switch Driver to update the Reception Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateRxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 LowestPn, boolean Active);

Requests the Ethernet Switch to update the SecY/PAC of the PHY with the provided parameters. A Transmission Secure Channel with the provided SCI shall be configured during the first call. A pointer to a MACsec Basic Parameters Configuration file shall be provided to create the Secure Channel. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateSecY(const EthSwt_MgmtInfoType* MgmtInfoPtr, const Mka_MacSecConfigType* MACsecCfgPtr, uint64 TxSci);

Callback to notify that EthSwt_MacSecUpdateSecY finished. Tags: atp.Status=DRAFT

void EthSwt_MacSecUpdateSecYNotification(const EthSwt_MgmtInfoType* MgmtInfoPtr);

Requests the Ethernet Switch Driver to update the Transmission Secure Association with the given Packet Number. The Active parameter is included to change the specified AN status. Tags: atp.Status=DRAFT

Std_ReturnType EthSwt_MacSecUpdateTxSa(const EthSwt_MgmtInfoType* MgmtInfoPtr, uint8 An, uint64 NextPn, boolean Active);

Function will be called by the NVRAMManager after the switch configuration has been stored or resetted.

Std_ReturnType EthSwt_NvmSingleBlockCallback(NvM_BlockRequestType BlockRequest, NvM_RequestResultType JobResult);

Activates egress time stamping on a dedicated message object on a dedicated port of a Switch if EthSwtPortTimeStampSupport is set to TRUE for this port. The selective activation of dedicated message objects for time stamping reduces the number of notification calls only to the required calls. Some HW does store once the egress time stamp marker and some HW needs it always before transmission. There will be no disabled functionality, due to the fact, that the message type is always "time stamped" by network design.

Std_ReturnType EthSwt_PortEnableTimeStamp(uint8 CtrlIdx, Eth_BufIdxType BufIdx, EthSwt_MgmtInfoType* MgmtInfoPtr);

Request a link state by calling EthTrcv_TransceiverLinkStateRequest with the TrcvIdx of the Ethernet transceiver which is referenced by the Ethernet Switch port (PortIdx).

Std_ReturnType EthSwt_PortLinkStateRequest(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_LinkStateType PortLinkState);

Reads a transceiver register using Clause 45 access if supported by hardware or implements a Clause 45 access using Clause 22 operations.

Std_ReturnType EthSwt_ReadMmd(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 Mmd, uint16 RegIdx, uint16* RegValPtr);

Obtain the port mirror configuration of the given Ethernet switch.

Std_ReturnType EthSwt_ReadPortMirrorConfiguration(uint8 MirroredSwitchIdx, EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Generic API for reading the content of a transceiver register

Std_ReturnType EthSwt_ReadTrcvRegister(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 RegIdx, uint16* RegValPtr);

The function shall request to reset and store the configuration of the learned MAC/Port tables of a Ethernet switch in a persistent manner. This could be used by e.g. a CDD.

Std_ReturnType EthSwt_ResetConfiguration(uint8 SwitchIdx);

Trigger the cable diagnostics of the given Ethernet Switch port (PortIdx) by calling EthTrcv_Run CableDiagnostic of the referenced Ethernet transceiver.

Std_ReturnType EthSwt_RunPortCableDiagnostic(uint8 SwitchIdxIdx, uint8 PortIdx);

Configures switch to start or stop forwarding for all ports. This API call may be used during switch configuration verification.

Std_ReturnType EthSwt_SetForwardingMode(uint8 SwitchIdx, boolean mode);

Sets the MAC learning mode in one of the tree modes: 1.) HW learning enabled, 2.) Hardware learning disabled, 3.) Software learning enabled. Note: This feature is hardware dependent, i.e. the switch hardware needs to support the different learning modes.

Std_ReturnType EthSwt_SetMacLearningMode(uint8 SwitchIdx, uint8 SwitchPortIdx, EthSwt_MacLearningType MacLearningMode);

Extends the Ethernet frame prepared previously by EthSwt_EthTxPrepareFrame() with the management information to achieve transmission only on specific ports.

Std_ReturnType EthSwt_SetMgmtInfo(uint8 CtrlIdx, Eth_BufIdxType BufIdx, const EthSwt_MgmtInfoType* MgmtInfoPtr);

Activates a given test loop-back mode of the indexed Ethernet switch port.

Std_ReturnType EthSwt_SetPortLoopbackMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyLoopbackModeType Mode);

Request to set the given port mirroring state of the port mirror configuration for the given Ethernet switch.

Std_ReturnType EthSwt_SetPortMirrorState(uint8 MirroredSwitchIdx, EthSwt_PortMirrorStateType PortMirrorState);

Activates a given test mode of the indexed Ethernet switch port.

Std_ReturnType EthSwt_SetPortTestMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTestModeType Mode);

Activates a given transmission mode of the indexed Ethernet switch port.

Std_ReturnType EthSwt_SetPortTxMode(uint8 SwitchIdx, uint8 PortIdx, EthTrcv_PhyTxModeType Mode);

This function is called by an upper layer application (e.g. diagnostic application) via the EthIf module to control the activity status of a configured stream (given with StreamHandleIdx) within an dedicated Ethernet switch (given with SwitchIdx). Tags: atp.Status=draft

void EthSwt_SetStreamState(uint8 SwitchIdx, uint8 StreamHandleIdx, boolean StreamActivityStatus);

Enables/disables the indexed switch port

Std_ReturnType EthSwt_SetSwitchPortMode(uint8 SwitchIdx, uint8 SwitchPortIdx, Eth_ModeType PortMode);

Generic API for writing the content of a switch register

Std_ReturnType EthSwt_SetSwitchReg(uint8 SwitchIdx, uint32 page, uint32 register, uint32 registerContent);

Starts the auto-negotiation of the indexed switch port

Std_ReturnType EthSwt_StartSwitchPortAutoNegotiation(uint8 SwitchIdx, uint8 SwitchPortIdx);

Trigger the storage/reset of the configuration of the learned MAC/Port tables of a switch in a persistent manner and will be used by e.g. CDD.

Std_ReturnType EthSwt_StoreConfiguration(uint8 SwitchIdx);

Verifies the Switch Configuration depending on the HW-Architecture, HW-capability and the intended accuracy of this verification.

Std_ReturnType EthSwt_VerifyConfig(uint8 SwitchIdx, boolean* Result);

Generic API for writing the content of a transceiver register

Std_ReturnType EthSwt_WriteMmd(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 Mmd, uint16 RegIdx, uint16 RegVal);

Store the given port mirror configuration in a shadow buffer in the Ethernet switch driver for the given MirroredSwitchIdx.

Std_ReturnType EthSwt_WritePortMirrorConfiguration(uint8 MirroredSwitchIdx, const EthSwt_PortMirrorCfgType* PortMirrorConfigurationPtr);

Generic API for writing the content of a transceiver register

Std_ReturnType EthSwt_WriteTrcvRegister(uint8 SwitchIdx, uint8 SwitchPortIdx, uint8 RegIdx, uint16 RegVal);

Callout 与预期接口

Is called, if a link which is configured goes down.

void <EthSwtLinkDownCallout>(uint8 SwitchIdx, uint8 PortIdx);

Is called, if a link which is configured goes up

void <EthSwtLinkUpCallout>(uint8 SwitchIdx, uint8 PortIdx);

Job end notification of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration

void <EthSwtPersistentConfigurationResultCallback>(NvM_RequestResultType JobResult);

The call of the function EthSwt_GetCfgDataRaw() triggers a asynchrony read of a certain memory section of the Ethernet switch driver. If the read is done, the configured callout function <GetCfgDataRawDone> shall be called]

void <GetCfgDataRawDone>(uint8 SwitchIdx);

周期性

Service to support asynchronous behavior of API calls

void EthSwt_MainFunction(void);

类型

Implementation specific structure of the post build configuration.

The interpretation of this value

Type for holding the management information received/transmitted on Switches (ports).

Provides information about all struct member elements. The ownership gives information whether EthSwt has finished its activities in providing all struct member elements.

Will be set from EthSwt and marks EthSwt_MgmtObject as valid or not. So the upper layer will be able to detect inconsistencies.

Holds information if upper layer or EthSwt is owner of mgmt_obj.

The EthSwt_PortMirrorCfgType specify the port mirror configuration which is set up per Ethernet switch. The configuration is written to the Ethernet switch driver by calling EthSwt_WritePortMirror Configuration. One port mirror configuration is maintained per Ethernet Switch.

Type to request or obtain the port mirroring state (enable/disable) for a particular port mirror configuration per Ethernet switch.

Status supervision used for Development Error Detection. The state shall be available for debugging.

需求

SWS_EthSwt_00001 requirement

Type of error Related error code Error value Invalid switch index ETHSWT_E_INV_SWITCH_IDX 0x01 EthSwt module was not initialized ETHSWT_E_UNINIT 0x02 Invalid pointer in parameter list ETHSWT_E_PARAM_POINTER 0x03 Invalid API which is not available by another module ETHSWT_E_INV_API 0x05 Invalid switch port index ETHSWT_E_INV_SWITCHPORT_IDX 0x06 Invalid Controller Index ETHSWT_E_INV_CTRL_IDX 0x07 Invalid input parameter ETHSWT_E_INV_PARAM 0x08 Invalid configuration ETHSWT_E_INIT_FAILED 0x09

SWS_EthSwt_00002 requirement

Module Header File Imported Type Rte_Dem_Type.h Dem_EventIdType Dem Rte_Dem_Type.h Dem_EventStatusType Eth_GeneralTypes.h Eth_BufIdxType Eth_GeneralTypes.h Eth_CounterType Eth_GeneralTypes.h Eth_DataType Eth_GeneralTypes.h Eth_MacVlanType Eth_GeneralTypes.h Eth_ModeType Eth_GeneralTypes.h Eth_RxStatsType Eth_GeneralTypes.h Eth_TimeStampType Eth_GeneralTypes.h Eth_TxErrorCounterValuesType Eth Eth_GeneralTypes.h Eth_TxStatsType Eth_GeneralTypes.h EthTrcv_BaudRateType Eth_GeneralTypes.h EthTrcv_CableDiagResultType Eth_GeneralTypes.h EthTrcv_DuplexModeType Eth_GeneralTypes.h EthTrcv_LinkStateType Eth_GeneralTypes.h EthTrcv_PhyLoopbackModeType Eth_GeneralTypes.h EthTrcv_PhyTestModeType Eth_GeneralTypes.h EthTrcv_PhyTxModeType EthTrcv Eth_GeneralTypes.h EthTrcv_WakeupReasonType Mka.h Mka_ConfidentialityOffsetType (DRAFT) Mka.h Mka_MacSecConfigType (DRAFT) Mka.h Mka_SakKeyPtrType (DRAFT) Mka.h Mka_Stats_Rx_ScType (DRAFT) Mka.h Mka_Stats_Rx_SecYType (DRAFT) Mka.h Mka_Stats_SecYType (DRAFT) Mka.h Mka_Stats_Tx_ScType (DRAFT) Mka.h Mka_Stats_Tx_SecYType (DRAFT) Mka Mka.h Mka_ValidateFramesType (DRAFT) Rte_NvM_Type.h NvM_BlockIdType Rte_NvM_Type.h NvM_BlockRequestType NvM Rte_NvM_Type.h NvM_RequestResultType Spi.h Spi_AsyncModeType Spi.h Spi_ChannelType Spi.h Spi_DataBufferType Spi Spi.h Spi_NumberOfDataType Module Header File Imported Type Spi.h Spi_SequenceType Std_Types.h Std_ReturnType Std Std_Types.h Std_VersionInfoType

SWS_EthSwt_00007 requirement

The function EthSwt_Init shall store the access to the con- figuration structure for subsequent API calls.

SWS_EthSwt_00008 requirement

The function EthSwt_Init shall change the state of all switches controlled by this Switch Driver from ETHSWT_STATE_UNINIT to ETHSWT_- STATE_INIT .

SWS_EthSwt_00009 requirement

If development error detection is enabled, the function Eth- Swt_Init shall check the parameter CfgPtr for being valid. If the check fails, EthSwt_Init shall raise the development error ETHSWT_E_INIT_FAILED.

SWS_EthSwt_00011 requirement

After initialization of the Ethernet switch within the EthSwt_- BackgroundTask , the Ethernet switch shall enter an inactive or low power mode if EthSwtLowPowerModeSupport is set to TRUE. If EthSwtLowPowerModeSupport is not defined or set to FALSE the Ethernet switch shall enter an active state.

SWS_EthSwt_00016 requirement

The function EthSwt_SwitchInit shall check the access to the Ethernet Switch hardware, i.e. by trying to read or write registers during the configuration of the switch. If the access to the registers fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK .

SWS_EthSwt_00019 requirement

The function EthSwt_SetSwitchPortMode shall put the in- dexed port of the switch into the specified mode. If EthSwtPort references an EthTrcv then the function EthTrcv_SetTransceiverMode of the Ethernet Transceiver Driver shall additionally be called with the corresponding transceiver mode.

SWS_EthSwt_00022 requirement

The function EthSwt_SetSwitchPortMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- SetSwitchPortModeApi .

SWS_EthSwt_00023 requirement

If the switch is already in the requested mode E_OK shall be returned and no development error shall be raised.

SWS_EthSwt_00026 requirement

The function EthSwt_GetSwitchPortMode shall read the mode of the indexed port of the switch. If EthSwtPort references an EthTrcv then the function shall additionally call the corresponding function EthTrcv_Get- TransceiverMode of the Ethernet Transceiver Driver.

SWS_EthSwt_00029 requirement

The function EthSwt_GetSwitchPortMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetSwitchPortModeApi .

SWS_EthSwt_00032 requirement

The function EthSwt_StartSwitchPortAutoNegotia- tion shall restart the automatic negotiation of the used transmission parameters of the referenced Ethernet transceiver driver by calling the function EthTrcv_StartAu- toNegotiation .

SWS_EthSwt_00035 requirement

The function EthSwt_StartSwitchPortAutoNegotia- tion shall be pre compile time configurable On/Off by the configuration parameter: EthSwtStartSwitchPortAutoNegotiationApi .

SWS_EthSwt_00038 requirement

The function EthSwt_GetLinkState shall read the current (link) state of the indexed switch port. If the indexed Ethernet port references an Eth- ernet transceiver, the link state shall be obtained by calling the function EthTrcv_- GetLinkState of the Ethernet Transceiver Driver. If the indexed Ethernet Switch port does not reference an Ethernet transceiver, the state shall be obtained from the MAC interface of the Switch port. If the MAC interface is not able to provide a link state (e.g. Ethernet hardware does not support a link state of the MAC interface), the API shall return the following state which is derived from the current mode: • If the current mode of the indexed switch port is ETH_MODE_ACTIVE , then ETHTRCV_LINK_STATE_ACTIVE shall be returned • If the current mode of the indexed switch port is ETH_MODE_DOWN , then ETHTRCV_LINK_STATE_DOWN shall be returned

SWS_EthSwt_00042 requirement

The function EthSwt_GetLinkState shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetLinkStateApi .

SWS_EthSwt_00045 requirement

The function EthSwt_GetBaudRate shall read the current baud rate of the indexed switch port. If the indexed Ethernet port reference an Ethernet transceiver, the baud rate shall be obtained by the function EthTrcv_GetBaudRate of the Ethernet Transceiver Driver. If the indexed Ethernet Switch port does not reference an Ethernet transceiver, the baud rate shall be obtained from the MAC interface of the Switch port.

SWS_EthSwt_00049 requirement

The function EthSwt_GetBaudRate shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetBaudRateApi .

SWS_EthSwt_00052 requirement

The function EthSwt_GetDuplexMode shall read the cur- rent duplex mode of the indexed switch port. If the indexed Ethernet port reference an Ethernet transceiver, the duplex mode shall be obtained by calling the function EthTrcv_ GetDuplexMode of the Ethernet Transceiver Driver. If the indexed Ether- net Switch port does not reference an Ethernet transceiver, the duplex mode shall be obtained from the MAC interface of the Switch port.

SWS_EthSwt_00056 requirement

The function EthSwt_GetDuplexMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetDuplexMod- eApi .

SWS_EthSwt_00061 requirement

The function EthSwt_GetPortMacAddr shall return the port index over which the given MAC-address is reachable within the indexed switch. If for the PortIdxPtr the maximal possible value (255) is returned the given MAC address cannot be reached via a port of this switch. If multiple ports were found the API returns E_NOT_OK .

SWS_EthSwt_00087 requirement

The function EthSwt_StoreConfiguration shall request to store the configuration of the learned MAC/Port tables of a switch in a persistent manner. This can be done in two ways: 1.) Reading out the parameters and storing them in the NV-RAM of the host CPU using the NV-RAM manager. 2.) Advising the switch to store the configuration data in its local NV-RAM. In both alternatives <EthSwtPersistentConfigurationResultCallback> shall be invoked if EthSwtPersistentConfigurationResultCallback is configured. In case of storage to switch local NV-RAM, JobResult shall be set to NVM_REQ_OK to indi- cate success or to NVM_REQ_NOT_OK to indicate failure.

SWS_EthSwt_00090 requirement

The function EthSwt_StoreConfiguration shall be pre compile time configurable On/Off by the configuration parameter: EthSwtStoreCon- figurationApi .

SWS_EthSwt_00092 requirement

The function EthSwt_ResetConfiguration shall request to reset the configuration of the learned MAC/Port tables of a switch in a persistent manner. This can be done in two ways: 1.) Overwriting the learned parameters in the NV-RAM of the host CPU with preconfigured default values. 2.) Advising the switch to reset the learned configuration data in its local NV-RAM. In both alternatives <EthSwtPersistentConfigurationResultCallback> shall be invoked if EthSwtPersistentConfigurationResultCallback is configured. In case of storage to switch local NV-RAM, JobResult shall be set to NVM_REQ_OK to indi- cate success or to NVM_REQ_NOT_OK to indicate failure.

SWS_EthSwt_00095 requirement

The function EthSwt_ResetConfiguration shall be pre compile time configurable On/Off by the configuration parameter: EthSwtResetCon- figurationApi .

SWS_EthSwt_00098 requirement

Dem_SetEventStatus Dem.h Called by SW-Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_SetEventStatus can safely ignore the return value. This API will be available only if ({Dem/Dem ConfigSet/DemEventParameter/DemEvent ReportingType} == STANDARD_REPORTING) Det_ReportError Det.h Service to report development errors. Eth_ReadMii Eth.h Reads a transceiver register Eth_WriteMii Eth.h Configures a transceiver register or triggers a function offered by the receiver EthTrcv_GetBaudRate EthTrcv.h Obtains the baud rate of the indexed transceiver EthTrcv_GetDuplexMode EthTrcv.h Obtains the duplex mode of the indexed transceiver EthTrcv_GetLinkState EthTrcv.h Obtains the link state of the indexed transceiver EthTrcv_GetTransceiverMode EthTrcv.h Obtains the state of the indexed transceiver EthTrcv_SetTransceiverMode EthTrcv.h Enables / disables the indexed transceiver EthTrcv_StartAutoNegotiation EthTrcv.h Restarts the negotiation of the transmission parameters used by the indexed transceiver NvM_GetErrorStatus NvM.h Service to read the block dependent error/status information. NvM_ReadBlock NvM.h Service to copy the data of the NV block to its corresponding RAM block. NvM_WriteBlock NvM.h Service to copy the data of the RAM block to its corresponding NV block. Spi_AsyncTransmit Spi.h Service to transmit data on the SPI bus. Spi_Cancel Spi.h Service cancels the specified on-going sequence transmission. Spi_ReadIB Spi.h Service for reading synchronously one or more data from an IB SPI Handler/Driver Channel specified by parameter. Spi_SetAsyncMode Spi.h Service to set the asynchronous mechanism mode for SPI busses handled asynchronously. Spi_SetupEB Spi.h Service to setup the buffers and the length of data for the EB SPI Handler/Driver Channel specified. Spi_SyncTransmit Spi.h Service to transmit data on the SPI bus Spi_WriteIB Spi.h Service for writing one or more data to an IB SPI Handler/Driver Channel specified by parameter.

SWS_EthSwt_00099 requirement

The Ethernet Switch Driver shall use a zero-based index to abstract the access for upper software layers.

SWS_EthSwt_00106 requirement

EthSwt_GetCounterValues shall read a list with drop counter values of the corresponding port of the switch. The meaning of these values is described at Eth_CounterType .

SWS_EthSwt_00109 requirement

The function EthSwt_GetCounterValues shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetCoun- terValuesApi .

SWS_EthSwt_00113 requirement

Error Name: ETHSWT_E_ACCESS Short Description: Ethernet Switch Access Failure Long Description: This production error shall be issued when the switch is not accessible. Recommended DTC: N/A Fail When access to the Ethernet Switch fails the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREFAILED to DEM. Detection Criteria: Pass When access to the Ethernet Switch succeeds the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREPASSED to DEM. Secondary Parameters: N/A Time Required: N/A Monitor Frequency N/A MIL illumination: N/A Table 7.5: ETHSWT_E_ACCESS

SWS_EthSwt_00115 requirement

The EthSwt_MainFunction support asynchronous behav- ior of API calls. This function is directly called by Basic Software Scheduler.

SWS_EthSwt_00118 requirement

The function <EthSwtLinkDownCallout> shall be called if a link, which is configured, goes down (link loss). The function provides the Switch index and the Port index, such that the port which went down can be identified.

SWS_EthSwt_00120 requirement

The parameter EthSwtIdx within the configuration shall cor- respond to the argument used in the API.

SWS_EthSwt_00124 requirement

The function EthSwt_GetVersionInfo shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtVersionIn- foApi .

SWS_EthSwt_00126 requirement

The function EthSwt_NvmSingleBlockCallback shall be called by the NVRAMManager [13] after the switch configuration has been stored or reset in the the NV RAM.

SWS_EthSwt_00127 requirement

The function EthSwt_NvmSingleBlockCallback shall al- ways return E_OK according to SWS_NvM_00368 .

SWS_EthSwt_00128 requirement

The function EthSwt_NvmSingleBlockCallback shall raise a development error if the JobResult equals NVM_REQ_NOT_OK , i.e. the write request has been finished unsuccessfully.

SWS_EthSwt_00129 requirement

The function EthSwt_NvmSingleBlockCallback shall be pre compile time configurable On/Off by the existence of the container EthSwtNvm .

SWS_EthSwt_00130 requirement

The SwitchPortIdx is an index for a port at the switch.

SWS_EthSwt_00131 requirement

In case different Switch devices are used in one ECU, the function names of the different Ethernet Switch drivers must be modified such that no two functions with the same names are generated. It is the responsibility of the user to take care that no two functions with the same names are configured. The names may be extended with a vendor ID or a type ID.

SWS_EthSwt_00132 requirement

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00496]. The configuration of the Ethernet switch driver shall support different egress port struc- tures by the configuration EthSwtPortEgressScheduler .

SWS_EthSwt_00133 requirement

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00495]. The Ethernet switch configuration shall support to configure the linkage between the priority of an received Ethernet frame and the according queue of an egress port via the traffic class assignment. Therefore the priority to traffic class assignment at an ingress port (exclusively either via EthSwtPortTrafficClassAssignment or Eth- SwtPriorityTrafficClassAssignment ) and the traffic class to a queue assign- ment at the egress port ( via EthSwtPortQueueTrafficClassAssignment ) shall be configured.

SWS_EthSwt_00134 requirement

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00450]. The switch configuration shall support the configuration how packets will be forwarded with respect to configured VLANs by using the configuration parameters of the subcon- tainer EthSwtVlanMembership .

SWS_EthSwt_00135 requirement

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00451]. The switch configuration shall support the configuration how VLANs will be inserted into Ethernet frames or existing VLANs will be modified by the configuration EthSwt- PortIngressVlanModification .

SWS_EthSwt_00136 requirement

The Ethernet Switch driver shall support an API which allows to store learned parameters like address resolution tables in a persistent manner by using the API EthSwt_StoreConfiguration . This persistent storage can be done in an NVRAM of the host CPU which runs the Ethernet Switch driver. Alternatively, this can be done in a memory of the switch itself. The trigger for storing the learned configuration or resetting the stored configuration can be done e.g. by a DCM.

SWS_EthSwt_00154 requirement

If development error detection is activated by EthSwt- DevErrorDetect , the function EthSwt_GetLinkState shall check whether the EthTrcv_GetLinkState API of the indexed transceiver driver is available by check- ing whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_- API.

SWS_EthSwt_00156 requirement

The function EthSwt_SetSwitchPortMode shall check whether the EthTrcv_SetTransceiverMode API of the indexed transceiver driver is available by checking whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_API.

SWS_EthSwt_00157 requirement

The function EthSwt_GetSwitchPortMode shall check whether the EthTrcv_GetTransceiverMode API of the indexed transceiver driver is available by checking whether for this SwitchPortIdx the corresponding EthTrcv API is available. If this is not the case, the function shall raise the development error ETHSWT_E_INV_API.

SWS_EthSwt_00162 requirement

The switch driver shall provide APIs to read the MAC-address to switch port mapping from the switch device to support the IP-address assignment by using the API EthSwt_GetPortMacAddr .

SWS_EthSwt_00164 requirement

The switch driver shall check whether the lower layer driver, i.e. the EthTrcv provides the APIs which can be called by an upper layer module (Eth If) of the switch driver and will be forwarded to the lower layer. In case of missing APIs, the switch driver shall raise the development error ETHSWT_E_INV_API if APIs are missing in the lower layer module.

SWS_EthSwt_00173 requirement

The function EthSwt_EnableVlan shall enable or disable a pre-configured VLAN at a certain port of a switch.

SWS_EthSwt_00177 requirement

The function EthSwt_EnableVlan shall be pre compile time configurable On/Off by the configuration parameter: EthSwtEnableVlanApi .

SWS_EthSwt_00178 requirement

{OBSOLETE} Replaced by [SWS_EthSwt_CONSTR_00458]. The switch configuration shall support the configuration how the PCP field of incom- ing Ethernet frames will be modified before they are forwarded to the egress port, i.e. a priority regeneration table can be configured (Please refer to EthSwtPriori- tyRegeneration , EthSwtPriorityRegenerationIngressPriority and Eth- SwtPriorityRegenerationRegeneratedPriority .

SWS_EthSwt_00179 requirement

The switch configuration shall support the configuration of a default traffic class for incoming untagged Ethernet frames (Please also refer to Eth- SwtPortTrafficClassAssignment ).

SWS_EthSwt_00180 requirement

The parameter EthSwtIndex shall be used to distinguish different instances of a switch driver module in case the API Det_ReportError (uint16 ModuleId, uint8 InstanceId, uint8 ApiId, uint8 ErrorId) is called.

SWS_EthSwt_00181 requirement

The Ethernet Switch driver shall support an API which allows to reset learned parameters like address resolution tables by using the API EthSwt_- ResetConfiguration .

SWS_EthSwt_00183 requirement

The function EthSwt_SetMacLearningMode shall set the MAC learning mode according to EthSwt_MacLearningType .

SWS_EthSwt_00186 requirement

The function EthSwt_SetMacLearningMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSet- MacLearningModeApi .

SWS_EthSwt_00188 requirement

The function EthSwt_GetMacLearningMode shall return the MAC learning mode according to EthSwt_MacLearningType .

SWS_EthSwt_00191 requirement

The function EthSwt_GetMacLearningMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGet- MacLearningModeApi .

SWS_EthSwt_00192 requirement

The NvM APIs will only be used if the respective block is not configured for NvM_ReadAll and NvM_WriteAll .

SWS_EthSwt_00194 requirement

The callback function <EthSwtPersistentConfigurationResult- Callback> shall be called by the EthSwt_NvmSingleBlockCallback to inform the caller of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration about the state of the past calls.

SWS_EthSwt_00196 requirement

The function EthSwt_NvmSingleBlockCallback shall call the function <user>_PersistentConfigurationResult to provide the JobResult to the caller of EthSwt_StoreConfiguration or EthSwt_ResetConfiguration .

SWS_EthSwt_00197 requirement

If the numberOfElements is greater 0x00, the arlTableList- Pointer shall be filled with up to numberOfElements elements. numberOfElements shall return the number of copied elements.

SWS_EthSwt_00199 requirement

EthSwt_GetRxStats shall return a list of statistic counters defined with Eth_RxStatsType . The majority of these Counters are derived from the IETF RFC2819.

SWS_EthSwt_00202 requirement

The function EthSwt_GetRxStats shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetRxStatsApi .

SWS_EthSwt_00204 requirement

The function <EthSwtLinkUpCallout> shall be called if a link, which is configured, goes up. The function provides the Switch index and the Port index, such that the port which went up can be identified.

SWS_EthSwt_00207 requirement

The function EthSwt_GetSwitchReg shall read the content of a switch register.

SWS_EthSwt_00210 requirement

The function EthSwt_GetSwitchReg shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetSwitchRe- gApi .

SWS_EthSwt_00212 requirement

The function EthSwt_SetSwitchReg shall write the content to the switch register.

SWS_EthSwt_00215 requirement

The function EthSwt_SetSwitchReg shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetSwitchRe- gApi .

SWS_EthSwt_00217 requirement

The function EthSwt_ReadTrcvRegister shall read the specified transceiver register through the MII or SPI of the indexed switch port.

SWS_EthSwt_00220 requirement

The function EthSwt_ReadTrcvRegister shall be pre compile time configurable On/Off by the configuration parameter: EthSwtReadTr- cvRegisterApi .

SWS_EthSwt_00222 requirement

The function EthSwt_WriteTrcvRegister shall write the specified transceiver register through the MII or SPI of the indexed switch port.

SWS_EthSwt_00225 requirement

The function EthSwt_WriteTrcvRegister shall be pre compile time configurable On/Off by the configuration parameter: EthSwtWriteTr- cvRegisterApi .

SWS_EthSwt_00226 requirement

The switch driver shall support a learning phase which can be divided into several sequential steps.

SWS_EthSwt_00228 requirement

The function EthSwt_GetArlTable shall provide a list of structs with MAC-address, VLAN-ID and port for the indexed switch.

SWS_EthSwt_00229 requirement

The function EthSwt_GetArlTable shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetArlTableApi .

SWS_EthSwt_00230 requirement

The function EthSwt_GetPortMacAddr shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtGetPort- MacAddrApi .

SWS_EthSwt_00233 requirement

If the parameter EthSwtDropDoubleTagged is set to TRUE , the double tagged frames shall be dropped independent on which Ethernet switch port this Ethernet frame has been received.

SWS_EthSwt_00234 requirement

The Parameter EthSwtPortQueueMinimumLength shall define the minimum length for one queue of an dedicated egress port.

SWS_EthSwt_00235 requirement

The EthSwt_GetArlTable API shall return only the num- berOfElements if the numberOfElements is set to 0x00. In this case no data will be copied and a NULLPTR can be used for the arlTableListPointer.

SWS_EthSwt_00240 requirement

The Switch driver shall offer Switch management APIs • EthSwt_EthRxProcessFrame • EthSwt_EthRxFinishedIndication • EthSwt_EthTxAdaptBufferLength • EthSwt_EthTxPrepareFrame • EthSwt_SetMgmtInfo • EthSwt_EthTxProcessFrame and • EthSwt_EthTxFinishedIndication if EthSwtManagementSupportApi is set to TRUE .

SWS_EthSwt_00241 requirement

The Switch Driver management APIs • EthSwt_EthRxProcessFrame • EthSwt_EthRxFinishedIndication • EthSwt_EthTxAdaptBufferLength • EthSwt_EthTxPrepareFrame • EthSwt_SetMgmtInfo • EthSwt_EthTxProcessFrame and • EthSwt_EthTxFinishedIndication shall support the Ethernet Driver to gather the Switch specific management information out of an Ethernet frame for reception or to prepare an Ethernet frame for management mode conformant frame transmission, e.g. the egress route of a frame.

SWS_EthSwt_00242 requirement

The Switch Driver management APIs EthSwt_EthTxPro- cessFrame and EthSwt_EthTxFinishedIndication shall return immediately, if EthSwt_SetMgmtInfo has not been called before a call of EthSwt_EthTxPro- cessFrame .

SWS_EthSwt_00243 requirement

The Switch driver shall access the port specific hardware time stamps if EthSwtPortTimeStampSupport of the port is set to TRUE .

SWS_EthSwt_00245 requirement

The Switch driver shall inform the EthIf about the availability of port specific ingress and egress timestamps us- ing the APIs EthIf_SwitchIngressTimeStampIndication and EthIf_SwitchEgressTimeStampIndication , if EthSwtGlobalTimeSup- portApi is set to TRUE .

SWS_EthSwt_00249 requirement

The function EthSwt_EthRxProcessFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

SWS_EthSwt_00253 requirement

The function EthSwt_EthRxFinishedIndication shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwt- ManagementSupportApi .

SWS_EthSwt_00257 requirement

The function EthSwt_EthTxPrepareFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

SWS_EthSwt_00261 requirement

The function EthSwt_EthTxAdaptBufferLength shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtMan- agementSupportApi .

SWS_EthSwt_00264 requirement

The function EthSwt_SetMgmtInfo shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManagementSup- portApi .

SWS_EthSwt_00268 requirement

The function EthSwt_EthTxProcessFrame shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtManage- mentSupportApi .

SWS_EthSwt_00273 requirement

The function EthSwt_EthTxFinishedIndication shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwt- ManagementSupportApi .

SWS_EthSwt_00282 requirement

If the management information for reception will not be avail- able within the time specified in the configuration parameter EthSwtMgmtInfoIndi- cationTimeout , the pointer MgmtInfoPtr shall be set to NULL before calling the function EthIf_SwitchMgmtInfoIndication .

SWS_EthSwt_00287 requirement

The function EthSwt_VerifyConfig shall be compile time configurable On/Off by the configuration parameter: EthSwtVerifyConfigApi .

SWS_EthSwt_00291 requirement

The function EthSwt_SetForwardingMode shall be com- pile time configurable On/Off by the configuration parameter: EthSwtSetForward- ingModeApi .

SWS_EthSwt_00292 requirement

If the parameter EthSwtVerifyConfigApi is set to TRUE the function EthSwt_VerifyConfig shall be used to verify switch configuration.

SWS_EthSwt_00293 requirement

The function EthSwt_GetPortSignalQuality shall obtain the signal quality by calling the function EthTrcv_GetPhySignalQuality of the referenced Ethernet Transceiver Driver. If the current signal quality is not available, the signal quality shall be set to 0xFFFFFFFF .

SWS_EthSwt_00297 requirement

The function EthSwt_GetPortSignalQuality shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGet- PortSignalQualityApi .

SWS_EthSwt_00299 requirement

The function EthSwt_GetPortIdentifier shall return the value of the organizationally unique identifier (OUI 24 bit) of the indexed Ethernet switch port that is connected to the indexed Ethernet switch. It shall set the 8 most significant bits of the OUI to 0xFFxxxxxx. If the Ethernet switch port references an Ethernet transceiver, the function shall obtain the OUI by calling the function EthTrcv_Get- PhyIdentifier and set the 8 most significant bits of the OUI to 0x00xxxxxx.

SWS_EthSwt_00303 requirement

The function EthSwt_GetPortIdentifier shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPor- tIdentifierApi .

SWS_EthSwt_00305 requirement

The function EthSwt_GetSwitchIdentifier shall return the value of the organizationally unique identifier of the indexed Ethernet switch.

SWS_EthSwt_00308 requirement

The function EthSwt_GetSwitchIdentifier shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetSwitchIdentifierApi .

SWS_EthSwt_00309 requirement

The function EthSwt_WritePortMirrorConfiguration shall store the port mirror configuration of the given MirroredSwitchIdx in a shadow buffer. The MirroredSwitchIdx shall be used to identify the port mirror configura- tion within the Ethernet switch driver.

SWS_EthSwt_00312 requirement

The function EthSwt_WritePortMirrorConfiguration shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtWritePortMirrorConfigurationApi .

SWS_EthSwt_00313 requirement

The function EthSwt_ReadPortMirrorConfiguration shall return the port mirror configuration identified by the given MirroredSwitchIdx. If no port mirror configuration is found for the MirroredSwitchIdx, the function shall return E_NOT_OK .

SWS_EthSwt_00317 requirement

The function EthSwt_ReadPortMirrorConfiguration shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtReadPortMirrorConfigurationApi .

SWS_EthSwt_00318 requirement

The function EthSwt_GetPortMirrorState shall return the port mirroring state of the indexed ethernet switch port.

SWS_EthSwt_00322 requirement

The function EthSwt_GetPortMirrorState shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPort- MirrorStateApi .

SWS_EthSwt_00323 requirement

The function EthSwt_SetPortMirrorState shall request the given port mirroring state for the port mirroring configuration of the indexed Ethernet switch, and store the requested port mirror state in a shadow buffer.

SWS_EthSwt_00327 requirement

The function EthSwt_SetPortMirrorState shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPort- MirrorStateApi .

SWS_EthSwt_00328 requirement

The function EthSwt_SetPortTestMode shall forward the call with the given test mode by calling the function EthTrcv_SetPhyTestMode of the referenced Ethernet Transceiver Driver.

SWS_EthSwt_00332 requirement

The function EthSwt_SetPortTestMode shall be pre com- pile time configurable On/Off by the configuration parameter: EthSwtSetPortTest- ModeApi .

SWS_EthSwt_00334 requirement

The function EthSwt_SetPortLoopbackMode shall forward the call with the given loop-back mode by calling the function EthTrcv_SetPhyLoop- backMode of the referenced Ethernet Transceiver Driver.

SWS_EthSwt_00338 requirement

The function EthSwt_SetPortLoopbackMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPort- LoopbackModeApi .

SWS_EthSwt_00340 requirement

The function EthSwt_SetPortTxMode shall forward the call with the given transmission mode by calling the function EthTrcv_SetPhyTxMode of the referenced Ethernet Transceiver Driver.

SWS_EthSwt_00344 requirement

The function EthSwt_SetPortTxMode shall be pre compile time configurable On/Off by the configuration parameter: EthSwtSetPortTxMod- eApi .

SWS_EthSwt_00346 requirement

The function EthSwt_GetPortCableDiagnosticsRe- sult shall obtain the cable diagnostics result by calling the function EthTrcv_Get- CableDiagnosticsResult of the referenced Ethernet Transceiver Driver.

SWS_EthSwt_00350 requirement

The function EthSwt_GetPortCableDiagnosticsRe- sult shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPortCableDiagnosticsResultApi .

SWS_EthSwt_00362 requirement

The function EthSwt_GetTxStats shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetTxStatsApi .

SWS_EthSwt_00370 requirement

The function EthSwt_GetTxErrorCounterValues shall be pre compile time configurable On/Off by the configuration parameter: EthSwt- GetTxErrorCounterValuesApi .

SWS_EthSwt_00372 requirement

EthSwt_GetTxStats shall return the list of Transmission Statistics out of IETF RFC1213 defined with Eth_TxStatsType , where the maxi- mal possible value shall denote an invalid value, e.g. this counter is not available.

SWS_EthSwt_00373 requirement

EthSwt_GetTxErrorCounterValues returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643 defined with Eth_- TxErrorCounterValuesType , where the maximal possible value shall denote an invalid value, e.g. this counter is not available.

SWS_EthSwt_00374 requirement

All Ethernet switch HW ports which are not configured as a EthSwtPort shall be switched off during initialization. This Ethernet switch HW ports shall never be switched on during runtime

SWS_EthSwt_00375 requirement

All EthSwtPorts shall be set to ETH_MODE_DOWN during ini- tialization.

SWS_EthSwt_00376 requirement

If EthSwtLowPowerModeSupport is set to TRUE and at least one EthSwtPort of a Ethernet switch is enabled and the corresponding Ether- net switch HW is in an inactive or low power mode the Ethernet switch HW shall be set to an active mode in which forwarding of Ethernet frames is possible.

SWS_EthSwt_00377 requirement

If EthSwtLowPowerModeSupport is set to TRUE and no Eth SwtPort for a certain Ethernet switch is enabled, the corresponding Ethernet switch HW shall be set to an inactive or low power mode.

SWS_EthSwt_00378 requirement

If EthSwt_PortEnableTimeStamp is called for a PortIdx , the switch driver shall enable the time-stamping for this port if EthSwtPortTimeS- tampSupport is set to TRUE for this port.

SWS_EthSwt_00379 requirement

The function EthSwt_PortEnableTimeStamp shall be pre compile time configurable ON/OFF by the configuration parameter: EthSwtGlobal- TimeSupportApi .

SWS_EthSwt_00386 requirement

If development error detection is activated by EthSwtDev- ErrorDetect , all functions except EthSwt_Init shall check that the service Eth- Swt_Init was previously called. If the check fails, the function shall raise the devel- opment error ETHSWT_E_UNINIT.

SWS_EthSwt_00387 requirement

If development error detection is activated by EthSwtDev- ErrorDetect , all functions with input parameter SwitchIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETH- SWT_E_INV_SWITCH_IDX.

SWS_EthSwt_00389 requirement

If development error detection is enabled, all functions with input parameter SwitchPortIdx or PortIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_- INV_SWITCH_IDX.

SWS_EthSwt_00390 requirement

If development error detection is enabled, all functions with input parameter CtrlIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_INV_CTRL_IDX.

SWS_EthSwt_00391 requirement

If development error detection is enabled, all functions with input parameter BufIdx shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_INV_PARAM.

SWS_EthSwt_00392 requirement

If development error detection is enabled, all functions with inout or output pointer parameter shall check the parameter for being valid. If the check fails, the functions shall raise the development error ETHSWT_E_PARAM_POINTER.

SWS_EthSwt_00393 requirement

If development error tracing is activated by EthSwtDevEr- rorDetect , the functions which call an Ethernet Transceiver API and do not obtain the functionality directly from the switch port interface shall check whether the API of the indexed transceiver driver is available. If this is not the case, the functions shall raise the development error ETHSWT_E_INV_API.

SWS_EthSwt_00394 requirement

If neither the Ethernet switch port nor the Ethernet Transceiver Driver can provide an OUI the function EthSwt_GetPortIdentifier shall return E_NOT_OK .

SWS_EthSwt_00395 requirement

Error Name: ETHSWT_E_SYNCPORT2PHY Short Description: Ethernet switch port and the referenced Ethernet transceiver are in contradicting modes. Long Description: While getting the Ethernet switch port mode, the Ethernet switch driver detected an inconsistent state between Ethernet switch port and the referenced Ethernet transceiver Mode. Recommended DTC: N/A Fail When getting the Ethernet switch port mode together with the Ethernet transceiver mode and the mode of the two referenced modules was found inconsistent the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREFAILED to DEM. Detection Criteria: Pass When getting the Ethernet switch port mode together with the Ethernet transceiver mode and the mode of the two referenced modules was found consistent the module shall report the extended production error with event status DEM_EVENT_STATUS_ PREPASSED to DEM. Secondary Parameters: N/A Time Required: N/A Monitor Frequency N/A MIL illumination: N/A Table 7.6: ETHSWT_E_SYNCPORT2PHY

SWS_EthSwt_00396 requirement

When calling the function EthSwt_SetSwitchPortMode with mode ETH_MODE_DOWN , the EthSwt shall disable the Ethernet switch port directly for reduction of power consumption, if it is possible.

SWS_EthSwt_00397 requirement

When calling the function EthSwt_SetSwitchPortMode , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

SWS_EthSwt_00398 requirement

If EthSwtPort does not references an EthTrcv, EthSwt shall indicate a mode of the port by the API EthIf_SwitchPortModeIndication latest during the next EthSwt_MainFunction .

SWS_EthSwt_00399 requirement

If the obtained modes of the EthSwtPort and the EthTrcv are not aligned, the function EthSwt_GetSwitchPortMode shall raise the extended pro- duction error ETHSWT_E_SYNCPORT2PHY and return E_NOT_OK . If EthTrcv_GetTransceiverMode returns E_NOT_OK , the EthSwt_GetSwitch- PortMode shall also return E_NOT_OK without raising an error.

SWS_EthSwt_00400 requirement

If the function EthSwt_GetSwitchPortMode is called, the function shall check the access to the Ethernet Switch Driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and re- turn E_NOT_OK , otherwise pass the production error ETHSWT_E_ACCESS and return E_OK .

SWS_EthSwt_00403 requirement

The function EthSwt_GetCfgDataRaw shall only be avail- able if parameter EthSwtGetCfgRaw is set to TRUE.

SWS_EthSwt_00404 requirement

When calling the function EthSwt_GetCfgDataRaw , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

SWS_EthSwt_00405 requirement

The function EthSwt_GetCfgDataInfo shall only be avail- able if parameter EthSwtGetCfgRaw is set to TRUE.

SWS_EthSwt_00406 requirement

When calling the function EthSwt_GetCfgDataInfo , the function shall check the access to the Ethernet switch driver. If the check fails, the function shall raise the extended production error ETHSWT_E_ACCESS and return E_NOT_OK , otherwise pass the extended production error ETHSWT_E_ACCESS and re- turn E_OK .

SWS_EthSwt_00407 requirement

Unused ARL table entries shall be removed from the ARL ta- ble after the timeout configured via EthSwtArlTableEntryTimeout , if this parame- ters is present in the configuration.

SWS_EthSwt_00408 requirement

The Switch driver shall enable clock synchronization with an- other Ethernet switch to which it is connected via uplink port, if EthSwtClockSyn- chronizationSupport is set to TRUE .

SWS_EthSwt_00414 requirement

The Ethernet Switch Driver module shall reject configurations with partition mappings which are not supported by the implementation.

SWS_EthSwt_00415 requirement

The function EthSwt_PortLinkStateRequest shall re- quest the given link state for the indexed Ethernet switch port of the switch by call- ing the EthTrcv_TransceiverLinkStateRequest with the given EthTrcv_- LinkStateType . If the EthSwtPort does not reference an EthTrcv, then the function shall return E_NOT_OK .

SWS_EthSwt_00416 requirement

The port mirror configuration (see [SWS_EthSwt_91017] ) shall be written to a shadow buffer of the Ethernet switch driver per Ethernet Switch by calling EthSwt_WritePortMirrorConfiguration .

SWS_EthSwt_00417 requirement

The port mirror configuration shall be enabled and disabled, respectively, per Ethernet Switch by calling EthSwt_SetPortMirrorState . The current state of the stored port mirror configuration shall be stored persistently, to out- last an ECU reset and to restore the port mirroring activities after an ECU reset.

SWS_EthSwt_00418 requirement

The stored port mirror configuration shall be marked as "to be deleted" by calling EthSwt_DeletePortMirrorConfiguration , if the port mirror- ing of the given Ethernet switch index is disabled (see [SWS_EthSwt_91022]. Other- wise the request to delete the port mirror configuration shall be rejected.

SWS_EthSwt_00419 requirement

The current port mirroring state shall be returned by calling EthSwt_GetPortMirrorState .

SWS_EthSwt_00420 requirement

The port mirror configuration per Ethernet switch shall be re- turned by calling EthSwt_ReadPortMirrorConfiguration .

SWS_EthSwt_00421 requirement

The EthSwt shall check for enabled port mirror configuration. The enabled port mirror configuration shall be activated by reconfiguring the Ethernet switch hardware according to the port mirror configuration, before frame forwarding is being enabled.

SWS_EthSwt_00422 requirement

If the PortMirrorState is set to 0x01 (port mirroring enabled), then the stored port mirror configuration for the given Ethernet switch shall be written to hardware registers of the given Ethernet switch and enable port mirroring.

SWS_EthSwt_00423 requirement

If the PortMirrorState is set to 0x00 (port mirroring disabled) the corresponding hardware registers of the given Ethernet switch shall be reset (to the HW's default values) and the port mirroring shall be disabled.

SWS_EthSwt_00424 requirement

The function shall return with ETH- SWT_PORT_MIRRORING_CONFIGURATION_NOT_SUPPORTED , if the port mirroring configuration is not supported by the Ethernet switch driver or by the Ethernet switch hardware, e.g.: • the configured mirrored traffic direction (see [SWS_EthSwt_91017] "TrafficDirec- tionIngressBitMask" and "TrafficDirectionEgressBitMask") for ingress and egress traffic of the same port is not supported • mirrored ports and capture ports, respectively, are not available within the Ether- net switch driver

SWS_EthSwt_00425 requirement

The function EthSwt_DeletePortMirrorConfigura- tion shall mark the stored port mirror configuration in the shadow buffer of the given MirroredSwitchIdx as "to be deleted".

SWS_EthSwt_00426 requirement

If a port mirroring for the given MirroredSwitchIdx is enabled, the request to delete the configuration shall be rejected by returning E_NOT_OK . Only those port configurations are allowed to be deleted, where the port mirroring of the given MirroredSwitchIdx is disabled.

SWS_EthSwt_00427 requirement

The function EthSwt_DeletePortMirrorConfigura- tion shall be pre compile time configurable On/Off by the configuration parameter: EthSwtDeletePortMirrorConfigurationApi .

SWS_EthSwt_00428 requirement

The cable diagnostic APIs ( EthSwt_RunPortCableDiag- nostic , EthSwt_GetPortCableDiagnosticsResult ) shall only be called for Eth- ernet switch ports of a Ethernet switch, where the Ethernet switch ports reference an Ethernet transceiver.

SWS_EthSwt_00429 requirement

The function EthSwt_RunPortCableDiagnostic shall for- ward the call by calling EthTrcv_RunCableDiagnostic of the referenced Ethernet Transceiver Driver.

SWS_EthSwt_00430 requirement

The function EthSwt_GetMaxFIFOBufferFillLevel shall read out the maximum amount of allocated FIFO buffer since the last read out.

SWS_EthSwt_00431 requirement

When the maximum amount of allocated FIFO buffer is read out, the value shall be reset to 0x00000000 explicitly, if it is not done by the hardware.

SWS_EthSwt_00432 requirement

The function EthSwt_GetMaxFIFOBufferFillLevel shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtGetMaxFIFOBufferFillLevelApi .

SWS_EthSwt_00433 requirement

A MgmtObject is just allowed to be owned between EthSwt and only one <UPPER_LAYER>. The structure element can be identified unambigu- ously using the DataPtr in Rx- and BufIdx in Tx-context, because both elements are definitively unique within the RxIndication() / TxConfirmation() context.

SWS_EthSwt_00434 requirement

Type of error Related error code Error value Initialization of ports is not finished ETHSWT_INIT_NOT_COMPLETED 0x01

SWS_EthSwt_00435 requirement

All functions apart from EthSwt_SetSwitchPortMode , EthSwt_GetSwitchPortMode , EthSwt_StartSwitchPortAutoNegotiation , EthSwt_GetLinkState , EthSwt_GetBaudRate , EthSwt_GetDuplexMode , EthSwt_ReadTrcvRegister , EthSwt_WriteTrcvRegister , EthSwt_Init , EthSwt_MainFunction and EthSwt_BackgroundTask may only be called in state ETHSWT_STATE_ACTIVE . If a function which can only run (succeed with E_OK ) in the states ETHSWT_STATE_- PORTINIT_COMPLETED and ETHSWT_STATE_ACTIVE is called before state ETH- SWT_STATE_PORTINIT_COMPLETED is reached, the Ethernet switch driver shall raise the runtime error ETHSWT_INIT_NOT_COMPLETED .

SWS_EthSwt_00436 requirement

ETHSWT_STATE_PORTINIT_COMPLETED shall be reached as soon as the port initialization has finished.

SWS_EthSwt_00437 requirement

ETHSWT_STATE_ACTIVE shall be reached, when the Ether- net switch initialization has finished.

SWS_EthSwt_00439 requirement

The function shall report the active mode always as ETH_MODE_ACTIVE , even though the previous requested (via EthSwt_SetSwitch- PortMode ) mode was ETH_MODE_ACTIVE_WITH_WAKEUP_REQUEST .

SWS_EthSwt_00440 requirement

The function EthSwt_CheckWakeup shall iterate over the Ethernet switch ports of the indexed Ethernet switch and forward the call to EthTrcv_- CheckWakeup for those Ethernet switch ports, which reference an EthTrcv.

SWS_EthSwt_00441 requirement

The function EthSwt_CheckWakeup shall be pre compile time configurable On/Off by the configuration parameter: EthSwtCheckWakeupApi

SWS_EthSwt_00442 requirement

The function EthSwt_GetSwitchPortWakeupReason shall read the current wake-up reason of the indexed Ethernet switch port by forwarding the call to EthTrcv_GetBusWuReason of the referenced EthTrcv. If the indexed Eth- ernet switch port has no reference to an EthTrcv, the function shall return E_NOT_OK .

SWS_EthSwt_00443 requirement

The function EthSwt_GetSwitchPortWakeupReason shall be pre compile time configurable On/Off by the configuration parameter: Eth- SwtGetSwitchPortWakeupReasonApi

SWS_EthSwt_00448 requirement

[SWS_EthSwt_00448] Behaviour if EthSwtMacAddressLearningMode is set to IVL Upstream requirements: SRS_Eth_00087 ⌈if EthSwtMacAddressLearningMode is set to IVL then the EthSwt driver shall return with E_NOT_OK.⌋ Note: If EthSwtMacAddressLearningMode is set to IVL, then the MAC-address to Ethernet switch port assignment is learned with respect to the according VLAN. With IVL the presence of an VLAN-ID is needed.

SWS_EthSwt_00449 requirement

[SWS_EthSwt_00449] Behaviour if given MAC-address is available at exactly one Ethernet port Upstream requirements: SRS_Eth_00087 ⌈If the given MAC-address is available at exact one Ethernet switch port, then the EthSwt driver shall return the port index via PortIdxPtr and report E_OK.⌋

SWS_EthSwt_00455 requirement

{DRAFT} If an Ethernet switch has to elect an priority value for an received Ethernet frame, then the priority election process shall be performed according the following order: • If the Ethernet switch detect that the received Ethernet frame is handled by an per-stream filtering and policing (see EthSwtPSFP ) and the corresponding stream gate (see EthSwtStreamGate ) has an IPV configured, then this value shall be used as priority to map this Ethernet frame to a traffic class. Otherwise the Ethernet switch shall proceed as discribed within the next point. • Else if the Ethernet switch detect that a regenerated priority value (see EthSwt- PriorityRegeneration ) is available, then this value shall be used as priority to map this Ethernet frame to a traffic class. Otherwise the Ethernet switch shall proceed as discribed within the next point. • Else if neither a IPV nor a regenerated priority value is available, then the PCP of the received Ethernet frame shall be used as priority to map this Ethernet frame to a traffic class.

SWS_EthSwt_00460 requirement

{DRAFT} If an Ethernet frame has to be transmitted on a par- ticular egress port, this Ethernet frame is transmitted with an VLAN tag and a outbound VLAN priority is assgined to this Ethernet frame, then this Ethernet frame shall be transmitted with the VLAN priority set to the assigned outbound VLAN priority

SWS_EthSwt_00461 requirement

{DRAFT} If the destination MAC address of a received Ether- net frame is qualified as a MAC unicast/multicast address and this MAC address is available in the ARL table, then this Ethernet frame shall be forwarded for further pro- cessing. Otherwise this Ethernet frame shall be dropped and the forwarding process shall be aborted.

SWS_EthSwt_00462 requirement

{DRAFT} If the VLAN membership of a egress port match to the VLAN-ID of a received Ethernet frame and this Ethernet frame has been assigned to this egress port, then the assignment of this Ethernet frame to this egress port shall be kept. Otherwise the assignment of this Ethernet frame to the affected egress port shall be removed.

SWS_EthSwt_00463 requirement

{DRAFT} After the egress filtering has been finalized for an received Ethernet frame and the Ethernet frame is still assigned to a least one egress port, then this Ethernet frame shall be forwarded for further processing. Otherwise this Ethernet frame shall be dropped and the forwarding process shall be aborted.

SWS_EthSwt_00465 requirement

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion references one or multiple ingress ports, then the stream identification shall be processed for streams received via any of the referencing ingress ports.

SWS_EthSwt_00466 requirement

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion references one or multiple egress ports, then the stream identification shall be processed for streams which are forwarded to all referenced egress ports.

SWS_EthSwt_00467 requirement

{DRAFT} If an instance of an EthSwtStreamIdentifica- tion neither reference ingress ports nor egress ports, then the stream identification shall be processed for all streams received via any ingress port regardless to which egress port the stream is forwarded.

SWS_EthSwt_00469 requirement

{DRAFT} If an Ethernet frame (i.e stream) has been received, then the stream identification shall be processed by instances of configured EthSwt- StreamIdentification where the internal stream route match.

SWS_EthSwt_00471 requirement

{DRAFT} If a Ethernet frame (i.e stream) has been received, then the Ethernet switch shall check for a matching instance of EthSwtStreamI- dentification in ascending order according the EthSwtStreamIdentifica- tionPosition , starting with EthSwtStreamIdentificationPosition config- ured with value 0.

SWS_EthSwt_00472 requirement

{DRAFT} If a received Ethernet frame (i.e stream) does not match any instances of EthSwtStreamIdentification s, the Ethernet frame shall be forwarded to the next frame processing level without applying any further stream identification handling.

SWS_EthSwt_00475 requirement

{DRAFT} If a Ethernet frame (i.e. stream) has been received and the internal stream route match to an instance of a configured EthSwtStreamI- dentification , then this stream identification shall be processed in the following order: • Perform the EthSwtStreamFilterRule • Perform the EthSwtStreamFilterAction , if configured • Perform the EthSwtPSFP , if configured and if the Ethernet frame has passed the EthSwtStreamFilterRule and EthSwtStreamFilterAction • Perform the EthSwtPortATSScheduler , if configured and if the Ethernet frame has passed the EthSwtStreamFilterRule and EthSwtStreamFilterAc- tion

SWS_EthSwt_00476 requirement

{DRAFT} A configured instance of an EthSwtStreamIden- tification where no optional elements are configured, shall be considered as empty stream identification, where incoming Ethernet frames always pass.

SWS_EthSwt_00477 requirement

{DRAFT} If an EthSwtStreamFilterRule have multiple fil- ter rule primitives configured (e.g. EthSwtStreamFilterMACSrcAddress and EthSwtStreamFilterVlanId ), then the filter rule primitives shall be considered as AND-linked filter rules.

SWS_EthSwt_00478 requirement

{DRAFT} If a Ethernet frame (i.e. stream) has been received, the internal stream route for this Ethernet frame matches to an instance of a configured EthSwtStreamIdentification , the EthSwtStreamFilterRule of this instance has filter rule primitives configured (e.g. EthSwtStreamFilterMACSrcAddress and EthSwtStreamFilterVlanId ) and the Ethernet frame matches all configured filter rule primitives, then this Ethernet frame shall be qualified as matching stream.

SWS_EthSwt_00479 requirement

{DRAFT} If an Ethernet frame (i.e. stream) has been received, the internal stream route for this Ethernet frame matches to an instance of a configured EthSwtStreamIdentification and a particular filter rule primitive in the EthSwt- StreamFilterRule of this instance is not configured, then this filter rule primitive shall be considered a matching filter rule primitive.

SWS_EthSwt_00480 requirement

{DRAFT} If a Ethernet frame (i.e. stream) has been qualified as matching stream and an EthSwtStreamFilterAction is configured, then this filter action shall be applied on this Ethernet frame.

SWS_EthSwt_00481 requirement

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction has EthSwtStream- FilterActionDropFrame set to TRUE , then this Ethernet frame shall be dropped.

SWS_EthSwt_00482 requirement

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction EthSwtStreamFil- terActionBlockSource set to TRUE, then this Ethernet frame and all sub se- quential receptions of Ethernet frames with the same source MAC address shall be blocked.

SWS_EthSwt_00483 requirement

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream) and the corresponding EthSwtStreamFilterAction has an EthSwt- StreamFilterActionVlanModification configured, then the VLAN-ID of this Ethernet frame shall be modified with the configured VLAN-ID given by EthSwt- StreamFilterActionVlanModificationVlanId .

SWS_EthSwt_00484 requirement

{DRAFT} If a filter action EthSwtStreamFilterAction- DestinationPortModification is configured, then the egress destination which is used for the modification shall be determined according the configured references to egress ports via EthSwtStreamFilterActionDestinationPortModifica- tionEgressPortRef .

SWS_EthSwt_00486 requirement

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream), the corresponding EthSwtStreamFilterAction has an Eth- SwtStreamFilterActionDestinationPortModification configured and the EthSwtStreamFilterActionDestinationPortModificationType is set to ETHSWT_STREAM_EGRESS_DESTINATION_OVERWRITE , then the egress destina- tion of this Ethernet frame shall be overwritten with the configured egress des- tination (see EthSwtStreamFilterActionDestinationPortModificationE- gressPortRef ).

SWS_EthSwt_00487 requirement

{DRAFT} If a filter action is applied on a Ethernet frame (i.e. stream), the corresponding EthSwtStreamFilterAction has an EthSwtStream- FilterActionDestinationPortModification configured and the EthSwtStreamFil- terActionDestinationPortModificationType is set to ETHSWT_STREAM_- EGRESS_DESTINATION_EXTEND , then the egress destination of this Ethernet frame shall be extended with the configured egress destination (see EthSwtStreamFil- terActionDestinationPortModificationEgressPortRef ).

SWS_EthSwt_00490 requirement

{DRAFT} If a EthSwtPSFP is available, the corresponding EthSwtStreamGate has an EthSwtStreamGateIPV (internal priority value) config- ured and an Ethernet frame pass through the gate, then the internal priority value shall be assigned to this Ethernet frame.

SWS_EthSwt_00491 requirement

{DRAFT} If an Ethernet frame match to EthSwtStreamIden- tification , this Ethernet frame pass the filtering and a EthSwtFlowMetering is available, then this Ethernet frame shall be handled by this EthSwtFlowMetering .

SWS_EthSwt_00492 requirement

{DRAFT} A configured EthSwtFlowMetering shall per- form the metering according to the configuration: EthSwtFlowMeteringColor- Mode , EthSwtFlowMeteringCIR , EthSwtFlowMeteringCBS , EthSwtFlowMe- teringEIR , EthSwtFlowMeteringEBS and EthSwtFlowMeterCF

SWS_EthSwt_00493 requirement

{DRAFT} If an Ethernet frame match to EthSwtStreamIden- tification , this Ethernet frame pass the filtering and a EthSwtPortATSSched- uler is available, then a elegibility time shall be assigned to this Ethernet frame and scheduled by this EthSwtPortATSScheduler .

SWS_EthSwt_00494 requirement

{DRAFT} A configured EthSwtPortATSScheduler shall perform the scheduling according to the following configuration: EthSwtPor- tATSCommitedBurstSize , EthSwtPortATSCommitedInformationRate and EthSwtATSGroupMaximumResidenceTime .

SWS_EthSwt_00511 requirement

[SWS_EthSwt_00511] Behaviour if given MAC-address is available at multiple Ethernet ports Upstream requirements: SRS_Eth_00087 ⌈If the given MAC-address is available at multiple Ethernet switch ports, then the Eth- Swt driver shall return with E_NOT_OK.⌋ Note: If EthSwtMacAddressLearningMode is set to SVL and the MAC-address given with MacAddrPtr is a MAC multicast address, then the given MAC-address could be available at serveral Ethernet switch ports of the Ethernet switch addressed with SwitchIdx.

SWS_EthSwt_00512 requirement

[SWS_EthSwt_00512] Behaviour if EthSwtMacAddressLearningMode is set to SVL Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to SVL, then the EthSwt driver shall consider the given the MAC-address and ignore the given VLAN-ID to determine the MAC-address to Ethernet port assignment.⌋ Note: If EthSwtMacAddressLearningMode is set to SVL, the MAC-address to port assignment is shared across all VLANs and therefore the given VLAN is ignored.

SWS_EthSwt_00513 requirement

[SWS_EthSwt_00513] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to value in a range from 1 to 4095 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to a value in a range from 1 to 4095, then the EthSwt driver shall consider the given the MAC-address and the given VLAN-ID to determine the MAC-address to Ethernet port assignment.⌋

SWS_EthSwt_00514 requirement

[SWS_EthSwt_00514] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to 0 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to 0, then the EthSwt driver shall consider the given the MAC-address to determine the MAC-address to Ethernet port assignment irrespective of the VLAN.⌋

SWS_EthSwt_00515 requirement

[SWS_EthSwt_00515] Behaviour if EthSwtMacAddressLearningMode is set to IVL and VLAN-ID is set to a value greater than 4095 Upstream requirements: SRS_Eth_00087 ⌈If EthSwtMacAddressLearningMode is set to IVL and given VLAN-ID is set to a value greater that 4095, then the EthSwt driver shall return with E_NOT_OK.⌋

SWS_EthSwt_00516 requirement

[SWS_EthSwt_00516] Creation of Ethernet switch port bit map Upstream requirements: SRS_Eth_00087 ⌈The function shall create a Ethernet switch port bit map addressed by PortBitMapPtr with respect to [SWS_EthSwt_00512], [SWS_EthSwt_00513] and

SWS_EthSwt_00517 requirement

[SWS_EthSwt_00517] Behaviour for creation of Ethernet switch port bit map Upstream requirements: SRS_Eth_00087 ⌈If the creation of the Ethernet switch port bit map was successful finalized and trans- fered to the location addressed with PortBitMapPtr, then the EthSwt driver shall return with E_OK.⌋

SWS_EthSwt_00518 requirement

[SWS_EthSwt_00518] Behaviour if Ethernet switch port bit map exceeds uint32 data type Upstream requirements: SRS_Eth_00087 ⌈If the resulting Ethernet switch port bit map exceeds the unit32 data type, then the EthSwt driver shall return with E_NOT_OK.⌋

SWS_EthSwt_00519 requirement

[SWS_EthSwt_00519] compile configuration for API Upstream requirements: SRS_BSW_00171 ⌈The function EthSwt_GetPortMacAddrVlan shall be pre compile time configurable On/Off by the configuration parameter: EthSwtGetPortMacAddrVlanApi.⌋

SWS_EthSwt_00560 requirement

[SWS_EthSwt_00560] EthSwt_ReadMmd functionality ⌈The function EthSwt_- ReadMmd shall read the specified transceiver register through the MII or SPI of the indexed switch port.⌋

SWS_EthSwt_00561 requirement

[SWS_EthSwt_00561] Configuring EthSwt_ReadMmd availability ⌈The function EthSwt_ReadMmd shall be precompile time configurable On/Off by the configuration parameter: EthSwtReadMmdApi.⌋

SWS_EthSwt_00562 requirement

[SWS_EthSwt_00562] EthSwt_WriteMmd functionality ⌈The function EthSwt_- WriteMmd shall write a value to the specified transceiver register through the MII of the indexed switch port.⌋

SWS_EthSwt_00563 requirement

[SWS_EthSwt_00563] Configuring EthSwt_WriteMmd availability ⌈The function EthSwt_WriteMmd shall be precompile time configurable On/Off by the configuration parameter: EthSwtWriteMmdApi.⌋

SWS_EthSwt_91033 requirement

Overlayed return value of Std_ReturnType for Ethernet switch driver API EthSwt_WritePortMirror Configuration, if the port mirroring configuration is not supported by Ethernet switch driver or by the Ethernet switch hardware (e.g. the configured mirrored traffic direction (see SWS_EthSwt_91017 "TrafficDirectionIngressBitMask" and "TrafficDirectionEgressBitMask") for ingress and egress traffic of the same port is not supported, or the addressed Ethernet switch ports within the port mirror configuration are not accessible by the Ethernet switch driver)

The port specific timestamping (EthSwtPortTime StampSupport) can be set to TRUE , if clock synchronization for connected Ethernet switches is deactivated ( EthSwtClockSynchronizationSupport set to FALSE ).

The port specific timestamping ( EthSwtPort- TimeStampSupport ) can be set to TRUE , if EthSwtClockSynchronization- Support is activated and EthSwtPortRole is not ETHSWT_UP_LINK_PORT . Eth SwtPorts with EthSwtPortRole ETHSWT_UP_LINK_PORT are connected to another Ethernet switch and not considered for the time delay compensation, if EthSwt- ClockSynchronizationSupport is activated.

The ECUC partitions referenced by EthSwtCon- figEcucPartitionRef shall be a subset of the ECUC partitions referenced by Eth- SwtEcucPartitionRef .

EthSwtConfig , EthCtrlConfig and EthTr- cvConfig of one communication channel shall all reference the same ECUC parti- tion.

The module will operate as an independent in- stance in each of the partitions (see EthSwtEcucPartitionRef ), means the called API will only target the partition it is called in.

If EthSwtEcucPartitionRef references one or more ECUC partitions, EthSwtConfigEcucPartitionRef shall have a multiplicity of one and reference one of these ECUC partitions as well.

{DRAFT} The switch configuration shall support the configuration how packets will be forwarded with respect to configured VLANs by using the configuration parameters of the subcontainer EthSwtVlanMembership .

{DRAFT} The switch configuration shall support the configuration how VLANs will be inserted into Ethernet frames or existing VLANs will be modified by the configuration EthSwtPortIngressVlanModification .

{DRAFT} If EthSwtPortIngressDefaultVlan and EthSwtPortIngressDefaultPriority for a particular Ethernet port is avail- able, then the default VLAN and the default priority of this hardware Ethernet switch port shall be configured with the available values.

{DRAFT} If Ethernet frames without a VLAN tag (untagged Ethernet frame) which are received on a particular Ethernet port shall be dropped, then the parameter EthSwtPortIngressDropUntagged of this Ethernet port shall be set to TRUE and the parameters EthSwtPortIngressDefaultVlan and EthSwtPortIngressDefaultPriority of this Ethernet port shall not be con- figured (multiplicity of both parameters are 0 )

{DRAFT} If Ethernet frames without a VLAN tag (untagged Ethernet frame) which are received on a particular Ethernet port shall be handled for further processing with a dedicated VLAN-ID and VLAN priority, then the parameter EthSwtPortIngressDropUntagged of this Ethernet port shall be set to FALSE and the parameters EthSwtPortIngressDefaultVlan and EthSwtPort- IngressDefaultPriority of this Ethernet port shall be configured.

{DRAFT} The switch configuration shall support the configuration of priority to traffic class mapping per ingress port, i.e. a priority to traf- fic class table can be configured (see EthSwtPortTrafficClassAssignment ).

{DRAFT} If the same EthSwtPortIngress need to configure a priority to traffic class assignment, then exclusively either EthSwt- PortTrafficClassAssignment or EthSwtPriorityTrafficClassAssign- ment shall be configured.

{DRAFT} The switch configuration shall support the configuration how the PCP field of incoming Ethernet frames will be modified be- fore they are forwarded to the egress port, i.e. a priority regeneration table can be configured (Please refer to EthSwtPriorityRegeneration , EthSwtPriorityRe- generationIngressPriority and EthSwtPriorityRegenerationRegener- atedPriority .

{DRAFT} The Ethernet switch configuration shall support a port based configuration at ingress side to assign an outbound VLAN pri- ority to incoming Ethernet frames according to their regenerated VLAN priority (a.k.a. PCP field, see [SWS_EthSwt_00178]), i.e. an outbound VLAN priority assignment can be configured (see EthSwtPortOutboundVlanPriorityAssignment , Eth- SwtPriorityRegeneratedIngressVlanPriority , and EthSwtPriorityOut- boundVlanPriority ).

{DRAFT} If an instance of an EthSwtStreamI- dentification is configured, then it shall be possible that this EthSwtStreamI- dentification could reference none, one or multiple ingress and egress ports via EthSwtPortIngressStreamIndentificationRef and EthSwtPortEgressStreamIdentifi- cationRef respectively.

{DRAFT} If an instance of a configured Eth- SwtStreamIdentification references an EthSwtPortIngress or EthSwt- PortEgress , then this instance of stream identification definition shall reference the same EthSwtPortIngress or EthSwtPortEgress exclusively one time.

{DRAFT} Every instance of EthSwtStreamIden- tification shall have a unique position value configured via EthSwtStreamIden- tificationPosition . The value shall start with 0 and continue in ascending order with no gaps for each subsequential instance of EthSwtStreamIdentification .

{DRAFT} The configuration shall allow to have exlu- sively either EthSwtFlowMetering or EthSwtPortATSScheduler in the same EthSwtStreamIdentification configured.

{DRAFT} If an EthSwtPortATSScheduler is configured, then additionally a EthSwtPSFP shall be available in the same EthSwt- StreamIdentification .

{DRAFT} If a filter action EthSwtStreamFilter- ActionDestinationPortModification is configured, then this EthSwtStream- FilterActionDestinationPortModification shall reference the same Eth- SwtPortEgress via EthSwtStreamFilterActionDestinationPortModifi- cationEgressPortRef exclusively one time.

{DRAFT} If a EthSwtStreamIdentification has a EthSwtPSFP configured, then a EthSwtStreamGate shall be configured.

{DRAFT} If a EthSwtPSFP is configured, then the corresponding Ethernet switch hardware shall be configured such that Ethernet frames (i.e. streams) could always pass through (open gate).

{DRAFT} The Ethernet switch configuration shall support to configure the linkage between the priority of an received Ethernet frame and the according queue of an egress port via the traffic class assignment. There- fore the priority to traffic class assignment at an ingress port (exclusively either via EthSwtPortTrafficClassAssignment or EthSwtPriorityTrafficClassAs- signment ) and the traffic class to a queue assignment at the egress port ( via EthSwtPortQueueTrafficClassAssignment ) shall be configured.

{DRAFT} The configuration of the Ethernet switch driver shall support different egress port structures by the configuration EthSwt- PortEgressScheduler .