[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201012235642.1384318-1-vinicius.gomes@intel.com>
Date: Mon, 12 Oct 2020 16:56:40 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: netdev@...r.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us, kuba@...nel.org,
m-karicheri2@...com, vladimir.oltean@....com,
Jose.Abreu@...opsys.com, po.liu@....com
Subject: [RFC net-next v2 0/2] ethtool: Add support for frame preemption
Hi,
Changes from v1:
- The per-queue preemptible/express setting is moved to applicable
qdiscs (Jakub Kicinski and others);
- "min-frag-size" now follows the 802.3br specification more closely,
it's expressed as X in '64(1 + X) + 4' (Joergen Andreasen)
This is still an RFC because two main reasons, I want to confirm that
this approach (per-queue settings via qdiscs, device settings via
ethtool) looks good, even though there aren't much more options left ;-)
The other reason is that while testing this I found some weirdness
in the driver that I would need a bit more time to investigate.
(In case these patches are not enough to give an idea of how things
work, I can send the userspace patches, of course.)
The idea of this "hybrid" approach is that applications/users would do
the following steps to configure frame preemption:
$ tc qdisc replace dev $IFACE parent root handle 100 taprio \
num_tc 3 \
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
queues 1@0 1@1 2@2 \
base-time $BASE_TIME \
sched-entry S 0f 10000000 \
preempt 1110 \
flags 0x2
The "preempt" parameter is the only difference, it configures which
queues are marked as preemptible, in this example, queue 0 is marked
as "not preemptible", so it is express, the rest of the four queues
are preemptible.
The next step, of this example, would be to enable frame preemption in
the device, via ethtool, and set the minimum fragment size to 2:
$ sudo ./ethtool --set-frame-preemption $IFACE fp on min-frag-size 2
Cheers,
Vinicius Costa Gomes (2):
ethtool: Add support for configuring frame preemption
taprio: Add support for frame preemption offload
include/linux/ethtool.h | 19 ++++
include/linux/netdevice.h | 1 +
include/net/pkt_sched.h | 4 +
include/uapi/linux/ethtool_netlink.h | 17 +++
include/uapi/linux/pkt_sched.h | 1 +
net/ethtool/Makefile | 2 +-
net/ethtool/netlink.c | 19 ++++
net/ethtool/netlink.h | 4 +
net/ethtool/preempt.c | 151 +++++++++++++++++++++++++++
net/sched/sch_taprio.c | 41 +++++++-
10 files changed, 254 insertions(+), 5 deletions(-)
create mode 100644 net/ethtool/preempt.c
--
2.28.0
Powered by blists - more mailing lists