OSDN Git Service

net: enetc: set up XDP program under enetc_reconfigure()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 17 Jan 2023 23:02:33 +0000 (01:02 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jan 2023 04:52:26 +0000 (20:52 -0800)
commitc33bfaf91c4ca6c859b1184396c0be2c1a94e745
tree14f75d8b37ade00afe3083e2f7ab51e863fa8fe4
parent766338c79b1045866870b795882c4d42c64c9c53
net: enetc: set up XDP program under enetc_reconfigure()

Offloading a BPF program to the RX path of the driver suffers from the
same problems as the PTP reconfiguration - improper error checking can
leave the driver in an invalid state, and the link on the PHY is lost.

Reuse the enetc_reconfigure() procedure, but here, we need to run some
code in the middle of the ring reconfiguration procedure - while the
interface is still down. Introduce a callback which makes that possible.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c