Skip to content

Commit

Permalink
unconfigure mqprio before configuring
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Dec 19, 2024
1 parent 912116a commit d3d77ae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
27 changes: 12 additions & 15 deletions config-srp-i210.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
BR=br0
HANDLE=9000

for INDEX in 4 8s0
do
ETH="ens${INDEX}"
echo "Unconfiguring ${ETH} Qdisc..."

tc qdisc del dev ${ETH} parent root handle ${HANDLE} mqprio
echo "${ETH} unconfigured\n"
done

set -e

echo "Configuring customer bridge MRP group address forwarding"
Expand All @@ -24,10 +33,10 @@ echo ""

# https://tsn.readthedocs.io/qdiscs.html

for INDEX in 0 1 2 3
for INDEX in 4 8s0
do
ETH="lan${INDEX}"
echo "Configuring ${ETH} qdisc..."
ETH="ens${INDEX}"
echo "Configuring ${ETH} Qdisc..."

tc qdisc del dev ${ETH} parent root handle ${HANDLE} || : >/dev/null 2>&1
tc qdisc add dev ${ETH} parent root handle ${HANDLE} mqprio \
Expand All @@ -36,17 +45,5 @@ do
queues 2@2 1@1 1@0 \
hw 1

# Class A
# tc qdisc replace dev ${ETH} parent ${HANDLE}:1 cbs \
# idleslope 98688 sendslope -901312 hicredit 153 locredit -1389 \
# offload 1

# Class B
# tc qdisc replace dev ${ETH} parent ${HANDLE}:2 cbs \
# idleslope 3648 sendslope -996352 hicredit 12 locredit -113 \
# offload 1

echo "${ETH} configured!\n"
done

tc qdisc
31 changes: 11 additions & 20 deletions config-srp-marvell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
BR=br0
HANDLE=9000

for INDEX in 3 2 1 0
do
ETH="lan${INDEX}"
echo "Unconfiguring ${ETH} Qdisc..."

tc qdisc del dev ${ETH} parent root handle ${HANDLE} mqprio
echo "${ETH} unconfigured\n"
done

set -e

echo "Configuring customer bridge MRP group address forwarding"

nft delete table bridge nat || : >/dev/null 2>&1

#ip link set dev ${BR}.50 type vlan mvrp on
#ip link set dev ${BR}.51 type vlan mvrp on

nft add table bridge nat
nft add chain bridge nat PREROUTING { type filter hook prerouting priority dstnat\; policy accept\; }

Expand All @@ -22,31 +28,16 @@ nft list ruleset

echo ""

# https://tsn.readthedocs.io/qdiscs.html

for INDEX in 0 1 2 3
do
ETH="lan${INDEX}"
echo "Configuring ${ETH} qdisc..."
echo "Configuring ${ETH} Qdisc..."

tc qdisc del dev ${ETH} parent root handle ${HANDLE} || : >/dev/null 2>&1
tc qdisc add dev ${ETH} parent root handle ${HANDLE} mqprio \
num_tc 3 \
map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
queues 2@0 1@2 1@3 \
queues 1@0 1@2 1@3 \
hw 1

# Class A
# tc qdisc replace dev ${ETH} parent ${HANDLE}:4 cbs \
# idleslope 98688 sendslope -901312 hicredit 153 locredit -1389 \
# offload 1

# Class B
# tc qdisc replace dev ${ETH} parent ${HANDLE}:3 cbs \
# idleslope 3648 sendslope -996352 hicredit 12 locredit -113 \
# offload 1

echo "${ETH} configured!\n"
done

tc qdisc

0 comments on commit d3d77ae

Please sign in to comment.