Changes between Version 14 and Version 15 of venice/ethernet


Ignore:
Timestamp:
08/30/2024 05:24:10 PM (3 months ago)
Author:
Tim Harvey
Comment:

added section on imx8m FEC ethernet coalesce

Legend:

Unmodified
Added
Removed
Modified
  • venice/ethernet

    v14 v15  
    113113* [https://ww1.microchip.com/downloads/en/Appnotes/AN3761-KSZ-DSA-Driver-Utilization-00003761A.pdf]
    114114
     115
     116== IMX8M FEC Ethernet Interrupt Coalesence
     117The FEC Ethernet network interface controller on the IMX8MM and IMX8MP features interrupt coalesence which is enabled by default and increases packet latency for small numbers of packets.
     118
     119The purpose of the interrupt coalescing is to reduce the number of interrupts generated by the MAC so as to reduce the CPU loading.
     120
     121The default is to delay an RX and TX interrupt by 1ms or until 200 frames have occurred:
     122{{{#!bash
     123# ethtool --show-coalesce eth0
     124Coalesce parameters for eth0:
     125Adaptive RX: off  TX: off
     126stats-block-usecs: 0
     127sample-interval: 0
     128pkt-rate-low: 0
     129pkt-rate-high: 0
     130
     131rx-usecs: 1000
     132rx-frames: 200
     133rx-usecs-irq: 0
     134rx-frames-irq: 0
     135
     136tx-usecs: 1000
     137tx-frames: 200
     138tx-usecs-irq: 0
     139tx-frames-irq: 0
     140
     141rx-usecs-low: 0
     142rx-frames-low: 0
     143tx-usecs-low: 0
     144tx-frames-low: 0
     145
     146rx-usecs-high: 0
     147rx-frames-high: 0
     148tx-usecs-high: 0
     149tx-frames-high: 0
     150}}}
     151
     152This would cause a packet latency of >1ms for light network activity.
     153
     154This can be modified using the userspace 'ethtool':
     155{{{#!bash
     156# default is 1000us 200 frames, change to 1/1
     157ethtool --coalesce eth0 tx-usecs 1
     158ethtool --coalesce eth0 tx-frames 1
     159ethtool --coalesce eth0 rx-usecs 1
     160ethtool --coalesce eth0 rx-frames 1
     161}}}
     162 - ping times now will be < 0.5ms
     163
     164And if you wanted to change it back to defaults for example:
     165{{{#!bash
     166# change back to default
     167ethtool --coalesce eth0 tx-usecs 1000
     168ethtool --coalesce eth0 tx-frames 200
     169ethtool --coalesce eth0 rx-usecs 1000
     170ethtool --coalesce eth0 rx-frames 200
     171}}}
     172 - ping times now will be >1ms
     173