]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: tsn_lib: allow running ptp4l on multiple interfaces
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 23 Sep 2022 21:00:13 +0000 (00:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 20:22:00 +0000 (13:22 -0700)
commit7b440d48052e682d7d79e640fcfad168e6538313
treefb3be8fecbc9bedd3097e6f3e7c277794c5ff2c1
parentd78965c086b6e06a8c19051d6eb3f381286e33a5
selftests: net: tsn_lib: allow running ptp4l on multiple interfaces

Switch ports will want to act as Boundary Clocks, which are configured
using ptp4l by specifying the "-i" argument multiple times.

Since we track a log file and a pid file for each ptp4l instance, and we
want to be compatible with the existing single-port callers of
ptp4l_start and ptp4l_stop, pass the interface list as a single string
of space-separated values. Based on this, we create a label for each
ptp4l instance, where the spaces are replaced with underscores
(ptp4l_start "eth0 eth1" generates "ptp4l_pid_eth0_eth1").

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/tsn_lib.sh