@@ -1846,13 +1846,55 @@ each clock plays in this test is as follows:
18461846Procedure
18471847~~~~~~~~~
18481848
1849- The script file
1850- `setup\_ hsr.sh <http://processors.wiki.ti.com/images/1/18/Setup_hsr.pdf >`__
1851- and clock configuration files e.g. dut_1_hsr_oc.cfg, dut_2_hsr_oc.cfg,
1852- dut_3_hsr_oc.cfg (each identical, same as listed in
1853- `PTP Redundancy <Industrial_Protocols_PTP.html#redundancy-hsr-prp >`__
1849+ The script file :ref: `setup-hsr ` and clock configuration files e.g.
1850+ dut_1_hsr_oc.cfg, dut_2_hsr_oc.cfg, dut_3_hsr_oc.cfg (each identical, same as
1851+ listed in `PTP Redundancy <Industrial_Protocols_PTP.html#redundancy-hsr-prp >`__
18541852section for HSR) will be used in the setup of the tests.
18551853
1854+ .. code-block :: bash
1855+ :caption: setup_hsr.sh
1856+ :name: setup-hsr
1857+
1858+ #! /bin/bash
1859+
1860+ ETHA=eth2
1861+ MACA=70:FF:76:1C:18:09
1862+ ETHB=eth3
1863+ MACB=70:FF:76:1C:18:0A
1864+ RED_IP=192.168.8.3
1865+
1866+ # #######################################################
1867+ # Do not modify below
1868+ # #######################################################
1869+ HSR=hsr0
1870+ echo " ifconfig $ETHA hw ether $MACA "
1871+ ifconfig $ETHA hw ether $MACA
1872+ sleep 1
1873+ echo " ifconfig $ETHB hw ether $MACA "
1874+ ifconfig $ETHB hw ether $MACA
1875+ sleep 1
1876+ echo " ethtool -K $ETHA hsr-rx-offload on"
1877+ ethtool -K $ETHA hsr-rx-offload on
1878+ sleep 1
1879+ echo " ethtool -K $ETHB hsr-rx-offload on"
1880+ ethtool -K $ETHB hsr-rx-offload on
1881+ sleep 1
1882+ echo " ifconfig $ETHA up"
1883+ ifconfig $ETHA up
1884+ sleep 1
1885+ echo " ifconfig $ETHB up"
1886+ ifconfig $ETHB up
1887+ sleep 1
1888+ echo " ip link add name $HSR type hsr slave1 $ETHA slave2 $ETHB supervision 45 version 1"
1889+ ip link add name $HSR type hsr slave1 $ETHA slave2 $ETHB supervision 45 version 1
1890+ sleep 1
1891+ echo " ifconfig $HSR $RED_IP "
1892+ ifconfig $HSR $RED_IP
1893+ sleep 1
1894+ ifconfig $HSR
1895+ echo
1896+ echo " configured $HSR on $ETHA $ETHB "
1897+
18561898 - For each DUT-X, copy the setup script setup\_ hsr.sh and the clock
18571899 configuration file dut\_ X\_ hsr\_ oc.cfg into the target filesystem of
18581900 DUT-X. For the sample setup above
0 commit comments