diff options
author | Po Liu <Po.Liu@nxp.com> | 2022-05-10 19:36:15 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-11 16:37:10 -0700 |
commit | 285e8dedb4bd62bb608a27eff8adabff7b2c82e3 (patch) | |
tree | e2a64f69a4e9629697ac3177c063e18a7dd8a93c /drivers/net/ethernet/freescale/enetc/enetc.h | |
parent | net: enetc: manage ENETC_F_QBV in priv->active_offloads only when enabled (diff) | |
download | linux-dev-285e8dedb4bd62bb608a27eff8adabff7b2c82e3.tar.xz linux-dev-285e8dedb4bd62bb608a27eff8adabff7b2c82e3.zip |
net: enetc: count the tc-taprio window drops
The enetc scheduler for IEEE 802.1Qbv has 2 options (depending on
PTGCR[TG_DROP_DISABLE]) when we attempt to send an oversized packet
which will never fit in its allotted time slot for its traffic class:
either block the entire port due to head-of-line blocking, or drop the
packet and set a bit in the writeback format of the transmit buffer
descriptor, allowing other packets to be sent.
We obviously choose the second option in the driver, but we do not
detect the drop condition, so from the perspective of the network stack,
the packet is sent and no error counter is incremented.
This change checks the writeback of the TX BD when tc-taprio is enabled,
and increments a specific ethtool statistics counter and a generic
"tx_dropped" counter in ndo_get_stats64.
Signed-off-by: Po Liu <Po.Liu@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/enetc/enetc.h')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h index 68d806dc3701..29922c20531f 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h @@ -36,6 +36,7 @@ struct enetc_tx_swbd { u8 is_eof:1; u8 is_xdp_tx:1; u8 is_xdp_redirect:1; + u8 qbv_en:1; }; #define ENETC_RX_MAXFRM_SIZE ENETC_MAC_MAXFRM_SIZE @@ -72,6 +73,7 @@ struct enetc_ring_stats { unsigned int xdp_redirect_sg; unsigned int recycles; unsigned int recycle_failures; + unsigned int win_drop; }; struct enetc_xdp_data { |