]> www.infradead.org Git - users/hch/configfs.git/commit
selftests: net: local_termination: add PTP frames to the mix
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 15 Aug 2024 00:07:00 +0000 (03:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Aug 2024 08:59:32 +0000 (09:59 +0100)
commit237979504264912a9797dabc0db35126e705fe0d
tree05e767aa15419f560325e0b667d5a5e7bb5110ce
parent9aa3749ca4a880c1a59720aab3eacf344ed8d68d
selftests: net: local_termination: add PTP frames to the mix

A breakage in the felix DSA driver shows we do not have enough test
coverage. More generally, it is sufficiently special that it is likely
drivers will treat it differently.

This is not meant to be a full PTP test, it just makes sure that PTP
packets sent to the different addresses corresponding to their profiles
are received correctly. The local_termination selftest seemed like the
most appropriate place for this addition.

PTP RX/TX in some cases makes no sense (over a bridge) and this is why
$skip_ptp exists. And in others - PTP over a bridge port - the IP stack
needs convincing through the available bridge netfilter hooks to leave
the PTP packets alone and not stolen by the bridge rx_handler. It is
safe to assume that users have that figured out already. This is a
driver level test, and by using tcpdump, all that extra setup is out of
scope here.

send_non_ip() was an unfinished idea; written but never used.
Replace it with a more generic send_raw(), and send 3 PTP packet types
times 3 transports.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/local_termination.sh