EthernetAV

Set/Display the Ethernet AV characteristics

EthernetAV

Shortest form: eav.

Ethernet AV (Audio Video Bridging, IEEE 802.1AS/802.1Qav) settings and diagnostics: time-sync MAC address, per-port AV enable, stream-class bandwidth, PCP remapping, SRP settings, egress timestamps and a packet watcher.

The first word selects the sub-command and must be typed in full (any case): control, mac, types, init, port, watch, status, timestamp, tx, srp, pcp or bandwidth. The second words (set, get, enable, disable, start, stop) must also be typed in full. <port> is a single port name or number, not a port bitmap. No argument or an unknown word prints the usage.

The built-in help differs from what the shell accepts in two places:

  • The built-in help shows tx <pbmp> <vlanid>; the shell actually takes a single port: tx <port> <vlan>.

  • The built-in help shows control set|get <ctrl_type> <parameter>; the shell actually takes control set 1 <mode> <attributes> (only type 1, time adjust, can be set) and control get <type>.

Ethernet AV is not available on SONiC Trident 3 switches. The AV API calls fail: srp get, pcp get and bandwidth get print bcm_eav_<function> : failed Feature unavailable and control get 0 prints eav control get : failed with control type = 0, each followed by the SAI shell’s Failed to execute the diagnostic command. Error: Operation failed. types (a fixed help table), mac get and status still answer, but only with an all-zero time-sync MAC address and no per-port lines, because no port has AV enabled.

types, status, timestamp and the get forms only read state. init and the set, enable and disable forms change AV state behind SONiC’s back. tx sends a packet from the CPU.

Warning

watch start and watch stop start and stop packet reception from the switch to the CPU for the whole SDK, not just for this command. On SONiC, watch stop can cut off trapped control traffic (LACP, BGP, ARP) to the CPU until reception is restarted. Do not use on a production switch.

Hardware-validated

drivshell> EthernetAV status
Ethernet AV Status :
Time Sync MAC Address = 00-00-00-00-00-00
EthernetAV control <set <type> <param0> <param1> | get <type>>

Set or get an AV control. Type 0 is the time reference (read-only, printed as Time Reference = 0x…), type 1 the time-adjust mode and attributes (printed as Time Reference mode = 0x…, Operation Attributes= 0x…). set changes state; get only reads.

Hardware-validated

drivshell> EthernetAV control get 0
eav control get : failed with control type = 0

Failed to execute the diagnostic command. Error: Operation failed.
EthernetAV mac <set <mac> | get>

Set or show the destination MAC address of time-sync packets. Prints Set Time Sync MACDA = xx-xx-… or Get Time Sync MACDA = …. set changes state.

Hardware-validated

drivshell> EthernetAV mac get
Get Time Sync MACDA = 00-00-00-00-00-00
EthernetAV types

Print the control types and stream classes used by the other sub-commands (0 = Class A, 1 = Class B).

Hardware-validated

drivshell> EthernetAV types
Control Type :
   0 : Time Reference. p0 : time reference value(read only).
   1 : Time Adjust.    p0 : adjust mode.
                       p1 : Operation attributes).

Stream Class Type :
   0 : Class A traffic stream
   1 : Class B traffic stream
EthernetAV init

Initialise Ethernet AV and read back the time-sync MAC address. Changes SDK state.

Unvalidated

drivshell> EthernetAV init
EthernetAV port <enable | disable> <port>

Turn AV on or off on one port. Changes the port behind SONiC’s back.

Unvalidated

drivshell> EthernetAV port enable ce0
EthernetAV watch <start | stop>

Start or stop a packet watcher that prints [EAV watch] … lines for time-sync and AV data packets received by the CPU. See the warning above.

Unvalidated

drivshell> EthernetAV watch start
EthernetAV status

Print, for every port, whether AV is enabled and the Class A and Class B bandwidth and burst, then the time-adjust mode and the time-sync MAC. Only reads state.

Hardware-validated

drivshell> EthernetAV status
Ethernet AV Status :
Time Sync MAC Address = 00-00-00-00-00-00
EthernetAV timestamp <port>

Print the egress timestamp of the last time-sync packet sent on a port: Port <n> Egress Time Stamp = 0x…. Only reads state.

Unvalidated

drivshell> EthernetAV timestamp ce0
EthernetAV tx <port> <vlan>

Send one time-sync packet (EtherType 0x88f7), tagged with <vlan>, out of <port>, so that its egress timestamp can be read with EthernetAV timestamp. The built-in help shows <pbmp>; the shell actually takes one port.

Unvalidated

drivshell> EthernetAV tx ce0 1
EthernetAV srp <set <mac> <ethertype> | get>

Set or show the MAC address and EtherType used to recognise SRP (Stream Reservation Protocol) packets. set changes state.

Hardware-validated

drivshell> EthernetAV srp get
bcm_eav_srp_mac_ethertype_get : failed Feature unavailable

Failed to execute the diagnostic command. Error: Operation failed.
EthernetAV pcp <set <class> <pcp> <remapped_pcp> | get <class>>

Set or show the PCP of a stream class (0 = A, 1 = B) and the PCP it is remapped to. set changes state.

Hardware-validated

drivshell> EthernetAV pcp get 0
bcm_eav_pcp_mapping_get : failed Feature unavailable

Failed to execute the diagnostic command. Error: Operation failed.
EthernetAV bandwidth <set <port> <class> <bytes_per_sec> <burst_bytes> | get <port> <class>>

Set or show the reserved bandwidth and burst of a stream class on a port. Prints Port <n> (Class A|B): Bandwidth = <n> bytes/sec, Burst = <n> bytes. set changes state.

Hardware-validated

drivshell> EthernetAV bandwidth get ce0 0
bcm_eav_bandwidth_get : failed Feature unavailable

Failed to execute the diagnostic command. Error: Operation failed.

Built-in help

Where <cmd> is:
   control set|get <ctrl_type> <parameter>
   mac get|set <mac value>
   types. (Describe the types of Ethernet AV CLI commands)
   init
   port enable|disable <port number>
   watch start|stop
   status
   timestamp <port number>
   tx <pbmp> <vlanid>
   srp set|get <mac value> <ethertype>
   bandwidth set|get <port number> <class> <bandwidth> <burstsize>
   pcp set|get <class> <pcp> <remapped_pcp>