I would rather have each and every driver unconditionally go through
the GRO receive routines, than do things like this. Especially since
if we apply a patch like your's, the flood gates open and if IP
fragmentation support is added to GRO we have to undo all of this
stuff.
So what I actually want to see is that we remove the distinction of
GRO, and just have things like "net_receive_skb()". It will have the
same call signature as napi_gro_receive().
Yes we'll still have things like the skge driver which currently need
to have a-priori knowledge of how to complete a NAPI sequence for the
sake of GRO, but we can at least rename the function it calls to
remove the GRO'ness of it.
Even non-NAPI drivers could use this, passing NULL for 'napi' and a GRO
usable NAPI context can be placed somewhere else and used purely for
the sake of GRO. NULL would also mean "in hardware interrupt", and
we can make this check cost absolutely nothing by doing something inline
in net_receive_skb() like:
if (__builtin_constant_p(napi) && napi == NULL)
net_receive_skb_in_irq(skb, dev);
or similar.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html