OSDN Git Service

selftests/net: so_txtime multi-host support
authorCarlos Llamas <cmllamas@google.com>
Thu, 1 Apr 2021 00:40:20 +0000 (00:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Apr 2021 00:48:21 +0000 (17:48 -0700)
commit040806343bb4ef6365166eae666ced8a91b95321
tree29eb5ae99c893f809be94356c96e36969ee3fb96
parent917e2e6c57980e2255c5eb8ddd77ed670ae49752
selftests/net: so_txtime multi-host support

SO_TXTIME hardware offload requires testing across devices, either
between machines or separate network namespaces.

Split up SO_TXTIME test into tx and rx modes, so traffic can be
sent from one process to another. Create a veth-pair on different
namespaces and bind each process to an end point via [-S]ource and
[-D]estination parameters. Optional start [-t]ime parameter can be
passed to synchronize the test across the hosts (with synchorinzed
clocks).

Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/so_txtime.c
tools/testing/selftests/net/so_txtime.sh