Using ethtool to prevent receive-side Ethernet IP frame coalescing

Some Linux Ethernet drivers have an enhancement that will de-fragment two or more fragments from a fragmented IP packet before handing the data off to userland. This is great unless you are trying to do a “lumpy cable” analyzer as I happen to be doing right now. For this application, it’s a nice idea to leave the frames unchanged as they are passed across the analyzer.

ethtool provides a way to turn off coalescing. Enter:

sudo ethtool -C eth0 rx-usecs 0

to turn off receive coalescing for eth0 for example. If it’s a dedicated system, this line (without the sudo) can be added to /etc/rc.local so that it is executed on every restart.

%d bloggers like this: