Skip to contentSkip to conversation

xen-netback: use local var in xenvif_tx_check_gop() instead of re-calculating

PATCH Applied Jan Beulich 2 participants 2 messages Feb 25, 2021 – Mar 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-netback: use local var in xenvif_tx_check_gop() instead of re-calculating

shinfo already holds the result of skb_shinfo(skb) at this point - no need to re-invoke the construct even twice.

drivers/net/xen-netback/netback.c +2 -2
@@ -557,8 +557,8 @@ check_frags:
 	}
 
 	if (skb_has_frag_list(skb) && !first_shinfo) {
-		first_shinfo = skb_shinfo(skb);
-		shinfo = skb_shinfo(skb_shinfo(skb)->frag_list);
+		first_shinfo = shinfo;
+		shinfo = skb_shinfo(shinfo->frag_list);
 		nr_frags = shinfo->nr_frags;
 
 		goto check_frags;
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 4 lines · On Thu, 25 Feb 2021 16:39:01 +0100 you wrote:

shinfo already holds the result of skb_shinfo(skb) at this point - no need to re-invoke the construct even twice.

Here is the summary with links:
- xen-netback: use local var in xenvif_tx_check_gop() instead of re-calculating

    https://git.kernel.org/netdev/net/c/826d82170b53

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html