All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@OSS.NVIDIA.COM>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <jiri@OSS.NVIDIA.COM>,
	<petrm@OSS.NVIDIA.COM>, <danieller@OSS.NVIDIA.COM>,
	<amcohen@OSS.NVIDIA.COM>, <mlxsw@OSS.NVIDIA.COM>,
	Ido Schimmel <idosch@OSS.NVIDIA.COM>
Subject: [PATCH net-next 04/11] selftests: mlxsw: qos_pfc: Convert to iproute2 dcb
Date: Mon, 17 May 2021 20:03:54 +0300	[thread overview]
Message-ID: <20210517170401.188563-5-idosch@nvidia.com> (raw)
In-Reply-To: <20210517170401.188563-1-idosch@nvidia.com>

From: Petr Machata <petrm@nvidia.com>

There is a dedicated tool for configuration of DCB in iproute2 now. Use it
in the selftest instead of mlnx_qos.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 .../selftests/drivers/net/mlxsw/qos_pfc.sh    | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh b/tools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh
index 5c7700212f75..5d5622fc2758 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/qos_pfc.sh
@@ -171,7 +171,7 @@ switch_create()
 	# assignment.
 	tc qdisc replace dev $swp1 root handle 1: \
 	   ets bands 8 strict 8 priomap 7 6
-	__mlnx_qos -i $swp1 --prio2buffer=0,1,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp1 prio-buffer all:0 1:1
 
 	# $swp2
 	# -----
@@ -209,8 +209,8 @@ switch_create()
 	# the lossless prio into a buffer of its own. Don't bother with buffer
 	# sizes though, there is not going to be any pressure in the "backward"
 	# direction.
-	__mlnx_qos -i $swp3 --prio2buffer=0,1,0,0,0,0,0,0 >/dev/null
-	__mlnx_qos -i $swp3 --pfc=0,1,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp3 prio-buffer all:0 1:1
+	dcb pfc set dev $swp3 prio-pfc all:off 1:on
 
 	# $swp4
 	# -----
@@ -226,11 +226,11 @@ switch_create()
 	# Configure qdisc so that we can hand-tune headroom.
 	tc qdisc replace dev $swp4 root handle 1: \
 	   ets bands 8 strict 8 priomap 7 6
-	__mlnx_qos -i $swp4 --prio2buffer=0,1,0,0,0,0,0,0 >/dev/null
-	__mlnx_qos -i $swp4 --pfc=0,1,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp4 prio-buffer all:0 1:1
+	dcb pfc set dev $swp4 prio-pfc all:off 1:on
 	# PG0 will get autoconfigured to Xoff, give PG1 arbitrarily 100K, which
 	# is (-2*MTU) about 80K of delay provision.
-	__mlnx_qos -i $swp4 --buffer_size=0,$_100KB,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp4 buffer-size all:0 1:$_100KB
 
 	# bridges
 	# -------
@@ -273,9 +273,9 @@ switch_destroy()
 	# $swp4
 	# -----
 
-	__mlnx_qos -i $swp4 --buffer_size=0,0,0,0,0,0,0,0 >/dev/null
-	__mlnx_qos -i $swp4 --pfc=0,0,0,0,0,0,0,0 >/dev/null
-	__mlnx_qos -i $swp4 --prio2buffer=0,0,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp4 buffer-size all:0
+	dcb pfc set dev $swp4 prio-pfc all:off
+	dcb buffer set dev $swp4 prio-buffer all:0
 	tc qdisc del dev $swp4 root
 
 	devlink_tc_bind_pool_th_restore $swp4 1 ingress
@@ -288,8 +288,8 @@ switch_destroy()
 	# $swp3
 	# -----
 
-	__mlnx_qos -i $swp3 --pfc=0,0,0,0,0,0,0,0 >/dev/null
-	__mlnx_qos -i $swp3 --prio2buffer=0,0,0,0,0,0,0,0 >/dev/null
+	dcb pfc set dev $swp3 prio-pfc all:off
+	dcb buffer set dev $swp3 prio-buffer all:0
 	tc qdisc del dev $swp3 root
 
 	devlink_tc_bind_pool_th_restore $swp3 1 egress
@@ -315,7 +315,7 @@ switch_destroy()
 	# $swp1
 	# -----
 
-	__mlnx_qos -i $swp1 --prio2buffer=0,0,0,0,0,0,0,0 >/dev/null
+	dcb buffer set dev $swp1 prio-buffer all:0
 	tc qdisc del dev $swp1 root
 
 	devlink_tc_bind_pool_th_restore $swp1 1 ingress
-- 
2.31.1


  parent reply	other threads:[~2021-05-17 17:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 17:03 [PATCH net-next 00/11] mlxsw: Various updates Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 01/11] selftests: mlxsw: Make the unsplit array global in port_scale test Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 02/11] selftests: mlxsw: Make sampling test more robust Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 03/11] selftests: mlxsw: qos_headroom: Convert to iproute2 dcb Ido Schimmel
2021-05-17 17:03 ` Ido Schimmel [this message]
2021-05-17 17:03 ` [PATCH net-next 05/11] selftests: mlxsw: qos_lib: Drop __mlnx_qos Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 06/11] mlxsw: spectrum_buffers: Switch function arguments Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 07/11] mlxsw: Verify the accessed index doesn't exceed the array length Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 08/11] mlxsw: core: Avoid unnecessary EMAD buffer copy Ido Schimmel
2021-05-17 17:03 ` [PATCH net-next 09/11] mlxsw: spectrum_router: Avoid missing error code warning Ido Schimmel
2021-05-17 17:04 ` [PATCH net-next 10/11] mlxsw: Remove Mellanox SwitchIB ASIC support Ido Schimmel
2021-05-17 17:04 ` [PATCH net-next 11/11] mlxsw: Remove Mellanox SwitchX-2 " Ido Schimmel
2021-05-17 22:30 ` [PATCH net-next 00/11] mlxsw: Various updates patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210517170401.188563-5-idosch@nvidia.com \
    --to=idosch@oss.nvidia.com \
    --cc=amcohen@OSS.NVIDIA.COM \
    --cc=danieller@OSS.NVIDIA.COM \
    --cc=davem@davemloft.net \
    --cc=jiri@OSS.NVIDIA.COM \
    --cc=kuba@kernel.org \
    --cc=mlxsw@OSS.NVIDIA.COM \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@OSS.NVIDIA.COM \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.