netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/9] Improve the taprio qdisc's relationship with its children
@ 2023-06-13 21:54 Vladimir Oltean
  2023-06-13 21:54 ` [PATCH v2 net-next 1/9] net/sched: taprio: don't access q->qdiscs[] in unoffloaded mode during attach() Vladimir Oltean
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Vladimir Oltean @ 2023-06-13 21:54 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jamal Hadi Salim, Cong Wang, Jiri Pirko, Vinicius Costa Gomes,
	linux-kernel, intel-wired-lan, Muhammad Husaini Zulkifli,
	Peilin Ye, Pedro Tammela, Richard Cochran, Zhengchao Shao,
	Maxim Georgiev

Changes in v2:
It was requested to add test cases for the taprio software and offload modes.
Those are patches 08 and 09.

That implies adding taprio offload support to netdevsim, which is patch 07.

In turn, that implies adding a PHC driver for netdevsim, which is patch 06.

v1 at:
https://lore.kernel.org/lkml/20230531173928.1942027-1-vladimir.oltean@nxp.com/

Original message:

Prompted by Vinicius' request to consolidate some child Qdisc
dereferences in taprio:
https://lore.kernel.org/netdev/87edmxv7x2.fsf@intel.com/

I remembered that I had left some unfinished work in this Qdisc, namely
commit af7b29b1deaa ("Revert "net/sched: taprio: make qdisc_leaf() see
the per-netdev-queue pfifo child qdiscs"").

This patch set represents another stab at, essentially, what's in the
title. Not only does taprio not properly detect when it's grafted as a
non-root qdisc, but it also returns incorrect per-class stats.
Eventually, Vinicius' request is addressed too, although in a different
form than the one he requested (which was purely cosmetic).

Review from people more experienced with Qdiscs than me would be
appreciated. I tried my best to explain what I consider to be problems.
I am deliberately targeting net-next because the changes are too
invasive for net - they were reverted from stable once already.

Vladimir Oltean (9):
  net/sched: taprio: don't access q->qdiscs[] in unoffloaded mode during
    attach()
  net/sched: taprio: keep child Qdisc refcount elevated at 2 in offload
    mode
  net/sched: taprio: try again to report q->qdiscs[] to qdisc_leaf()
  net/sched: taprio: delete misleading comment about preallocating child
    qdiscs
  net/sched: taprio: dump class stats for the actual q->qdiscs[]
  net: netdevsim: create a mock-up PTP Hardware Clock driver
  net: netdevsim: mimic tc-taprio offload
  selftests/tc-testing: test that taprio can only be attached as root
  selftests/tc-testing: verify that a qdisc can be grafted onto a taprio
    class

 drivers/net/Kconfig                           |   1 +
 drivers/net/netdevsim/ethtool.c               |  11 ++
 drivers/net/netdevsim/netdev.c                |  38 +++-
 drivers/net/netdevsim/netdevsim.h             |   2 +
 drivers/ptp/Kconfig                           |  11 ++
 drivers/ptp/Makefile                          |   1 +
 drivers/ptp/ptp_mock.c                        | 175 ++++++++++++++++++
 include/linux/ptp_mock.h                      |  38 ++++
 net/sched/sch_taprio.c                        |  68 ++++---
 .../tc-testing/tc-tests/qdiscs/taprio.json    |  98 ++++++++++
 10 files changed, 415 insertions(+), 28 deletions(-)
 create mode 100644 drivers/ptp/ptp_mock.c
 create mode 100644 include/linux/ptp_mock.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-08-01 18:06 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13 21:54 [PATCH v2 net-next 0/9] Improve the taprio qdisc's relationship with its children Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 1/9] net/sched: taprio: don't access q->qdiscs[] in unoffloaded mode during attach() Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 2/9] net/sched: taprio: keep child Qdisc refcount elevated at 2 in offload mode Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 3/9] net/sched: taprio: try again to report q->qdiscs[] to qdisc_leaf() Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 4/9] net/sched: taprio: delete misleading comment about preallocating child qdiscs Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 5/9] net/sched: taprio: dump class stats for the actual q->qdiscs[] Vladimir Oltean
2023-06-13 21:54 ` [PATCH v2 net-next 6/9] net: netdevsim: create a mock-up PTP Hardware Clock driver Vladimir Oltean
2023-06-14 13:11   ` Simon Horman
2023-06-14 22:17     ` Vladimir Oltean
2023-06-15  7:58       ` Simon Horman
2023-06-15 14:02   ` Dan Carpenter
2023-06-13 21:54 ` [PATCH v2 net-next 7/9] net: netdevsim: mimic tc-taprio offload Vladimir Oltean
2023-06-15  0:06   ` Vinicius Costa Gomes
2023-08-01 16:45     ` Vladimir Oltean
2023-08-01 17:39       ` Vinicius Costa Gomes
2023-08-01 17:43         ` Vladimir Oltean
2023-08-01 18:06           ` Vinicius Costa Gomes
2023-06-13 21:54 ` [PATCH v2 net-next 8/9] selftests/tc-testing: test that taprio can only be attached as root Vladimir Oltean
2023-06-14 16:44   ` Pedro Tammela
2023-06-13 21:54 ` [PATCH v2 net-next 9/9] selftests/tc-testing: verify that a qdisc can be grafted onto a taprio class Vladimir Oltean
2023-06-14 16:45   ` Pedro Tammela
2023-08-01 16:53     ` Vladimir Oltean
2023-06-14 16:47 ` [PATCH v2 net-next 0/9] Improve the taprio qdisc's relationship with its children Pedro Tammela
2023-08-01 16:06   ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).