All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 0/9] ethtool: Add support for frame preemption
@ 2020-12-02  4:53 ` Vinicius Costa Gomes
  0 siblings, 0 replies; 54+ messages in thread
From: Vinicius Costa Gomes @ 2020-12-02  4:53 UTC (permalink / raw)
  To: netdev
  Cc: Vinicius Costa Gomes, jhs, xiyou.wangcong, jiri, kuba,
	m-karicheri2, vladimir.oltean, Jose.Abreu, po.liu,
	intel-wired-lan, anthony.l.nguyen

Hi,

Changes from RFC v2:
 - Reorganised the offload enabling/disabling on the driver size;
 - Added a few igc fixes;
 
Changes from RFC 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);

Another point that should be noted is the addition of the
TC_SETUP_PREEMPT offload type, the idea behind this is to allow other
qdiscs (was thinking of mqprio) to also configure which queues should
be marked as express/preemptible.

Original cover letter:

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 (9):
  ethtool: Add support for configuring frame preemption
  taprio: Add support for frame preemption offload
  igc: Set the RX packet buffer size for TSN mode
  igc: Only dump registers if configured to dump HW information
  igc: Avoid TX Hangs because long cycles
  igc: Add support for tuning frame preemption via ethtool
  igc: Add support for Frame Preemption offload
  igc: Add support for exposing frame preemption stats registers
  igc: Separate TSN configurations that can be updated

 drivers/net/ethernet/intel/igc/igc.h         |  10 ++
 drivers/net/ethernet/intel/igc/igc_defines.h |   6 +
 drivers/net/ethernet/intel/igc/igc_dump.c    |   3 +
 drivers/net/ethernet/intel/igc/igc_ethtool.c |  63 ++++++++
 drivers/net/ethernet/intel/igc/igc_main.c    |  31 +++-
 drivers/net/ethernet/intel/igc/igc_regs.h    |  10 ++
 drivers/net/ethernet/intel/igc/igc_tsn.c     | 158 ++++++++++++++-----
 drivers/net/ethernet/intel/igc/igc_tsn.h     |   1 +
 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 ++++-
 18 files changed, 491 insertions(+), 50 deletions(-)
 create mode 100644 net/ethtool/preempt.c

-- 
2.29.2


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

end of thread, other threads:[~2020-12-08  6:23 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02  4:53 [PATCH net-next v1 0/9] ethtool: Add support for frame preemption Vinicius Costa Gomes
2020-12-02  4:53 ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 1/9] ethtool: Add support for configuring " Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-03  1:53   ` Jakub Kicinski
2020-12-03  1:53     ` [Intel-wired-lan] " Jakub Kicinski
2020-12-05 17:43   ` Jakub Kicinski
2020-12-05 17:43     ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 22:11     ` Vinicius Costa Gomes
2020-12-07 22:11       ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 23:21       ` Jakub Kicinski
2020-12-07 23:21         ` [Intel-wired-lan] " Jakub Kicinski
2020-12-08  0:24         ` Vinicius Costa Gomes
2020-12-08  0:24           ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-08  0:27           ` Vladimir Oltean
2020-12-08  0:27             ` [Intel-wired-lan] " Vladimir Oltean
2020-12-08  0:48             ` Jakub Kicinski
2020-12-08  0:48               ` [Intel-wired-lan] " Jakub Kicinski
2020-12-08  6:22       ` Michal Kubecek
2020-12-08  6:22         ` [Intel-wired-lan] " Michal Kubecek
2020-12-02  4:53 ` [PATCH net-next v1 2/9] taprio: Add support for frame preemption offload Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 3/9] igc: Set the RX packet buffer size for TSN mode Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 4/9] igc: Only dump registers if configured to dump HW information Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 5/9] igc: Avoid TX Hangs because long cycles Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 6/9] igc: Add support for tuning frame preemption via ethtool Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-05 18:00   ` Jakub Kicinski
2020-12-05 18:00     ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 22:15     ` Vinicius Costa Gomes
2020-12-07 22:15       ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 23:22       ` Jakub Kicinski
2020-12-07 23:22         ` [Intel-wired-lan] " Jakub Kicinski
2020-12-02  4:53 ` [PATCH net-next v1 7/9] igc: Add support for Frame Preemption offload Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 8/9] igc: Add support for exposing frame preemption stats registers Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-05 17:59   ` Jakub Kicinski
2020-12-05 17:59     ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 22:29     ` Vinicius Costa Gomes
2020-12-07 22:29       ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-02  4:53 ` [PATCH net-next v1 9/9] igc: Separate TSN configurations that can be updated Vinicius Costa Gomes
2020-12-02  4:53   ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-05 17:50 ` [PATCH net-next v1 0/9] ethtool: Add support for frame preemption Jakub Kicinski
2020-12-05 17:50   ` [Intel-wired-lan] " Jakub Kicinski
2020-12-07 22:49   ` Vinicius Costa Gomes
2020-12-07 22:49     ` [Intel-wired-lan] " Vinicius Costa Gomes
2020-12-07 23:12     ` Vladimir Oltean
2020-12-07 23:12       ` [Intel-wired-lan] " Vladimir Oltean
2020-12-08  0:34       ` Vinicius Costa Gomes
2020-12-08  0:34         ` [Intel-wired-lan] " Vinicius Costa Gomes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.