diff --git a/debian/rules b/debian/rules index e353627..49186e4 100755 --- a/debian/rules +++ b/debian/rules @@ -40,6 +40,7 @@ override_dh_auto_install: install -m 0755 ofed_scripts/setup_mr_cache.sh debian/$(pname)/usr/sbin install -m 0755 ofed_scripts/odp_stat.sh debian/$(pname)/usr/sbin install -m 0755 ofed_scripts/show_counters debian/$(pname)/usr/sbin + install -m 0755 ofed_scripts/mlnx*hlk debian/$(pname)/usr/sbin install -m 0755 ofed_scripts/roce_config.sh debian/$(pname)/usr/bin/roce_config install -m 0644 kernel-boot/mlnx-bf.conf debian/$(pname)/etc/modprobe.d diff --git a/mlnx-tools.spec b/mlnx-tools.spec index 2b996fa..e92a978 100644 --- a/mlnx-tools.spec +++ b/mlnx-tools.spec @@ -84,6 +84,7 @@ install -m 0755 ofed_scripts/setup_mr_cache.sh %{buildroot}%{_sbindir} install -m 0755 ofed_scripts/odp_stat.sh %{buildroot}%{_sbindir} install -m 0755 ofed_scripts/show_counters %{buildroot}%{_sbindir} install -m 0755 ofed_scripts/show_gids %{buildroot}%{_sbindir} +install -m 0755 ofed_scripts/mlnx*hlk %{buildroot}%{_sbindir} install -m 0755 ofed_scripts/ibdev2netdev %{buildroot}%{_bindir} install -m 0755 ofed_scripts/roce_config.sh %{buildroot}%{_bindir}/roce_config install -m 0755 kernel-boot/vf-net-link-name.sh %{buildroot}/lib/udev/ diff --git a/ofed_scripts/mlnx-post-hlk b/ofed_scripts/mlnx-post-hlk new file mode 100755 index 0000000..60e679b --- /dev/null +++ b/ofed_scripts/mlnx-post-hlk @@ -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 diff --git a/ofed_scripts/mlnx-pre-hlk b/ofed_scripts/mlnx-pre-hlk new file mode 100755 index 0000000..145ac23 --- /dev/null +++ b/ofed_scripts/mlnx-pre-hlk @@ -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