Re: [PATCH net-next 02/11] udp/ipv6: refactor udpv6_sendmsg udplite checks

From: Pavel Begunkov
Date: Thu Apr 28 2022 - 11:12:15 EST


On 4/28/22 15:09, Paolo Abeni wrote:
On Thu, 2022-04-28 at 11:56 +0100, Pavel Begunkov wrote:
Don't save a IS_UDPLITE() result in advance but do when it's really
needed, so it doesn't store/load it from the stack. Same for resolving
the getfrag callback pointer.

It's quite unclear to me if this change brings really any performance
benefit. The end results will depend a lot on the optimization
performed by the compiler, and IMHO the code looks better before this
modifications.

There is a lot of code and function calls between IS_UDPLITE() and
use sites, because of alias analysis the compiler will be forced
to call it early in the function and store something on stack.
I don't believe it will be able to keep in a register. But it's
not a problem to drop it

--
Pavel Begunkov