linux-stable/drivers/net/ethernet/intel/igc
Muhammad Husaini Zulkifli 175c241288 igc: Fix TX Hang issue when QBV Gate is closed
If a user schedules a Gate Control List (GCL) to close one of
the QBV gates while also transmitting a packet to that closed gate,
TX Hang will be happen. HW would not drop any packet when the gate
is closed and keep queuing up in HW TX FIFO until the gate is re-opened.
This patch implements the solution to drop the packet for the closed
gate.

This patch will also reset the adapter to perform SW initialization
for each 1st Gate Control List (GCL) to avoid hang.
This is due to the HW design, where changing to TSN transmit mode
requires SW initialization. Intel Discrete I225/6 transmit mode
cannot be changed when in dynamic mode according to Software User
Manual Section 7.5.2.1. Subsequent Gate Control List (GCL) operations
will proceed without a reset, as they already are in TSN Mode.

Step to reproduce:

DUT:
1) Configure GCL List with certain gate close.

BASE=$(date +%s%N)
tc qdisc replace dev $IFACE parent root handle 100 taprio \
    num_tc 4 \
    map 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 \
    queues 1@0 1@1 1@2 1@3 \
    base-time $BASE \
    sched-entry S 0x8 500000 \
    sched-entry S 0x4 500000 \
    flags 0x2

2) Transmit the packet to closed gate. You may use udp_tai
application to transmit UDP packet to any of the closed gate.

./udp_tai -i <interface> -P 100000 -p 90 -c 1 -t <0/1> -u 30004

Fixes: ec50a9d437 ("igc: Add support for taprio offloading")
Co-developed-by: Tan Tee Min <tee.min.tan@linux.intel.com>
Signed-off-by: Tan Tee Min <tee.min.tan@linux.intel.com>
Tested-by: Chwee Lin Choong <chwee.lin.choong@intel.com>
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2023-07-05 10:39:48 -07:00
..
igc.h igc: Fix TX Hang issue when QBV Gate is closed 2023-07-05 10:39:48 -07:00
igc_base.c igc: remove I226 Qbv BaseTime restriction 2023-01-03 09:35:37 -08:00
igc_base.h igc: read before write to SRRCTL register 2023-05-03 09:19:11 +01:00
igc_defines.h igc: Remove obsolete DMA coalescing code 2023-03-21 11:37:16 -07:00
igc_diag.c
igc_diag.h
igc_dump.c
igc_ethtool.c igc: Add qbv_config_change_errors counter 2023-03-07 13:45:56 -08:00
igc_hw.h igc: offload queue max SDU from tc-taprio 2023-03-07 13:45:56 -08:00
igc_i225.c igc: Remove obsolete DMA coalescing code 2023-03-21 11:37:16 -07:00
igc_i225.h
igc_mac.c intel/igc:fix repeated words in comments 2022-06-30 11:06:23 -07:00
igc_mac.h
igc_main.c igc: Fix TX Hang issue when QBV Gate is closed 2023-07-05 10:39:48 -07:00
igc_nvm.c
igc_nvm.h
igc_phy.c igc: Change type of the 'igc_check_downshift' method 2022-05-10 14:02:53 -07:00
igc_phy.h igc: Change type of the 'igc_check_downshift' method 2022-05-10 14:02:53 -07:00
igc_ptp.c igc: Work around HW bug causing missing timestamps 2023-06-22 08:22:35 -07:00
igc_regs.h igc: Remove obsolete DMA coalescing code 2023-03-21 11:37:16 -07:00
igc_tsn.c igc: Fix TX Hang issue when QBV Gate is closed 2023-07-05 10:39:48 -07:00
igc_tsn.h igc: Remove reset adapter task for i226 during disable tsn config 2023-01-03 09:36:25 -08:00
igc_xdp.c drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
igc_xdp.h
Makefile