From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Antonio Ojea <aojea@google.com>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] netfilter: nfqueue: incorrect sctp checksum
Date: Tue, 21 May 2024 14:58:52 +0200 [thread overview]
Message-ID: <ZkyajEEYa0SV8zq-@calendula> (raw)
In-Reply-To: <20240521124850.GC2980@breakpoint.cc>
On Tue, May 21, 2024 at 02:48:50PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > > userspace, my proposal:
> > > >
> > > > if (!skb_is_gso(skb) || ((queue->flags & NFQA_CFG_F_GSO) && !skb_is_gso_sctp(skb)))
> > > > return __nfqnl_enqueue_packet(net, queue, entry);
> > >
> > > This disables F_GSO with sctp packets, is sctp incompatible with nfqueue?
> >
> > This will send a big SCTP payload to userspace (larger than mtu),
> > then, userspace will send the such big SCTP payload to kernelspace via
> > nf_reinject().
>
> I'm not following.
>
> if (!skb_is_gso(skb) || ((queue->flags & NFQA_CFG_F_GSO) && !skb_is_gso_sctp(skb)))
> return __nfqnl_enqueue_packet(net, queue, entry);
>
> Means:
> 1. skb isn't gso -> queue, OR
> 2. Userspace can cope with large packets AND packet is not sctp-gso
Yes, this is implicit case: skb is gso. This is adding an exception
for sctp-gso.
> -> queue
>
> -> sctp gso packets are fully software-segmented in kernel, and
> we queue n packets instead of 1 superpacket.
>
> Apparently GSO SCTP is incompatible resp. skb_zerocopy() lacks
> GSO_BY_FRAGS support.
>
> Too bad.
Then, either extend skb_zerocopy() to deal with GSO_BY_FRAGS or poor
man approach as above: enqueue n packets until that is supported.
By reading this, my understanding is that you prefer to extend
skb_zerocopy(), I pick up from Antonio's work and send a patch.
> > Can kernel deal with SCTP packets larger than MTU?
>
> As far as I can see the gso helpers used in fwd and output
> path handle this transparently, i.e., yes.
next prev parent reply other threads:[~2024-05-21 12:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 22:00 [PATCH v3 0/2] netfilter: nfqueue: incorrect sctp checksum Antonio Ojea
2024-05-13 22:00 ` [PATCH v3 1/2] netfilter: nft_queue: compute SCTP checksum Antonio Ojea
2024-05-13 22:18 ` Florian Westphal
2024-05-13 22:00 ` [PATCH v3 2/2] selftests: net: netfilter: nft_queue.sh: sctp checksum Antonio Ojea
2024-05-13 22:18 ` Florian Westphal
2024-05-20 11:27 ` [PATCH v3 0/2] netfilter: nfqueue: incorrect " Pablo Neira Ayuso
2024-05-20 15:44 ` Pablo Neira Ayuso
2024-05-20 18:33 ` Pablo Neira Ayuso
2024-05-20 18:47 ` Pablo Neira Ayuso
2024-05-20 18:59 ` Antonio Ojea
2024-05-21 10:48 ` Pablo Neira Ayuso
2024-05-21 10:51 ` Florian Westphal
2024-05-21 12:07 ` Pablo Neira Ayuso
2024-05-21 12:48 ` Florian Westphal
2024-05-21 12:58 ` Pablo Neira Ayuso [this message]
2024-06-02 15:30 ` Florian Westphal
2024-06-11 8:46 ` Pablo Neira Ayuso
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=ZkyajEEYa0SV8zq-@calendula \
--to=pablo@netfilter.org \
--cc=aojea@google.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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 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.