Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
IPv6 fragment input in parallel
To:
tech@openbsd.org
Date:
Wed, 7 May 2025 16:13:55 +0200

Download raw body.

Thread
  • Alexander Bluhm:

    IPv6 fragment input in parallel

Hi,

frag6_input() looks MP-safe, it is protected by a global mutex.  I
think we should run it in parallel.  Note that this code is only
hit if pf is disabled as pf does fragment reassembly on its own.

ok?

bluhm

Index: netinet6/in6_proto.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6_proto.c,v
diff -u -p -r1.125 in6_proto.c
--- netinet6/in6_proto.c	26 Apr 2025 13:58:08 -0000	1.125
+++ netinet6/in6_proto.c	6 May 2025 19:13:59 -0000
@@ -197,7 +197,7 @@ const struct protosw inet6sw[] = {
   .pr_type	= SOCK_RAW,
   .pr_domain	= &inet6domain,
   .pr_protocol	= IPPROTO_FRAGMENT,
-  .pr_flags	= PR_ATOMIC|PR_ADDR,
+  .pr_flags	= PR_ATOMIC|PR_ADDR|PR_MPINPUT,
   .pr_input	= frag6_input
 },
 #ifdef IPSEC