]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: Add PFC support through DCB ops
authorIoana Ciornei <ioana.ciornei@nxp.com>
Sat, 30 May 2020 21:08:13 +0000 (00:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2020 19:04:32 +0000 (12:04 -0700)
commit4906e35e8c265d44cb4c7a41ea925f7c5ceba468
treef41edf6ae72fc8ca4d39aa7ff4c49b4eaf350a9b
parentad82b106f6787346c2a76875f8367b7bcc4669d5
dpaa2-eth: Add PFC support through DCB ops

Add support in dpaa2-eth for PFC (Priority Flow Control)
through the DCB ops.

Instruct the hardware to respond to received PFC frames.
Current firmware doesn't allow us to selectively enable PFC
on the Rx side for some priorities only, so we will react to
all incoming PFC frames (and stop transmitting on the traffic
classes specified in the frame).

Also, configure the hardware to generate PFC frames based on Rx
congestion notifications. When a certain number of frames accumulate in
the ingress queues corresponding to a traffic class, priority flow
control frames are generated for that TC.

The number of PFC traffic classes available can be queried through
lldptool. Also, which of those traffic classes have PFC enabled is also
controlled through the same dcbnl_rtnl_ops callbacks.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/Kconfig
drivers/net/ethernet/freescale/dpaa2/Makefile
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-dcb.c [new file with mode: 0644]
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
drivers/net/ethernet/freescale/dpaa2/dpni.c
drivers/net/ethernet/freescale/dpaa2/dpni.h