#!/bin/sh ifconfig eth4 down ifconfig eth1 down ifconfig eth2 down ifconfig eth3 down ethtool -L eth2 tx 3 ethtool -L eth3 tx 3 sleep 10 ethtool --set-priv-flags eth2 p0-rx-ptype-rrobin off ethtool --set-priv-flags eth3 p0-rx-ptype-rrobin off devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime ip link add name br0 type bridge ip link set dev br0 type bridge ageing_time 1000 ip link set dev eth2 up ip link set dev eth3 up sleep 5 ip link set dev eth2 master br0 ip link set dev eth3 master br0 ip link set dev br0 up ip link set dev br0 type bridge vlan_filtering 1 bridge vlan add dev br0 vid 402 pvid untagged self bridge vlan add dev eth2 vid 402 master bridge vlan add dev eth3 vid 402 master phc2sys -s clock_realtime -c eth2 -m -O 0 > /dev/null & phc2sys -s clock_realtime -c eth3 -m -O 0 > /dev/null & tc qdisc replace dev eth2 parent root handle 100 taprio \ num_tc 3 \ map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 \ base-time 0 \ sched-entry S 4 400000 \ sched-entry S 2 200000 \ sched-entry S 1 100000 \ flags 2 tc qdisc replace dev eth3 parent root handle 100 taprio \ num_tc 3 \ map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 \ base-time 0 \ sched-entry S 4 400000 \ sched-entry S 2 200000 \ sched-entry S 1 100000 \ flags 2