Re: pppac(4): don't grab netlock within pppacioctl()

2022-07-22 Thread YASUOKA Masahiko
ok yasuoka On Mon, 18 Jul 2022 13:50:37 +0300 Vitaliy Makkoveev wrote: > pipex(4) doesn't rely on netlock anymore. > > Index: sys/net/if_pppx.c > === > RCS file: /cvs/src/sys/net/if_pppx.c,v > retrieving revision 1.119 > diff -u -p

Re: pipex(4): kill "Static" keyword

2022-07-22 Thread YASUOKA Masahiko
ok yasuoka On Mon, 18 Jul 2022 12:31:47 +0300 Vitaliy Makkoveev wrote: > We don't use "static" keyword for functions declaration to allow ddb(4) > debug. Also, many "Static" functions are called by pppx(4) layer outside > pipex(4) layer. > > This is the mostly mechanic diff, except the `pipex_pp

Re: checksum offloading for em

2022-07-22 Thread David Riley
Oh, thanks so much for doing that... I had gotten about halfway through writing this same patch and had to abandon the effort a few months ago because life got crazy. BTW, there is a section in there that disables the CRC stripping for i350/i210 claiming there's a bug causing it to strip whethe

ipv4 reassemble in parallel

2022-07-22 Thread Alexander Bluhm
Hi, The IPv6 reassembly code looks MP safe. So we can run it in parallel. Note that ip_ours() runs with shared netlock, while ip_local() has exclusive netlock after queuing. ok? bluhm Index: netinet/ip_input.c === RCS file: /data/

Re: checksum offloading for em

2022-07-22 Thread Moritz Buhl
On Mon, Jun 27, 2022 at 08:07:32AM +1000, Jonathan Gray wrote: > On Sun, Jun 26, 2022 at 04:43:59PM +0200, Moritz Buhl wrote: > > On Sun, Jun 26, 2022 at 12:23:58PM +0200, Moritz Buhl wrote: > > > Hi, > > > > > > I noticed that for some offloading-capable em controllers checksum > > > offloading i

ipv6 local deliver net lock

2022-07-22 Thread Alexander Bluhm
Hi, During regress testing I found this bug. splassert: rip6_input: want 1 have 2 Starting stack trace... rip6_input(1,2,d0c6b7ad,f57ff9fc) at rip6_input+0x166 rip6_input(f57ffbfc,f57ffbe8,3a,18) at rip6_input+0x166 icmp6_input(f57ffbfc,f57ffbe8,3a,18) at icmp6_input+0x66d ip_deliver(f57ffbfc,f57

[v2] timeout.9: rewrite

2022-07-22 Thread Scott Cheloha
Hi, As promised, here is the timeout.9 manpage rewrite I've been sitting on. I am pretty sure jmc@ (and maybe schwarze@) read an earlier version of this. It has drifted a bit since then, but not much. My main goal here is to make all the "gotchas" in the timeout API more explicit. The API is l

Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Florian Obser
On 2022-07-22 14:27 +02, Claudio Jeker wrote: > On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote: >> Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL >> is used in many places. >> >> OK? > > Is that a value that should be adjustable? I don't think so, this is th

Re: pf: DIOCXCOMMIT and copyin

2022-07-22 Thread Alexander Bluhm
On Thu, Jul 21, 2022 at 11:13:28AM +0200, Moritz Buhl wrote: > Hi tech, > > for the other two DIOCX ioctls syzkaller showed that it is possible > to grab netlock while doing copyin. > > The same problem should exist for DIOCXCOMMIT but syzkaller didn't > find it yet. > > In case anybody can repr

Re: interface media current data

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 22, 2022 at 05:44:52PM +0200, Mark Kettenis wrote: > > Date: Fri, 22 Jul 2022 17:01:20 +0200 > > From: Alexander Bluhm > > > > On Fri, Jul 15, 2022 at 04:51:25PM +0200, Alexander Bluhm wrote: > > > On Fri, Jul 15, 2022 at 02:05:40AM +0200, Alexander Bluhm wrote: > > > > If anyone has

nd6: statically initialise global timeouts and tasks

2022-07-22 Thread Klemens Nanni
No need to to this at runtime if the compiler can do it for us. Also makes it easier to know what's going on at a glance, imho. Feedback? OK? diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index c8720fb275c..035e65874ea 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -84,7 +84,

Re: interface media current data

2022-07-22 Thread Mark Kettenis
> Date: Fri, 22 Jul 2022 17:01:20 +0200 > From: Alexander Bluhm > > On Fri, Jul 15, 2022 at 04:51:25PM +0200, Alexander Bluhm wrote: > > On Fri, Jul 15, 2022 at 02:05:40AM +0200, Alexander Bluhm wrote: > > > If anyone has some of these old network drivers, please test setting > > > media type wit

Re: pppac(4): don't grab netlock within pppacioctl()

2022-07-22 Thread Alexander Bluhm
On Mon, Jul 18, 2022 at 01:50:37PM +0300, Vitaliy Makkoveev wrote: > pipex(4) doesn't rely on netlock anymore. OK bluhm@ > Index: sys/net/if_pppx.c > === > RCS file: /cvs/src/sys/net/if_pppx.c,v > retrieving revision 1.119 > diff -u

snmpd(8): don't traverse back in tree

2022-07-22 Thread Martijn van Duren
When we have 2 overlapping regions within the same backend the current code takes the OID of the parent region after the child region returned an EOMV. This is of course wrong and creates an infinite loop. OK? martijn@ Index: application.c

Re: pipex(4): kill "Static" keyword

2022-07-22 Thread Alexander Bluhm
On Mon, Jul 18, 2022 at 12:31:47PM +0300, Vitaliy Makkoveev wrote: > We don't use "static" keyword for functions declaration to allow ddb(4) > debug. Also, many "Static" functions are called by pppx(4) layer outside > pipex(4) layer. > > This is the mostly mechanic diff, except the `pipex_pppoe_pa

Re: interface media current data

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 15, 2022 at 04:51:25PM +0200, Alexander Bluhm wrote: > On Fri, Jul 15, 2022 at 02:05:40AM +0200, Alexander Bluhm wrote: > > If anyone has some of these old network drivers, please test setting > > media type with ifconfig. > > Updated diff. I have compile tested it on amd64, i386, oct

snmpd(8): restart requests where backend disappeared.

2022-07-22 Thread Martijn van Duren
appl_request_downstream_free gets called from 3 locations: - appl_request_upstream_free: called from appl_request_upstream_reply and cleans up after a request has been answered, whether all the downstream requests have been completed or not (when timed out) - appl_response: When a downstream re

Re: Zap unused ND6_IS_LLINFO_PROBREACH and MAX_REACHABLE_TIME

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 22, 2022 at 12:55:42PM +, Klemens Nanni wrote: > Leftovers from florian's RS/NA purge from the kernel in 2017. > > OK? My grep tells me that can be deleted. OK bluhm@ > diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h > index 82e674c5ecf..01ec60d02b9 100644 > --- a/sys/netin

Re: ypldap without ypbind and portmap

2022-07-22 Thread Theo de Raadt
> One concern I had while working on this was that changing the point at which > YP is enabled might affect the boot process. ypbind is started right after > ypldap, and ypldap becomes discoverable to ypbind before it daemonises, > so this doesn't change the ordering. Yes, it is a bit weird. The

Re: timeout.9: dont' repeat TIMEOUT_PROC sentence

2022-07-22 Thread Klemens Nanni
On Fri, Jul 22, 2022 at 03:03:40PM +0200, Alexander Bluhm wrote: > On Fri, Jul 22, 2022 at 10:38:32AM +, Klemens Nanni wrote: > > timeout_set_flags() explains the flag and the next paragraph would simply > > repeat it. > > > > timeout_set_proc() can be described simpler, just like what the > >

Zap outdated nd6_free() comment about static

2022-07-22 Thread Klemens Nanni
Added in 2002 r1.48 "sync with latest KAME [...]" along the attribute, but nd6_free() became a global void function in 2017 r1.212. Afaik static kernel functions are avoided to aid ddb'ugging and I presume the "significant changes in the kernel" bits of the comment stem from something 20 years

snmpd(8): honour searchrange end

2022-07-22 Thread Martijn van Duren
This is the snmpd(8) part of searchrange end issue mentioned in my libagentx diff from yesterday.[0] Since searchranges are an agentx specific thing I implemented two cases: 1) Backends that support searchranges set ab_range to 1 (application_agentx.c) and check the av_oid_end in appl_varbin

Re: nd6: zap dead store nd6_allocated

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 22, 2022 at 12:17:11PM +, Klemens Nanni wrote: > There since KAME IPv6 import in 1999. > > OK? Pool statistics has this info already. OK bluhm@ > diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c > index df6cf601b34..ff679bcb151 100644 > --- a/sys/netinet6/nd6.c > +++ b/sys/n

Re: nd6: call nd6_timer() without argument

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 22, 2022 at 11:18:14AM +, Klemens Nanni wrote: > nd6_timer_to is a global struct and nd6_timer() accesses it as such, > thereby ignoring its function argument. > > Make that clear when setting the timeout, which now goes like the other > two timeouts. > > OK? OK bluhm@ > Index:

Re: timeout.9: dont' repeat TIMEOUT_PROC sentence

2022-07-22 Thread Alexander Bluhm
On Fri, Jul 22, 2022 at 10:38:32AM +, Klemens Nanni wrote: > timeout_set_flags() explains the flag and the next paragraph would simply > repeat it. > > timeout_set_proc() can be described simpler, just like what the > actual function does; this way I don't feel having just read the > same sen

Zap unused ND6_IS_LLINFO_PROBREACH and MAX_REACHABLE_TIME

2022-07-22 Thread Klemens Nanni
Leftovers from florian's RS/NA purge from the kernel in 2017. OK? diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 82e674c5ecf..01ec60d02b9 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -109,11 +109,9 @@ struct llinfo_nd6 { short ln_router; /* 2^0: ND6 r

Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Klemens Nanni
On Fri, Jul 22, 2022 at 02:27:38PM +0200, Claudio Jeker wrote: > On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote: > > Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL > > is used in many places. > > > > OK? > > Is that a value that should be adjustable? We can

Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Claudio Jeker
On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote: > Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL > is used in many places. > > OK? Is that a value that should be adjustable? > diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c > index ff679bcb151..3decec9

nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Klemens Nanni
Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL is used in many places. OK? diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index ff679bcb151..3decec947c4 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -88,8 +88,6 @@ TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6)

nd6: zap dead store nd6_allocated

2022-07-22 Thread Klemens Nanni
There since KAME IPv6 import in 1999. OK? diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index df6cf601b34..ff679bcb151 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -86,7 +86,7 @@ int nd6_debug = 0; TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6) nd6_list; struct pool nd6_pool;

Re: timeout.9: fix description

2022-07-22 Thread Klemens Nanni
On Fri, Jul 22, 2022 at 06:16:35AM -0500, Scott Cheloha wrote: > I rewrote this page a year or so ago but I > think I dropped the patch due to lack of > developer input. If you give me 12 hours I > will send it out for your consideration. Sure, no hurry, I'll look at it. > I would send it sooner

nd6: call nd6_timer() without argument

2022-07-22 Thread Klemens Nanni
nd6_timer_to is a global struct and nd6_timer() accesses it as such, thereby ignoring its function argument. Make that clear when setting the timeout, which now goes like the other two timeouts. OK? Index: nd6.c === RCS file: /cvs/s

Re: timeout.9: fix description

2022-07-22 Thread Scott Cheloha
> On Jul 22, 2022, at 05:50, Klemens Nanni wrote: > > NAME has it right: >... – execute a function after a specified period of time > > but DESCRIPTION says something else: >The timeout API provides a mechanism to execute a function >at a given time. > > The latter reads as if I co

Re: bgpd kroute F_KERNEL flag

2022-07-22 Thread Theo Buehler
On Fri, Jul 22, 2022 at 12:36:04PM +0200, Claudio Jeker wrote: > There is no need to use F_KERNEL to tag routes from the kernel. > All this can be done by priority (RTP_MINE vs anything else). > The conversion is simple in most cases. > > In kr_fib_delete() and kr_fib_change() check if the route i

timeout.9: fix description

2022-07-22 Thread Klemens Nanni
NAME has it right: ... – execute a function after a specified period of time but DESCRIPTION says something else: The timeout API provides a mechanism to execute a function at a given time. The latter reads as if I could pass a specific point in time, e.g. Fri Jul 22 16:00

timeout.9: dont' repeat TIMEOUT_PROC sentence

2022-07-22 Thread Klemens Nanni
timeout_set_flags() explains the flag and the next paragraph would simply repeat it. timeout_set_proc() can be described simpler, just like what the actual function does; this way I don't feel having just read the same sentence twice. sys/kern/kern_timeout.c: void timeout_set_flags(struct timeou

bgpd kroute F_KERNEL flag

2022-07-22 Thread Claudio Jeker
There is no need to use F_KERNEL to tag routes from the kernel. All this can be done by priority (RTP_MINE vs anything else). The conversion is simple in most cases. In kr_fib_delete() and kr_fib_change() check if the route is a bgpd owned route and in that case remove the F_BGPD_INSERTED flag. Th

libc/yp internals mop up

2022-07-22 Thread Miod Vallat
Following the switch to ypconnect(), several fields in the dom_binding struct used internally are no longer needed. The following diff removes them. Index: yp/ypinternal.h === RCS file: /OpenBSD/src/lib/libc/yp/ypinternal.h,v retrievi