public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: "Abdul Rahim, Faizal" <faizal.abdul.rahim@linux.intel.com>
Subject: [RFC PATCH for-faizal 2/4] selftests: net: tsn: push --txtime out of isochron_do()
Date: Thu, 21 Dec 2023 15:25:19 +0200	[thread overview]
Message-ID: <20231221132521.2314811-3-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20231221132521.2314811-1-vladimir.oltean@nxp.com>

Not all isochron tests should use the --txtime option. Make the
sender_extra_args and receiver_extra_args be provided by the caller, and
move --txtime to the ocelot psfp.sh test.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 .../selftests/drivers/net/ocelot/psfp.sh      |  1 +
 .../selftests/net/forwarding/tsn_lib.sh       | 21 +++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/ocelot/psfp.sh b/tools/testing/selftests/drivers/net/ocelot/psfp.sh
index bed748dde4b0..e6042b678c09 100755
--- a/tools/testing/selftests/drivers/net/ocelot/psfp.sh
+++ b/tools/testing/selftests/drivers/net/ocelot/psfp.sh
@@ -270,6 +270,7 @@ run_test()
 		"${STREAM_VID}" \
 		"${STREAM_PRIO}" \
 		"" \
+		"--txtime" "" \
 		"${isochron_dat}"
 
 	# Count all received packets by looking at the non-zero RX timestamps
diff --git a/tools/testing/selftests/net/forwarding/tsn_lib.sh b/tools/testing/selftests/net/forwarding/tsn_lib.sh
index b91bcd8008a9..f081cebb1c65 100644
--- a/tools/testing/selftests/net/forwarding/tsn_lib.sh
+++ b/tools/testing/selftests/net/forwarding/tsn_lib.sh
@@ -186,9 +186,9 @@ isochron_do()
 	local vid=$1; shift
 	local priority=$1; shift
 	local dst_ip=$1; shift
+	local sender_extra_args="$1"; shift
+	local receiver_extra_args="$1"; shift
 	local isochron_dat=$1; shift
-	local extra_args=""
-	local receiver_extra_args=""
 	local vrf="$(master_name_get ${sender_if_name})"
 	local use_l2="true"
 
@@ -205,19 +205,19 @@ isochron_do()
 	fi
 
 	if [ -z "${receiver_uds}" ]; then
-		extra_args="${extra_args} --omit-remote-sync"
+		sender_extra_args="${sender_extra_args} --omit-remote-sync"
 	fi
 
 	if ! [ -z "${shift_time}" ]; then
-		extra_args="${extra_args} --shift-time=${shift_time}"
+		sender_extra_args="${sender_extra_args} --shift-time=${shift_time}"
 	fi
 
 	if [ "${use_l2}" = "true" ]; then
-		extra_args="${extra_args} --l2 --etype=0xdead ${vid}"
-		receiver_extra_args="--l2 --etype=0xdead"
+		sender_extra_args="${sender_extra_args} --l2 --etype=0xdead ${vid}"
+		receiver_extra_args="${receiver_extra_args} --l2 --etype=0xdead"
 	else
-		extra_args="${extra_args} --l4 --ip-destination=${dst_ip}"
-		receiver_extra_args="--l4"
+		sender_extra_args="${sender_extra_args} --l4 --ip-destination=${dst_ip}"
+		receiver_extra_args="${receiver_extra_args} --l4"
 	fi
 
 	cpufreq_max ${ISOCHRON_CPU}
@@ -232,7 +232,6 @@ isochron_do()
 		--cycle-time ${cycle_time} \
 		--num-frames ${num_pkts} \
 		--frame-size 64 \
-		--txtime \
 		--utc-tai-offset ${UTC_TAI_OFFSET} \
 		--cpu-mask $((1 << ${ISOCHRON_CPU})) \
 		--sched-fifo \
@@ -240,8 +239,8 @@ isochron_do()
 		--client 127.0.0.1 \
 		--sync-threshold 5000 \
 		--output-file ${isochron_dat} \
-		${extra_args} \
-		--quiet
+		--quiet \
+		${sender_extra_args}
 
 	isochron_recv_stop 5000
 
-- 
2.34.1


  parent reply	other threads:[~2023-12-21 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 13:25 [RFC PATCH for-faizal 0/4] tc-taprio selftests Vladimir Oltean
2023-12-21 13:25 ` [RFC PATCH for-faizal 1/4] selftests: net: forwarding: allow veth pairs to be created with multiple queues Vladimir Oltean
2023-12-21 13:25 ` Vladimir Oltean [this message]
2023-12-21 13:25 ` [RFC PATCH for-faizal 3/4] selftests: net: tsn: allow isochron_do() to skip sync monitoring on sender too Vladimir Oltean
2023-12-21 13:25 ` [RFC PATCH for-faizal 4/4] selftests: net: tsn: add tc-taprio test cases (WIP) Vladimir Oltean
2023-12-22  6:28 ` [RFC PATCH for-faizal 0/4] tc-taprio selftests Hangbin Liu

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=20231221132521.2314811-3-vladimir.oltean@nxp.com \
    --to=vladimir.oltean@nxp.com \
    --cc=faizal.abdul.rahim@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox