net: netdevsim: mimic tc-taprio offload
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 7 Aug 2023 19:33:21 +0000 (22:33 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Aug 2023 22:59:21 +0000 (15:59 -0700)
commit35da47fe1c4766451def03a1b4f59c6b13a9373c
tree8257242b3250cc1a50d5fb8d1af1926050aaae31
parentb63e78fca889e07931ec8f259701718a24e5052e
net: netdevsim: mimic tc-taprio offload

To be able to use netdevsim for tc-testing with an offloaded tc-taprio
schedule, it needs to report a PTP clock (which it now does), and to
accept ndo_setup_tc(TC_SETUP_QDISC_TAPRIO) calls.

Since netdevsim has no packet I/O, this doesn't do anything intelligent,
it only allows taprio offload code paths to go through some level of
automated testing.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20230807193324.4128292-9-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netdevsim/netdev.c