I was looking at the sources of ethtool
, particularly at function do_spause()
where autonegotiation, rx/tx pause can be enabled/disabled. I noticed that at first it issues ioctl()
for ETHTOOL_GPAUSEPARAM
command, i.e. it fetches the current settings, and they're the same, it doesn't change anything, otherwise it will issue ioctl()
with ETHTOOL_SPAUSEPARAM
command and set new parameters.
What is the reason for this? Is this optimization, or way to avoid link disruption?