mbox series

[net-next,v4,0/7] dpaa2-eth: add PFC support

Message ID 20200530210814.348-1-ioana.ciornei@nxp.com
Headers show
Series dpaa2-eth: add PFC support | expand

Message

Ioana Ciornei May 30, 2020, 9:08 p.m. UTC
This patch set adds support for Priority Flow Control in DPAA2 Ethernet
devices.

The first patch make the necessary changes so that multiple
traffic classes are configured. The dequeue priority
of the maximum 8 traffic classes is configured to be equal.
The second patch adds a static distribution to said traffic
classes based on the VLAN PCP field. In the future, this could be
extended through the .setapp() DCB callback for dynamic configuration.

Also, add support for the congestion group taildrop mechanism that
allows us to control the number of frames that can accumulate on a group
of Rx frame queues belonging to the same traffic class.

The basic subset of the DCB ops is implemented so that the user can
query the number of PFC capable traffic classes, their state and
reconfigure them if necessary.

Changes in v3:
 - add patches 6-7 which add the PFC functionality
 - patch 2/7: revert to explicitly cast mask to u16 * to not get into
   sparse warnings
Changes in v4:
 - really fix the sparse warnings in 2/7

Ioana Ciornei (2):
  dpaa2-eth: Add PFC support through DCB ops
  dpaa2-eth: Keep congestion group taildrop enabled when PFC on

Ioana Radulescu (5):
  dpaa2-eth: Add support for Rx traffic classes
  dpaa2-eth: Distribute ingress frames based on VLAN prio
  dpaa2-eth: Add helper functions
  dpaa2-eth: Add congestion group taildrop
  dpaa2-eth: Update FQ taildrop threshold and buffer pool count

 drivers/net/ethernet/freescale/dpaa2/Kconfig  |  10 +
 drivers/net/ethernet/freescale/dpaa2/Makefile |   1 +
 .../ethernet/freescale/dpaa2/dpaa2-eth-dcb.c  | 150 +++++++++++
 .../freescale/dpaa2/dpaa2-eth-debugfs.c       |   7 +-
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 250 +++++++++++++++---
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.h  |  69 ++++-
 .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  |  24 +-
 .../net/ethernet/freescale/dpaa2/dpni-cmd.h   |  59 +++++
 drivers/net/ethernet/freescale/dpaa2/dpni.c   | 177 +++++++++++++
 drivers/net/ethernet/freescale/dpaa2/dpni.h   |  97 +++++++
 10 files changed, 787 insertions(+), 57 deletions(-)
 create mode 100644 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-dcb.c

Comments

David Miller June 1, 2020, 7:04 p.m. UTC | #1
From: Ioana Ciornei <ioana.ciornei@nxp.com>
Date: Sun, 31 May 2020 00:08:07 +0300

> This patch set adds support for Priority Flow Control in DPAA2 Ethernet
> devices.
> 
> The first patch make the necessary changes so that multiple
> traffic classes are configured. The dequeue priority
> of the maximum 8 traffic classes is configured to be equal.
> The second patch adds a static distribution to said traffic
> classes based on the VLAN PCP field. In the future, this could be
> extended through the .setapp() DCB callback for dynamic configuration.
> 
> Also, add support for the congestion group taildrop mechanism that
> allows us to control the number of frames that can accumulate on a group
> of Rx frame queues belonging to the same traffic class.
> 
> The basic subset of the DCB ops is implemented so that the user can
> query the number of PFC capable traffic classes, their state and
> reconfigure them if necessary.

Series applied, thank you.