All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Maxim Mikityanskiy <maxtram95@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	David Ahern <dsahern@kernel.org>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	netdev@vger.kernel.org, tcpdump-workers@lists.tcpdump.org,
	Guy Harris <gharris@sonic.net>,
	Michael Richardson <mcr@sandelman.ca>,
	Denis Ovsienko <denis@ovsienko.info>,
	Xin Long <lucien.xin@gmail.com>,
	Maxim Mikityanskiy <maxim@isovalent.com>
Subject: Re: [PATCH net-next 01/17] net/ipv6: Introduce payload_len helpers
Date: Thu, 25 Sep 2025 11:23:07 -0700	[thread overview]
Message-ID: <aNWIi0Ni-kwUmYul@mini-arch> (raw)
In-Reply-To: <20250923134742.1399800-2-maxtram95@gmail.com>

On 09/23, Maxim Mikityanskiy wrote:
> From: Maxim Mikityanskiy <maxim@isovalent.com>
> 
> From: Maxim Mikityanskiy <maxim@isovalent.com>
> 
> The next commits will transition away from using the hop-by-hop
> extension header to encode packet length for BIG TCP. Add wrappers
> around ip6->payload_len that return the actual value if it's non-zero,
> and calculate it from skb->len if payload_len is set to zero (and a
> symmetrical setter).
> 
> The new helpers are used wherever the surrounding code supports the
> hop-by-hop jumbo header for BIG TCP IPv6, or the corresponding IPv4 code
> uses skb_ip_totlen (e.g., in include/net/netfilter/nf_tables_ipv6.h).
> 
> No behavioral change in this commit.
> 
> Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
> ---
>  include/linux/ipv6.h                       | 20 ++++++++++++++++++++
>  include/net/ipv6.h                         |  2 --
>  include/net/netfilter/nf_tables_ipv6.h     |  4 ++--
>  net/bridge/br_netfilter_ipv6.c             |  2 +-
>  net/bridge/netfilter/nf_conntrack_bridge.c |  4 ++--
>  net/ipv6/ip6_input.c                       |  2 +-
>  net/ipv6/ip6_offload.c                     |  7 +++----
>  net/ipv6/output_core.c                     |  7 +------
>  net/netfilter/ipvs/ip_vs_xmit.c            |  2 +-
>  net/netfilter/nf_conntrack_ovs.c           |  2 +-
>  net/netfilter/nf_log_syslog.c              |  2 +-
>  net/sched/sch_cake.c                       |  2 +-
>  12 files changed, 34 insertions(+), 22 deletions(-)
> 
> diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
> index 43b7bb828738..44c4b791eceb 100644
> --- a/include/linux/ipv6.h
> +++ b/include/linux/ipv6.h
> @@ -126,6 +126,26 @@ static inline unsigned int ipv6_transport_len(const struct sk_buff *skb)
>  	       skb_network_header_len(skb);
>  }
>  
> +static inline unsigned int ipv6_payload_len(const struct sk_buff *skb, const struct ipv6hdr *ip6)
> +{
> +	u32 len = ntohs(ip6->payload_len);
> +
> +	return (len || !skb_is_gso(skb) || !skb_is_gso_tcp(skb)) ?
> +	       len : skb->len - skb_network_offset(skb) - sizeof(struct ipv6hdr);

Any reason not to return skb->len - skb_network_offset(skb) - sizeof(struct ipv6hdr)
here unconditionally? Will it not work in some cases?

  parent reply	other threads:[~2025-09-25 18:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 13:47 [PATCH net-next 00/17] BIG TCP for UDP tunnels Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 01/17] net/ipv6: Introduce payload_len helpers Maxim Mikityanskiy
2025-09-25 13:51   ` Paolo Abeni
2025-09-25 14:01     ` Maxim Mikityanskiy
2025-09-25 18:23   ` Stanislav Fomichev [this message]
2026-01-13 21:28     ` Alice Mikityanska
2025-09-23 13:47 ` [PATCH net-next 02/17] net/ipv6: Drop HBH for BIG TCP on TX side Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 03/17] net/ipv6: Drop HBH for BIG TCP on RX side Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 04/17] net/ipv6: Remove jumbo_remove step from TX path Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 05/17] net/mlx5e: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 06/17] net/mlx4: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 07/17] ice: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 08/17] bnxt_en: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 09/17] gve: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 10/17] net: mana: " Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 11/17] net/ipv6: Remove HBH helpers Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 12/17] net: Enable BIG TCP with partial GSO Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 13/17] udp: Support gro_ipv4_max_size > 65536 Maxim Mikityanskiy
2025-09-25 14:15   ` Paolo Abeni
2025-09-25 14:22     ` Paolo Abeni
2025-09-23 13:47 ` [PATCH net-next 14/17] udp: Validate UDP length in udp_gro_receive Maxim Mikityanskiy
2025-09-25 14:10   ` Paolo Abeni
2025-09-23 13:47 ` [PATCH net-next 15/17] udp: Set length in UDP header to 0 for big GSO packets Maxim Mikityanskiy
2025-09-25 14:18   ` Paolo Abeni
2025-09-23 13:47 ` [PATCH net-next 16/17] vxlan: Enable BIG TCP packets Maxim Mikityanskiy
2025-09-23 13:47 ` [PATCH net-next 17/17] geneve: " Maxim Mikityanskiy
2025-09-25 14:24   ` Paolo Abeni
2025-09-25 14:26 ` [PATCH net-next 00/17] BIG TCP for UDP tunnels Paolo Abeni

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=aNWIi0Ni-kwUmYul@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=denis@ovsienko.info \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gharris@sonic.net \
    --cc=kuba@kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=maxim@isovalent.com \
    --cc=maxtram95@gmail.com \
    --cc=mcr@sandelman.ca \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=tcpdump-workers@lists.tcpdump.org \
    --cc=willemdebruijn.kernel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.