dpaa2-eth: add support for devlink parser error drop traps
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 1 Oct 2020 15:11:48 +0000 (18:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 23:31:56 +0000 (16:31 -0700)
commit061d631f7de24cae30a1f931f18df643cba58246
treed30d2966e4b54167b2100a9cccf8cb670d6a340b
parentceeb03ad8e22ec6f9100d1bf1e2bc1b7adf6c8ac
dpaa2-eth: add support for devlink parser error drop traps

Add support for the new group of devlink traps - PARSER_ERROR_DROPS.
This consists of registering the array of parser error drops supported,
controlling their action through the .trap_group_action_set() callback
and reporting an erroneous skb received on the error queue
appropriately.
DPAA2 devices do not support controlling the action of independent
parser error traps, thus the .trap_action_set() callback just returns an
EOPNOTSUPP while .trap_group_action_set() actually notifies the hardware
what it should do with a frame marked as having a header error.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h