Re: [PATCH net 2/4] net: mvpp2: Remove unneeded Kconfig dependency.

From
Jakub Kicinski <kuba@kernel.org>
Date
2021-01-23 20:13:28
Also in
linux-arm-kernel, lkml
Reply to
Richard Cochran, 2021-01-23
On Sat, 23 Jan 2021 05:26:26 -0800 Richard Cochran wrote:
On Fri, Jan 22, 2021 at 06:14:44PM -0800, Jakub Kicinski wrote:
quoted
(I would put it in net-next tho, given the above this at most a space
optimization.)  
It isn't just about space but also time.  The reason why I targeted
net and not net-next was that NETWORK_PHY_TIMESTAMPING activates a
function call to skb_clone_tx_timestamp() for every transmitted frame.

	static inline void skb_tx_timestamp(struct sk_buff *skb)
	{
		skb_clone_tx_timestamp(skb);
		if (skb_shinfo(skb)->tx_flags & SKBTX_SW_TSTAMP)
			skb_tstamp_tx(skb, NULL);
	}

In the abscence of a PHY time stamping device, the check for its
presence inside of skb_clone_tx_timestamp() will of course fail, but
this still incurs the cost of the call on every transmitted skb.

Similarly netif_receive_skb() futilely calls skb_defer_rx_timestamp()
on every received skb.

I would argue that most users don't want this option activated by
accident.
I see. The only thing I'm worried about then is the churn in patch 3.
This would land in Linus's tree shortly before rc6, kinda late to be
taking chances in the name of minor optimizations :S
 
(And yes, we could avoid the functions call by moving the check
outside of the global functions and inline to the call sites.  I'll be
sure to have that in the shiny new improved scheme under discussion.)
Thread (15 messages) 15 messages, 4 authors, last reply 2021-01-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help