linux/drivers/net/ethernet/freescale/enetc
Vladimir Oltean 290b5fe096 net: enetc: preserve TX ring priority across reconfiguration
In the blamed commit, a rudimentary reallocation procedure for RX buffer
descriptors was implemented, for the situation when their format changes
between normal (no PTP) and extended (PTP).

enetc_hwtstamp_set() calls enetc_close() and enetc_open() in a sequence,
and this sequence loses information which was previously configured in
the TX BDR Mode Register, specifically via the enetc_set_bdr_prio() call.
The TX ring priority is configured by tc-mqprio and tc-taprio, and
affects important things for TSN such as the TX time of packets. The
issue manifests itself most visibly by the fact that isochron --txtime
reports premature packet transmissions when PTP is first enabled on an
enetc interface.

Save the TX ring priority in a new field in struct enetc_bdr (occupies a
2 byte hole on arm64) in order to make this survive a ring reconfiguration.

Fixes: 434cebabd3 ("enetc: Add dynamic allocation of extended Rx BD rings")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Link: https://lore.kernel.org/r/20221122130936.1704151-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-11-23 20:17:54 -08:00
..
Kconfig
Makefile net: enetc: deny offload of tc-based TSN features on VF interfaces 2022-09-20 11:27:10 -07:00
enetc.c net: enetc: preserve TX ring priority across reconfiguration 2022-11-23 20:17:54 -08:00
enetc.h net: enetc: preserve TX ring priority across reconfiguration 2022-11-23 20:17:54 -08:00
enetc_cbdr.c net:enetc: command BD ring data memory alloc as one function alone 2022-02-09 13:23:25 +00:00
enetc_ethtool.c net: enetc: expose some standardized ethtool counters 2022-09-19 17:58:25 -07:00
enetc_hw.h net: enetc: use common naming scheme for PTGCR and PTGCAPR registers 2022-09-29 18:52:06 -07:00
enetc_ierb.c
enetc_ierb.h
enetc_mdio.c enetc: use correct format characters 2022-03-17 16:30:48 -07:00
enetc_msg.c
enetc_pci_mdio.c net: enetc: Use pci_release_region() to release some resources 2022-05-28 20:20:42 +01:00
enetc_pf.c net: enetc: offload per-tc max SDU from tc-taprio 2022-09-29 18:52:06 -07:00
enetc_pf.h
enetc_ptp.c
enetc_qos.c net: enetc: preserve TX ring priority across reconfiguration 2022-11-23 20:17:54 -08:00
enetc_vf.c net: enetc: deny offload of tc-based TSN features on VF interfaces 2022-09-20 11:27:10 -07:00