diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2012-11-25 18:10:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-26 17:22:12 -0500 |
commit | f9e01b5565398e549a5d391ea2e62f7b6e806e3f (patch) | |
tree | b82be385f43b359aaa4467a88182add83880d04d /Documentation/networking/stmmac.txt | |
parent | 48f44da4542d8f91d8b0603e20929b184dc2aa4e (diff) |
stmmac: update the doc with new IRQ mitigation
This patch updates the stmmac.txt adding some information
about the new rx/tx mitigation schema adopted in the driver.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/stmmac.txt')
-rw-r--r-- | Documentation/networking/stmmac.txt | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index ef9ee71b4d7f..f9fa6db40a52 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -29,11 +29,9 @@ The kernel configuration option is STMMAC_ETH: | |||
29 | dma_txsize: DMA tx ring size; | 29 | dma_txsize: DMA tx ring size; |
30 | buf_sz: DMA buffer size; | 30 | buf_sz: DMA buffer size; |
31 | tc: control the HW FIFO threshold; | 31 | tc: control the HW FIFO threshold; |
32 | tx_coe: Enable/Disable Tx Checksum Offload engine; | ||
33 | watchdog: transmit timeout (in milliseconds); | 32 | watchdog: transmit timeout (in milliseconds); |
34 | flow_ctrl: Flow control ability [on/off]; | 33 | flow_ctrl: Flow control ability [on/off]; |
35 | pause: Flow Control Pause Time; | 34 | pause: Flow Control Pause Time; |
36 | tmrate: timer period (only if timer optimisation is configured). | ||
37 | 35 | ||
38 | 3) Command line options | 36 | 3) Command line options |
39 | Driver parameters can be also passed in command line by using: | 37 | Driver parameters can be also passed in command line by using: |
@@ -60,17 +58,19 @@ Then the poll method will be scheduled at some future point. | |||
60 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket | 58 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket |
61 | buffers in order to avoid the memcpy (Zero-copy). | 59 | buffers in order to avoid the memcpy (Zero-copy). |
62 | 60 | ||
63 | 4.3) Timer-Driver Interrupt | 61 | 4.3) Interrupt Mitigation |
64 | Instead of having the device that asynchronously notifies the frame receptions, | 62 | The driver is able to mitigate the number of its DMA interrupts |
65 | the driver configures a timer to generate an interrupt at regular intervals. | 63 | using NAPI for the reception on chips older than the 3.50. |
66 | Based on the granularity of the timer, the frames that are received by the | 64 | New chips have an HW RX-Watchdog used for this mitigation. |
67 | device will experience different levels of latency. Some NICs have dedicated | 65 | |
68 | timer device to perform this task. STMMAC can use either the RTC device or the | 66 | On Tx-side, the mitigation schema is based on a SW timer that calls the |
69 | TMU channel 2 on STLinux platforms. | 67 | tx function (stmmac_tx) to reclaim the resource after transmitting the |
70 | The timers frequency can be passed to the driver as parameter; when change it, | 68 | frames. |
71 | take care of both hardware capability and network stability/performance impact. | 69 | Also there is another parameter (like a threshold) used to program |
72 | Several performance tests on STM platforms showed this optimisation allows to | 70 | the descriptors avoiding to set the interrupt on completion bit in |
73 | spare the CPU while having the maximum throughput. | 71 | when the frame is sent (xmit). |
72 | |||
73 | Mitigation parameters can be tuned by ethtool. | ||
74 | 74 | ||
75 | 4.4) WOL | 75 | 4.4) WOL |
76 | Wake up on Lan feature through Magic and Unicast frames are supported for the | 76 | Wake up on Lan feature through Magic and Unicast frames are supported for the |
@@ -121,6 +121,7 @@ struct plat_stmmacenet_data { | |||
121 | int bugged_jumbo; | 121 | int bugged_jumbo; |
122 | int pmt; | 122 | int pmt; |
123 | int force_sf_dma_mode; | 123 | int force_sf_dma_mode; |
124 | int riwt_off; | ||
124 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 125 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
125 | void (*bus_setup)(void __iomem *ioaddr); | 126 | void (*bus_setup)(void __iomem *ioaddr); |
126 | int (*init)(struct platform_device *pdev); | 127 | int (*init)(struct platform_device *pdev); |
@@ -156,6 +157,7 @@ Where: | |||
156 | o pmt: core has the embedded power module (optional). | 157 | o pmt: core has the embedded power module (optional). |
157 | o force_sf_dma_mode: force DMA to use the Store and Forward mode | 158 | o force_sf_dma_mode: force DMA to use the Store and Forward mode |
158 | instead of the Threshold. | 159 | instead of the Threshold. |
160 | o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode. | ||
159 | o fix_mac_speed: this callback is used for modifying some syscfg registers | 161 | o fix_mac_speed: this callback is used for modifying some syscfg registers |
160 | (on ST SoCs) according to the link speed negotiated by the | 162 | (on ST SoCs) according to the link speed negotiated by the |
161 | physical layer . | 163 | physical layer . |