public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	 Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 3/8] ipv6: use __skb_push() in ip6_xmit()
Date: Fri, 30 Jan 2026 21:02:58 +0000	[thread overview]
Message-ID: <20260130210303.3888261-4-edumazet@google.com> (raw)
In-Reply-To: <20260130210303.3888261-1-edumazet@google.com>

ip6_xmit() makes sure there is enough headroom in the skb,
it can uses __skb_push() instead of the out-of-line skb_push().

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/ip6_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 5c2cfcc3cf6e56192123c5830250865d37e72581..279d4daa85c442eb3db8add1d97c57c1ffbe820f 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -314,7 +314,7 @@ int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
 	}
 
 	if (unlikely(seg_len > IPV6_MAXPLEN)) {
-		hop_jumbo = skb_push(skb, hoplen);
+		hop_jumbo = __skb_push(skb, hoplen);
 
 		hop_jumbo->nexthdr = proto;
 		hop_jumbo->hdrlen = 0;
@@ -327,7 +327,7 @@ int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
 		IP6CB(skb)->flags |= IP6SKB_FAKEJUMBO;
 	}
 
-	skb_push(skb, sizeof(struct ipv6hdr));
+	__skb_push(skb, sizeof(struct ipv6hdr));
 	skb_reset_network_header(skb);
 	hdr = ipv6_hdr(skb);
 
-- 
2.53.0.rc1.225.gd81095ad13-goog


  parent reply	other threads:[~2026-01-30 21:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 21:02 [PATCH net-next 0/8] ipv6: misc changes in output path Eric Dumazet
2026-01-30 21:02 ` [PATCH net-next 1/8] ipv6: pass proto by value to ipv6_push_nfrag_opts() and ipv6_push_frag_opts() Eric Dumazet
2026-01-31  6:29   ` Kuniyuki Iwashima
2026-01-30 21:02 ` [PATCH net-next 2/8] ipv6: add some unlikely()/likely() clauses in ip6_output.c Eric Dumazet
2026-01-31  6:30   ` Kuniyuki Iwashima
2026-01-30 21:02 ` Eric Dumazet [this message]
2026-01-31  6:32   ` [PATCH net-next 3/8] ipv6: use __skb_push() in ip6_xmit() Kuniyuki Iwashima
2026-01-30 21:02 ` [PATCH net-next 4/8] ipv6: use SKB_DROP_REASON_PKT_TOO_BIG " Eric Dumazet
2026-01-31  6:33   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 5/8] inet: add dst4_mtu() and dst6_mtu() helpers Eric Dumazet
2026-01-31  6:34   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 6/8] ipv6: use dst6_mtu() instead of dst_mtu() Eric Dumazet
2026-01-31  6:39   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 7/8] ipv4: use dst4_mtu() " Eric Dumazet
2026-01-31  6:42   ` Kuniyuki Iwashima
2026-01-30 21:03 ` [PATCH net-next 8/8] ipv6: colocate inet6_cork in inet_cork_full Eric Dumazet
2026-01-31  6:46   ` Kuniyuki Iwashima
2026-02-03  2:00 ` [PATCH net-next 0/8] ipv6: misc changes in output path patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260130210303.3888261-4-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox