From: Alexandr Nedvedicky Subject: Re: UDP PCB table split IPv4 and IPv6 To: Alexander Bluhm Cc: tech@openbsd.org Date: Wed, 10 Jan 2024 01:30:05 +0100 Hello, On Mon, Jan 08, 2024 at 09:59:21AM +0100, Alexander Bluhm wrote: > Hi, > > Currently we have one UDP table for both IPv4 and IPv6 PCB. > I would like to split it like Raw IP and divert tables. > > Then we have less contention on the table mutex when IPv4 and IPv6 > are used simultaneously. Also individual hash tables get smaller > and looping over all PCBs gets shorter. > > ok? change makes sense, I have no objection. I have one comment/question: > @@ -847,10 +866,10 @@ udp6_ctlinput(int cmd, struct sockaddr * > */ > } > > - in6_pcbnotify(&udbtable, &sa6, uh.uh_dport, > + in6_pcbnotify(&udb6table, &sa6, uh.uh_dport, > &sa6_src, uh.uh_sport, rdomain, cmd, cmdarg, notify); > } else { > - in6_pcbnotify(&udbtable, &sa6, 0, > + in6_pcbnotify(&udb6table, &sa6, 0, > &sa6_any, 0, rdomain, cmd, cmdarg, notify); > } > } hunk above belongs to function udp6_ctlinput(). Are you sure &udb6table address is correct in else branch? If I understand things right the else branch matches condition !ip6, so I would expect &udbtable here. otherwise it looks good. thanks and regards sashan