(Resending in plain text mode)
Surely there is a way to adapt tcp_tso_should_defer(), it is trying to
solve a similar problem.
If I were to implement PLPMTUD today, I would more deeply entwine it
into TCP's support for TSO. e.g. successful deferring segments
sometimes enables TSO and sometimes enables PLPMTUD.
But there is a deeper question: John Heffner and I invested a huge
amount of energy in trying to make PLPMTUD work for opportunistic
Jumbo discovery, only to discover that we had moved the problem down
to the device driver/nic, were it isn't so readily solvable.
The driver needs to carve nic buffer memory before it can communicate
with a switch (to either ask or measure the MTU), and once it has done
that it needs to either re-carve the memory or run with suboptimal
carving. Both of these are problematic.
There is also a problem that many link technologies will
non-deterministically deliver jumbo frames at greatly increased error
rates. This issue requires a long conversation on it's own.