From: David Ahern <dsahern@gmail.com>
To: Paul Moore <paul@paul-moore.com>, Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Pravin B Shelar <pshelar@ovn.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Ilya Maximets <i.maximets@ovn.org>,
Aaron Conole <aconole@redhat.com>,
Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Mahesh Bandewar <maheshb@google.com>,
Guillaume Nault <gnault@redhat.com>,
linux-security-module@vger.kernel.org, selinux@vger.kernel.org
Subject: Re: [PATCH net-next 06/10] cipso_ipv4: use iph_set_totlen in skbuff_setattr
Date: Tue, 17 Jan 2023 19:47:15 -0700 [thread overview]
Message-ID: <54d89f4a-c7ca-2226-64dd-adc81ebbc314@gmail.com> (raw)
In-Reply-To: <CAHC9VhSRgQuyPgio7d9ZNbs53oCvpq3KQJ9gG5rKX67Wn+P6kw@mail.gmail.com>
On 1/17/23 3:46 PM, Paul Moore wrote:
>>
>> In the BIG TCP case, when is the IPv4 header zero'd out? Currently
>> cipso_v4_skbuff_setattr() is called in the NF_INET_LOCAL_OUT and
>> NF_INET_FORWARD chains, is there an easy way to distinguish between a
>> traditional segmentation offload mechanism, e.g. GSO, and BIG TCP? If
>> BIG TCP allows for arbitrarily large packets we can just grow the
>> skb->len value as needed and leave the total length field in the IPv4
>> header untouched/zero, but we would need to be able to distinguish
>> between a segmentation offload and BIG TCP.
>
> Keeping the above questions as they still apply, rather I could still
> use some help understanding what a BIG TCP packet would look like
> during LOCAL_OUT and FORWARD.
skb->len > 64kb. you don't typically look at the IP / IPv6 header and
its total length field and I thought the first patch in the series added
a handler for doing that.
>
>>>> In the GRO case, is it safe to grow the packet such that skb->len is
>>>> greater than 64k? I presume that the device/driver is going to split
>>>> the packet anyway and populate the IPv4 total length fields in the
>>>> header anyway, right? If we can't grow the packet beyond 64k, is
>>>> there some way to signal to the driver/device at runtime that the
>>>> largest packet we can process is 64k minus 40 bytes (for the IPv4
>>>> options)?
>>>
>>> at runtime, not as far as I know.
>>> It's a field of the network device that can be modified by:
>>> # ip link set dev eth0 gro_max_size $MAX_SIZE gso_max_size $MAX_SIZE
>>
>> I need to look at the OVS case above, but one possibility would be to
>> have the kernel adjust the GSO size down by 40 bytes when
>> CONFIG_NETLABEL is enabled, but that isn't a great option, and not
>> something I consider a first (or second) choice.
>
> Looking more at the GSO related code, this isn't likely to work.
>
icsk_ext_hdr_len is adjusted by cipso for its options. Does that not
cover what is needed?
next prev parent reply other threads:[~2023-01-18 2:47 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 3:31 [PATCH net-next 00/10] net: support ipv4 big tcp Xin Long
2023-01-14 3:31 ` [PATCH net-next 01/10] net: add a couple of helpers for iph tot_len Xin Long
2023-01-14 3:31 ` [PATCH net-next 02/10] bridge: use skb_ip_totlen in br netfilter Xin Long
2023-01-14 3:31 ` [PATCH net-next 03/10] openvswitch: use skb_ip_totlen in conntrack Xin Long
2023-01-14 3:31 ` [PATCH net-next 04/10] net: sched: use skb_ip_totlen and iph_totlen Xin Long
2023-01-14 3:31 ` [PATCH net-next 05/10] netfilter: " Xin Long
2023-01-14 3:31 ` [PATCH net-next 06/10] cipso_ipv4: use iph_set_totlen in skbuff_setattr Xin Long
2023-01-14 15:38 ` Paul Moore
2023-01-14 17:52 ` Xin Long
2023-01-16 16:45 ` Paul Moore
2023-01-16 17:36 ` Xin Long
2023-01-16 18:12 ` Paul Moore
2023-01-16 19:33 ` Xin Long
2023-01-17 4:54 ` David Ahern
2023-01-17 19:51 ` Paul Moore
2023-01-17 22:46 ` Paul Moore
2023-01-18 2:47 ` David Ahern [this message]
2023-01-18 19:18 ` Paul Moore
2023-01-14 3:31 ` [PATCH net-next 07/10] ipvlan: use skb_ip_totlen in ipvlan_get_L3_hdr Xin Long
2023-01-14 3:31 ` [PATCH net-next 08/10] net: add support for ipv4 big tcp Xin Long
2023-01-14 3:31 ` [PATCH net-next 09/10] netfilter: get ipv6 pktlen properly in length_mt6 Xin Long
2023-01-15 15:41 ` David Ahern
2023-01-15 17:42 ` Xin Long
2023-01-15 19:40 ` Eric Dumazet
2023-01-15 20:14 ` Xin Long
2023-01-15 23:57 ` David Ahern
2023-01-16 9:24 ` Eric Dumazet
2023-01-16 15:07 ` David Ahern
2023-01-16 16:02 ` Eric Dumazet
2023-01-16 19:09 ` Xin Long
2023-01-16 20:37 ` Eric Dumazet
2023-01-17 15:47 ` Xin Long
2023-01-19 1:18 ` Xin Long
2023-01-19 3:13 ` Eric Dumazet
2023-01-19 15:41 ` David Ahern
2023-01-19 16:49 ` Xin Long
2023-01-19 18:10 ` Eric Dumazet
2023-01-19 18:57 ` Xin Long
2023-01-19 19:17 ` Eric Dumazet
2023-01-19 19:30 ` Xin Long
2023-01-15 23:58 ` David Ahern
2023-01-14 3:31 ` [PATCH net-next 10/10] selftests: add a selftest for big tcp Xin Long
2023-01-15 15:45 ` [PATCH net-next 00/10] net: support ipv4 " David Ahern
2023-01-15 16:04 ` Eric Dumazet
2023-01-15 17:33 ` Xin Long
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=54d89f4a-c7ca-2226-64dd-adc81ebbc314@gmail.com \
--to=dsahern@gmail.com \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=gnault@redhat.com \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=maheshb@google.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=paul@paul-moore.com \
--cc=pshelar@ovn.org \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
--cc=selinux@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yoshfuji@linux-ipv6.org \
/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;
as well as URLs for NNTP newsgroup(s).