linux/drivers/net/ethernet/freescale/enetc
Vladimir Oltean 1ee8d6f3be net: enetc: clean the TX software BD on the TX confirmation path
With the future introduction of some new fields into enetc_tx_swbd such
as is_xdp_tx, is_xdp_redirect etc, we need not only to set these bits
to true from the XDP_TX/XDP_REDIRECT code path, but also to false from
the old code paths.

This is because TX software buffer descriptors are kept in a ring that
is shadow of the hardware TX ring, so these structures keep getting
reused, and there is always the possibility that when a software BD is
reused (after we ran a full circle through the TX ring), the old user of
the tx_swbd had set is_xdp_tx = true, and now we are sending a regular
skb, which would need to set is_xdp_tx = false.

To be minimally invasive to the old code paths, let's just scrub the
software TX BD in the TX confirmation path (enetc_clean_tx_ring), once
we know that nobody uses this software TX BD (tx_ring->next_to_clean
hasn't yet been updated, and the TX paths check enetc_bd_unused which
tells them if there's any more space in the TX ring for a new enqueue).

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-31 14:57:44 -07:00
..
enetc_cbdr.c net: enetc: pass bd_count as an argument to enetc_setup_cbdr 2021-03-10 13:14:15 -08:00
enetc_ethtool.c enetc: Fix reporting of h/w packet counters 2020-12-07 16:57:38 -08:00
enetc_hw.h net: enetc: set MAC RX FIFO to recommended value 2021-03-08 12:03:42 -08:00
enetc_mdio.c enetc: reorder macros and functions 2021-01-05 15:19:19 -08:00
enetc_msg.c enetc: Add vf to pf messaging support 2019-01-24 21:55:53 -08:00
enetc_pci_mdio.c net: enetc: fix an issue about leak system resources 2020-05-04 10:51:20 -07:00
enetc_pf.c net: enetc: don't depend on system endianness in enetc_set_mac_ht_flt 2021-03-24 16:28:59 -07:00
enetc_pf.h enetc: Migrate to PHYLINK and PCS_LYNX 2020-10-11 11:04:42 -07:00
enetc_ptp.c enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions 2019-08-31 23:53:17 -07:00
enetc_qos.c flow_offload: reject configuration of packet-per-second policing in offload drivers 2021-03-13 14:18:09 -08:00
enetc_vf.c net: enetc: teardown CBDR during PF/VF unbind 2021-03-19 12:13:11 -07:00
enetc.c net: enetc: clean the TX software BD on the TX confirmation path 2021-03-31 14:57:44 -07:00
enetc.h net: enetc: add a dedicated is_eof bit in the TX software BD 2021-03-31 14:57:44 -07:00
Kconfig enetc: auto select PHYLIB and MDIO_DEVRES 2021-02-11 18:12:47 -08:00
Makefile enetc: Make MDIO accessors more generic and export to include/linux/fsl 2020-01-05 23:22:32 -08:00