forked from Mellanox/mlnx-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These scripts should be used to configure SmartNIC for Microsoft HLK test framework. Signed-off-by: Vladimir Sokolovsky <[email protected]>
- Loading branch information
1 parent
e312605
commit 1cdf87a
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
export PATH=/opt/mellanox/iproute2/sbin:$PATH | ||
|
||
tc qdisc del dev p0 handle ffff: ingress | ||
tc qdisc del dev pf0hpf handle ffff: ingress | ||
tc qdisc del dev p1 handle ffff: ingress | ||
tc qdisc del dev pf1hpf handle ffff: ingress | ||
ifconfig p0 mtu 1500 | ||
ifconfig pf0hpf mtu 1500 | ||
ifconfig p1 mtu 1500 | ||
ifconfig pf1hpf mtu 1500 | ||
|
||
if [ -e /etc/debian_version ]; then | ||
/etc/init.d/openvswitch-switch start | ||
else | ||
/usr/bin/systemctl start openvswitch.service | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
export PATH=/opt/mellanox/iproute2/sbin:$PATH | ||
|
||
if [ -e /etc/debian_version ]; then | ||
/etc/init.d/openvswitch-switch stop | ||
else | ||
/usr/bin/systemctl stop openvswitch.service | ||
fi | ||
|
||
tc qdisc del dev p0 handle ffff: ingress | ||
tc qdisc del dev pf0hpf handle ffff: ingress | ||
tc qdisc del dev p1 handle ffff: ingress | ||
tc qdisc del dev pf1hpf handle ffff: ingress | ||
|
||
|
||
tc qdisc add dev p0 handle ffff: ingress | ||
tc qdisc add dev pf0hpf handle ffff: ingress | ||
tc qdisc add dev p1 handle ffff: ingress | ||
tc qdisc add dev pf1hpf handle ffff: ingress | ||
|
||
tc filter add dev p0 ingress protocol all flower skip_sw action mirred egress redirect dev pf0hpf | ||
tc filter add dev pf0hpf ingress protocol all flower skip_sw action mirred egress redirect dev p0 | ||
tc filter add dev p1 ingress protocol all flower skip_sw action mirred egress redirect dev pf1hpf | ||
tc filter add dev pf1hpf ingress protocol all flower skip_sw action mirred egress redirect dev p1 | ||
|
||
ifconfig p0 mtu 9614 | ||
ifconfig pf0hpf mtu 9614 | ||
ifconfig p1 mtu 9614 | ||
ifconfig pf1hpf mtu 9614 |