Bug 25 - Ixgbe driver sets TDH register after TXDCTL.ENABLE is set
Summary: Ixgbe driver sets TDH register after TXDCTL.ENABLE is set
Status: RESOLVED FIXED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: unspecified
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Konstantin Ananyev
URL:
Depends on:
Blocks:
 
Reported: 2018-04-01 14:59 CEST by Solal Pirelli
Modified: 2020-12-25 04:33 CET (History)
3 users (show)



Attachments

Description Solal Pirelli 2018-04-01 14:59:49 CEST
The Intel 82599 data sheet (https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/82599-10-gbe-controller-datasheet.pdf, ยง8.2.3.9.8) states that "The only time that software should write to [the TDH] register is after a reset (hardware reset or CTRL.RST) and before enabling the transmit function (TXDCTL.ENABLE). If software were to write to this register while the transmit function was enabled, the on-chip descriptor buffers might be invalidated and the hardware could become confused".

The ixgbe driver's ixgbe_dev_tx_queue_start function (http://dpdk.org/browse/dpdk/tree/drivers/net/ixgbe/ixgbe_rxtx.c?h=v18.02#n5148) first enables TXDCTL.ENABLE, then performs some admirable efforts to make sure it is truly enabled, and then changes TDH, ensuring that hardware confusion can happen.
Comment 1 Ajit Khaparde 2018-08-30 10:51:35 CEST
Konstantin,
Can you please check.

Thanks
Ajit
Comment 2 yanglong wu 2018-11-16 08:34:10 CET
patch is sent out https://patches.dpdk.org/patch/48156/ waiting for regression test.
Comment 3 Steve Yang 2020-12-25 04:33:29 CET
Patch (https://patches.dpdk.org/patch/48196/) has been merged to dpdk-stable main branch.

commit info:
ff30a020b net/ixgbe: fix TDH register write.

Note You need to log in before you can comment on or make changes to this bug.