From: Michal Kubecek <mkubecek@suse.cz>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next-queue RFC 0/4] ethtool: Add support for frame preemption
Date: Sat, 16 May 2020 11:33:17 +0200 [thread overview]
Message-ID: <20200516093317.GJ21714@lion.mk-sys.cz> (raw)
In-Reply-To: <20200516012948.3173993-1-vinicius.gomes@intel.com>
On Fri, May 15, 2020 at 06:29:44PM -0700, Vinicius Costa Gomes wrote:
> Hi,
>
> This series adds support for configuring frame preemption, as defined
> by IEEE 802.1Q-2018 (previously IEEE 802.1Qbu) and IEEE 802.3br.
>
> Frame preemption allows a packet from a higher priority queue marked
> as "express" to preempt a packet from lower priority queue marked as
> "preemptible". The idea is that this can help reduce the latency for
> higher priority traffic.
>
> Previously, the proposed interface for configuring these features was
> using the qdisc layer. But as this is very hardware dependent and all
> that qdisc did was pass the information to the driver, it makes sense
> to have this in ethtool.
>
> One example, for retrieving and setting the configuration:
>
> $ ethtool $ sudo ./ethtool --show-frame-preemption enp3s0
> Frame preemption settings for enp3s0:
> support: supported
IMHO we don't need a special bool for this. IIUC this is not a state
flag that would change value for a particular device; either the device
supports the feature or it does not. If it does not, the ethtool_ops
callbacks would return -EOPNOTSUPP (or would not even exist if the
driver has no support) and ethtool would say so.
> active: active
> supported queues: 0xf
> supported queues: 0xe
> minimum fragment size: 68
>
>
> $ ethtool --set-frame-preemption enp3s0 fp on min-frag-size 68 preemptible-queues-mask 0xe
>
> This is a RFC because I wanted to have feedback on some points:
>
> - The parameters added are enough for the hardware I have, is it
> enough in general?
>
> - even with the ethtool via netlink effort, I chose to keep the
> ioctl() way, in case someone wants to backport this to an older
> kernel, is there a problem with this?
I would prefer not extending ioctl interface with new features, with
obvious exceptions like adding new link modes or so. Not only because
having new features only available through netlink will motivate authors
of userspace tools to support netlink but mostly because the lack of
flexibility and extensibility of ioctl interface inevitably leads to
compromises you wouldn't have to do if you only implement netlink
requests.
One example I can see is the use of u32 for queue bitmaps. Perhaps you
don't expect this feature to be supported on devices with more than 32
queues (and I don't have enough expertise to tell if it's justified at
the moment) but can you be sure it will be the case in 10 or 20 years?
As long as these hardcoded u32 bitmaps are only part of internal kernel
API (ethtool_ops), extending the support for bigger devices will mean
some code churn (possibly large if many drivers implement the feature)
but it's something that can be done. But if you have this limit in
userspace API, you are in a much bigger trouble. The same can be said
for adding new attributes - easy with netlink but with ioctl you never
know if those reserved fields will suffice.
>
> - Some space for bikeshedding the names and location (for example,
> does it make sense for these settings to be per-queue?), as I am
> not quite happy with them, one example, is the use of preemptible
> vs. preemptable;
>
>
> About the patches, should be quite straightforward:
>
> Patch 1, adds the ETHTOOL_GFP and ETHOOL_SFP commands and the
> associated data structures;
>
> Patch 2, adds the ETHTOOL_MSG_PREEMPT_GET and ETHTOOL_MSG_PREEMPT_SET
> netlink messages and the associated attributes;
I didn't look too deeply but one thing I noticed is that setting the
parameters using ioctl() does not trigger netlink notification. If we
decide to implement ioctl support (and I'm not a fan of that), the
notifications should be sent even when ioctl is used.
Michal
next prev parent reply other threads:[~2020-05-16 9:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-16 1:29 [Intel-wired-lan] [next-queue RFC 0/4] ethtool: Add support for frame preemption Vinicius Costa Gomes
2020-05-16 1:29 ` [Intel-wired-lan] [next-queue RFC 1/4] ethtool: Add support for configuring " Vinicius Costa Gomes
2020-05-19 15:27 ` Murali Karicheri
2020-05-16 1:29 ` [Intel-wired-lan] [next-queue RFC 2/4] ethtool: Add support for configuring frame preemption via netlink Vinicius Costa Gomes
2020-05-16 1:29 ` [Intel-wired-lan] [next-queue RFC 3/4] igc: Add support for configuring frame preemption Vinicius Costa Gomes
2020-05-19 16:36 ` Murali Karicheri
2020-05-16 1:29 ` [Intel-wired-lan] [next-queue RFC 4/4] igc: Add support for exposing frame preemption stats registers Vinicius Costa Gomes
2020-05-20 12:50 ` Murali Karicheri
2020-05-16 9:33 ` Michal Kubecek [this message]
2020-05-18 19:34 ` [Intel-wired-lan] [next-queue RFC 0/4] ethtool: Add support for frame preemption Vinicius Costa Gomes
2020-05-19 22:40 ` Andre Guedes
2020-05-19 22:53 ` Vinicius Costa Gomes
2020-05-16 20:37 ` David Miller
2020-05-16 21:03 ` Vladimir Oltean
2020-05-16 22:19 ` David Miller
2020-05-17 10:51 ` Vladimir Oltean
2020-05-17 18:45 ` Andrew Lunn
2020-05-17 19:04 ` Vladimir Oltean
2020-05-18 19:05 ` Vinicius Costa Gomes
2020-05-18 20:56 ` Jakub Kicinski
2020-05-18 22:06 ` Vinicius Costa Gomes
2020-05-18 22:22 ` Jakub Kicinski
2020-05-18 23:05 ` Vinicius Costa Gomes
2020-05-18 23:09 ` Jakub Kicinski
2020-05-20 21:42 ` Andre Guedes
2020-05-20 22:35 ` Vinicius Costa Gomes
2020-05-19 16:34 ` Murali Karicheri
2020-05-19 17:49 ` Vinicius Costa Gomes
2020-05-19 14:53 ` Murali Karicheri
2020-05-19 15:32 ` Vinicius Costa Gomes
2020-05-19 16:11 ` Murali Karicheri
2020-05-19 22:39 ` Andre Guedes
2020-05-19 23:37 ` Vinicius Costa Gomes
2020-05-20 12:47 ` Murali Karicheri
2020-05-20 12:52 ` Joergen Andreasen
2020-05-20 21:32 ` Vinicius Costa Gomes
-- strict thread matches above, loose matches on Subject: below --
2020-05-19 9:10 Po Liu
2020-05-19 16:43 ` Vinicius Costa Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200516093317.GJ21714@lion.mk-sys.cz \
--to=mkubecek@suse.cz \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox