__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-only

source ethtool-common.sh

set -o pipefail

n_children() {
    n=$(tc qdisc show dev $NDEV | grep '^qdisc' | wc -l)
    echo $((n - 1))
}

tcq() {
    tc qdisc $1 dev $NDEV ${@:2}
}

n_child_assert() {
    n=$(n_children)
    if [ $n -ne $1 ]; then
	echo "ERROR ($root): ${@:2}, expected $1 have $n"
	((num_errors++))
    else
	((num_passes++))
    fi
}


for root in mq mqprio; do
    NDEV=$(make_netdev 1 4)

    opts=
    [ $root == "mqprio" ] && opts='hw 0 num_tc 1 map 0 0 0 0  queues 1@0'

    tcq add root handle 100: $root $opts
    n_child_assert 4 'Init'

    # All defaults

    for n in 3 2 1 2 3 4 1 4; do
	ethtool -L $NDEV combined $n
	n_child_assert $n "Change queues to $n while down"
    done

    ip link set dev $NDEV up

    for n in 3 2 1 2 3 4 1 4; do
	ethtool -L $NDEV combined $n
	n_child_assert $n "Change queues to $n while up"
    done

    # One real one
    tcq replace parent 100:4 handle 204: pfifo_fast
    n_child_assert 4 "One real queue"

    ethtool -L $NDEV combined 1
    n_child_assert 2 "One real queue, one default"

    ethtool -L $NDEV combined 4
    n_child_assert 4 "One real queue, rest default"

    # Remove real one
    tcq del parent 100:4 handle 204:

    # Replace default with pfifo
    tcq replace parent 100:1 handle 205: pfifo limit 1000
    n_child_assert 3 "Deleting real one, replacing default one with pfifo"

    ethtool -L $NDEV combined 1
    n_child_assert 1 "Grafted, one"

    cleanup_nsim
done

if [ $num_errors -eq 0 ]; then
    echo "PASSED all $((num_passes)) checks"
    exit 0
else
    echo "FAILED $num_errors/$((num_errors+num_passes)) checks"
    exit 1
fi

Filemanager

Name Type Size Permission Actions
Makefile File 396 B 0644
devlink.sh File 19.29 KB 0755
devlink_in_netns.sh File 1.34 KB 0755
devlink_trap.sh File 12.62 KB 0755
ethtool-coalesce.sh File 3.19 KB 0755
ethtool-common.sh File 1.06 KB 0644
ethtool-features.sh File 665 B 0644
ethtool-fec.sh File 3.1 KB 0755
ethtool-pause.sh File 1.27 KB 0755
ethtool-ring.sh File 1.79 KB 0755
fib.sh File 7.54 KB 0755
fib_notifications.sh File 10.13 KB 0755
hw_stats_l3.sh File 9.16 KB 0755
macsec-offload.sh File 2.84 KB 0755
nexthop.sh File 26.37 KB 0755
peer.sh File 3.26 KB 0755
psample.sh File 4.02 KB 0755
tc-mq-visibility.sh File 1.64 KB 0755
udp_tunnel_nic.sh File 20.27 KB 0755
Filemanager