netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] cxgb4: add support for TC-MQPRIO Qdisc Offload
@ 2019-11-07 15:59 Rahul Lakkireddy
  2019-11-07 15:59 ` [PATCH net-next 1/6] cxgb4: query firmware for QoS offload resources Rahul Lakkireddy
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Rahul Lakkireddy @ 2019-11-07 15:59 UTC (permalink / raw)
  To: netdev; +Cc: davem, nirranjan, vishal, dt

This series of patches add support for offloading TC-MQPRIO Qdisc
to Chelsio T5/T6 NICs. Offloading QoS traffic shaping and pacing
requires using Ethernet Offload (ETHOFLD) resources available on
Chelsio NICs. The ETHOFLD resources are configured by firmware
and taken from the resource pool shared with other Chelsio Upper
Layer Drivers. Traffic flowing through ETHOFLD region requires a
software netdev Tx queue (EOSW_TXQ) exposed to networking stack,
and an underlying hardware Tx queue (EOHW_TXQ) used for sending
packets through hardware.

ETHOFLD region is addressed using EOTIDs, which are per-connection
resource. Hence, EOTIDs are capable of storing only a very small
number of packets in flight. To allow more connections to share
the the QoS rate limiting configuration, multiple EOTIDs must be
allocated to reduce packet drops. EOTIDs are 1-to-1 mapped with
software EOSW_TXQ. Several software EOSW_TXQs can post packets to
a single hardware EOHW_TXQ.

The series is broken down as follows:

Patch 1 queries firmware for maximum available traffic classes,
as well as, start and maximum available indices (EOTID) into ETHOFLD
region, supported by the underlying device.

Patch 2 reworks queue configuration and simplifies MSI-X allocation
logic in preparation for ETHOFLD queues support.

Patch 3 adds skeleton for validating and configuring TC-MQPRIO Qdisc
offload. Also, adds support for software EOSW_TXQs and exposes them
to network stack. Updates Tx queue selection to use fallback NIC Tx
path for unsupported traffic that can't go through ETHOFLD queues.

Patch 4 adds support for managing hardware queues to rate limit
traffic flowing through them. The queues are allocated/removed based
on enabling/disabling TC-MQPRIO Qdisc offload, respectively.

Patch 5 adds Tx path for traffic flowing through software EOSW_TXQ
and EOHW_TXQ. Also, adds Rx path to handle Tx completions.

Patch 6 updates exisiting SCHED API to configure FLOWC based QoS
offload. In the existing QUEUE based rate limiting, multiple queues
sharing a traffic class get the aggreagated max rate limit value.
On the other hand, in FLOWC based rate limiting, multiple queues
sharing a traffic class get their own individual max rate limit
value. For example, if 2 queues are bound to class 0, which is rate
limited to 1 Gbps, then in QUEUE based rate limiting, both the
queues get the aggregate max output of 1 Gbps only. In FLOWC based
rate limiting, each queue gets its own output of max 1 Gbps each;
i.e. 2 queues * 1 Gbps rate limit = 2 Gbps max output.

Thanks,
Rahul


Rahul Lakkireddy (6):
  cxgb4: query firmware for QoS offload resources
  cxgb4: rework queue config and MSI-X allocation
  cxgb4: parse and configure TC-MQPRIO offload
  cxgb4: add ETHOFLD hardware queue support
  cxgb4: add Tx and Rx path for ETHOFLD traffic
  cxgb4: add FLOWC based QoS offload

 drivers/net/ethernet/chelsio/cxgb4/Makefile   |   2 +-
 .../net/ethernet/chelsio/cxgb4/cudbg_entity.h |   3 +
 .../net/ethernet/chelsio/cxgb4/cudbg_lib.c    |  21 +
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h    | 109 ++-
 .../ethernet/chelsio/cxgb4/cxgb4_debugfs.c    |  53 +-
 .../net/ethernet/chelsio/cxgb4/cxgb4_main.c   | 591 +++++++++----
 .../ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c  | 649 ++++++++++++++
 .../ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h  |  43 +
 .../net/ethernet/chelsio/cxgb4/cxgb4_uld.c    | 131 +--
 .../net/ethernet/chelsio/cxgb4/cxgb4_uld.h    |  39 +
 drivers/net/ethernet/chelsio/cxgb4/sched.c    | 229 ++++-
 drivers/net/ethernet/chelsio/cxgb4/sched.h    |  10 +-
 drivers/net/ethernet/chelsio/cxgb4/sge.c      | 813 +++++++++++++++---
 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h   |   5 +
 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h |  38 +
 15 files changed, 2289 insertions(+), 447 deletions(-)
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.h

-- 
2.23.0


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

end of thread, other threads:[~2019-11-07 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 15:59 [PATCH net-next 0/6] cxgb4: add support for TC-MQPRIO Qdisc Offload Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 1/6] cxgb4: query firmware for QoS offload resources Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 2/6] cxgb4: rework queue config and MSI-X allocation Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 3/6] cxgb4: parse and configure TC-MQPRIO offload Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 4/6] cxgb4: add ETHOFLD hardware queue support Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 5/6] cxgb4: add Tx and Rx path for ETHOFLD traffic Rahul Lakkireddy
2019-11-07 15:59 ` [PATCH net-next 6/6] cxgb4: add FLOWC based QoS offload Rahul Lakkireddy
2019-11-07 18:42 ` [PATCH net-next 0/6] cxgb4: add support for TC-MQPRIO Qdisc Offload David Miller

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).