net-timestamp: add selftests for SOF_TIMESTAMPING_OPT_RX_FILTER

Test a few possible cases where we use SOF_TIMESTAMPING_OPT_RX_FILTER
with software or hardware report/generation flag.

Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240909015612.3856-3-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jason Xing 2024-09-09 09:56:12 +08:00 committed by Jakub Kicinski
parent be8e9eb375
commit fffe8efd68

View File

@ -57,6 +57,8 @@ static struct sof_flag sof_flags[] = {
SOF_FLAG(SOF_TIMESTAMPING_SOFTWARE),
SOF_FLAG(SOF_TIMESTAMPING_RX_SOFTWARE),
SOF_FLAG(SOF_TIMESTAMPING_RX_HARDWARE),
SOF_FLAG(SOF_TIMESTAMPING_OPT_RX_FILTER),
SOF_FLAG(SOF_TIMESTAMPING_RAW_HARDWARE),
};
static struct socket_type socket_types[] = {
@ -97,6 +99,22 @@ static struct test_case test_cases[] = {
| SOF_TIMESTAMPING_RX_HARDWARE },
{}
},
{
{ .so_timestamping = SOF_TIMESTAMPING_RAW_HARDWARE
| SOF_TIMESTAMPING_OPT_RX_FILTER },
{}
},
{
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
| SOF_TIMESTAMPING_OPT_RX_FILTER },
{}
},
{
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
| SOF_TIMESTAMPING_RX_SOFTWARE
| SOF_TIMESTAMPING_OPT_RX_FILTER },
{ .swtstamp = true }
},
{
{ .so_timestamping = SOF_TIMESTAMPING_SOFTWARE
| SOF_TIMESTAMPING_RX_SOFTWARE },