Garrett D'Amore wrote:
So what I'm thinking about is a custom version of ip_input, call it
ip_input_fast, which is pretty much just like ip_input, but assumes that
the underneath layer has already stripped off any M_PROTO (or, more
correctly, just never prepended one) and has already done any necessary
pullup to get an aligned, concatenated IP header.
Then the regular ip_input could call ip_input_fast after making these
checks. Penalty gets applied to legacy drivers, and maybe to any paths
in IP that can't use the shorter version, but I'd think that for most
modern drivers we'd see a benefit.
There's already this kind of relationship between ip_rput() and
ip_input(), with ip_input() meant to be the "fast" input routine which
makes assumptions about being called from either GLDv3 or ip_rput()
itself. One could loosen ip_input()'s restrictions regarding alignment,
etc., by modifying ip_rput() and the input paths in dls without adding
any new input paths in the ip module.
-Seb
_______________________________________________
networking-discuss mailing list
[email protected]