All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, 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:48:50 +0200	[thread overview]
Message-ID: <20240521124850.GC2980@breakpoint.cc> (raw)
In-Reply-To: <ZkyOjy0YBg35tUrk@calendula>

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
-> 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.

> 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.

  reply	other threads:[~2024-05-21 12:48 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 [this message]
2024-05-21 12:58                   ` Pablo Neira Ayuso
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=20240521124850.GC2980@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=aojea@google.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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.