Re: vsw.4: mention veb next to bridge

2022-07-20 Thread Theo de Raadt
Damien Miller wrote: > On Wed, 20 Jul 2022, Chris Cappuccio wrote: > > > Klemens Nanni [k...@openbsd.org] wrote: > > > veb(4) works just fine in this setup, so don't give the impression only > > > bridge(4) would work. > > > > In related items, is it time to tedu bridge(4) and vether(4) ? Is th

Re: vsw.4: mention veb next to bridge

2022-07-20 Thread Damien Miller
On Wed, 20 Jul 2022, Chris Cappuccio wrote: > Klemens Nanni [k...@openbsd.org] wrote: > > veb(4) works just fine in this setup, so don't give the impression only > > bridge(4) would work. > > In related items, is it time to tedu bridge(4) and vether(4) ? Is there > anything veb(4) and vport(4) ca

Re: vsw.4: mention veb next to bridge

2022-07-20 Thread Chris Cappuccio
Klemens Nanni [k...@openbsd.org] wrote: > veb(4) works just fine in this setup, so don't give the impression only > bridge(4) would work. > In related items, is it time to tedu bridge(4) and vether(4) ? Is there anything veb(4) and vport(4) can't do?

[v4] amd64: simplify TSC sync testing

2022-07-20 Thread Scott Cheloha
Hi, Thanks to everyone who tested v3. Attached is v4. I would like to put this into snaps (bcc: deraadt@). If you've been following along and testing these patches, feel free to continue testing. If your results change from v3 to v4, please reply with what happened and your dmesg. I made a fe

vsw.4: mention veb next to bridge

2022-07-20 Thread Klemens Nanni
veb(4) works just fine in this setup, so don't give the impression only bridge(4) would work. OK? Index: vsw.4 === RCS file: /cvs/src/share/man/man4/man4.sparc64/vsw.4,v retrieving revision 1.3 diff -u -p -r1.3 vsw.4 --- vsw.4

Re: sparc64: vnet: add size to free(9) call

2022-07-20 Thread Mark Kettenis
> Date: Wed, 20 Jul 2022 19:38:13 + > From: Klemens Nanni > > On Wed, Jul 01, 2020 at 01:15:06AM +0200, Klemens Nanni wrote: > > Without any later realloactions, size is taken from vnet_dring_alloc(): > > > > struct vnet_dring *vd; > > ... > > vd = malloc(sizeof(struct vnet_dring

fix NAT round-robin and random

2022-07-20 Thread Alexandr Nedvedicky
Hello, below is a final version of patch for NAT issue discussed at bugs@ [1]. Patch below is updated according to feedback I got from Chris, claudio@ and hrvoje@. The summary of changes is as follows: - prevent infinite loop when packet hits NAT rule as follows: pass out on em0 from

Re: [v3] amd64: simplify TSC sync testing

2022-07-20 Thread Masato Asou
Hi, >> On Jul 20, 2022, at 01:48, Masato Asou wrote: >> >> Sorry, my latest reply. >> >> I tested your patch on my Proxmox Virtual Environment on Ryzen7 box. >> It works fine for me. > > This VM doesn't have the ITSC CPU flag, > how is it using the TSC as a timecounter? > >> OpenBSD 7.1-curr

Re: sparc64: vnet: add size to free(9) call

2022-07-20 Thread Klemens Nanni
On Wed, Jul 01, 2020 at 01:15:06AM +0200, Klemens Nanni wrote: > Without any later realloactions, size is taken from vnet_dring_alloc(): > > struct vnet_dring *vd; > ... > vd = malloc(sizeof(struct vnet_dring), M_DEVBUF, M_NOWAIT); > > Tested on T4-2 guest domains: > > vn

Re: bgpd, network code cleanup

2022-07-20 Thread Theo Buehler
On Wed, Jul 20, 2022 at 12:40:18PM +0200, Claudio Jeker wrote: > The it's just a rtlabel refcount leak diff turned into a somewhat larger > diff. First I noticed that expand_networks() was not used for l3vpns which > will cause problems down the line. So alter expand_networks to also handle > l3vpn

Re: [v3] amd64: simplify TSC sync testing

2022-07-20 Thread Scott Cheloha
> On Jul 20, 2022, at 01:48, Masato Asou wrote: > > Sorry, my latest reply. > > I tested your patch on my Proxmox Virtual Environment on Ryzen7 box. > It works fine for me. This VM doesn't have the ITSC CPU flag, how is it using the TSC as a timecounter? > OpenBSD 7.1-current (GENERIC.MP) #1:

bgpd, network code cleanup

2022-07-20 Thread Claudio Jeker
The it's just a rtlabel refcount leak diff turned into a somewhat larger diff. First I noticed that expand_networks() was not used for l3vpns which will cause problems down the line. So alter expand_networks to also handle l3vpn network settings. Then I looked at kr_net_reload() and kr_net_find()

Re: bgpd, refactor kroute_insert

2022-07-20 Thread Claudio Jeker
On Wed, Jul 20, 2022 at 10:56:29AM +0200, Claudio Jeker wrote: > This diff moves kroute_insert to use struct kroute_full and do the > allocation for struct kroute / kroute6 inside kroute_insert. This removes > a lot of similar code all over kroute.c. While doing that also convert > kr_redistribute(

Re: bgpd, plug rtlabel refcount leak on network statements

2022-07-20 Thread Claudio Jeker
On Wed, Jul 20, 2022 at 11:00:00AM +0200, Theo Buehler wrote: > On Wed, Jul 20, 2022 at 10:35:10AM +0200, Claudio Jeker wrote: > > Found while working on kroute code. The network structs needs to release > > the rtlabel reference before being freed. > > Don't expand_networks() and kr_net_delete()

Re: bgpd, plug rtlabel refcount leak on network statements

2022-07-20 Thread Theo Buehler
On Wed, Jul 20, 2022 at 10:35:10AM +0200, Claudio Jeker wrote: > Found while working on kroute code. The network structs needs to release > the rtlabel reference before being freed. Don't expand_networks() and kr_net_delete() need this as well? > > -- > :wq Claudio > > Index: config.c > ==

bgpd, refactor kroute_insert

2022-07-20 Thread Claudio Jeker
This diff moves kroute_insert to use struct kroute_full and do the allocation for struct kroute / kroute6 inside kroute_insert. This removes a lot of similar code all over kroute.c. While doing that also convert kr_redistribute() to use struct kroute_full and kill the code duplication there as well

bgpd, plug rtlabel refcount leak on network statements

2022-07-20 Thread Claudio Jeker
Found while working on kroute code. The network structs needs to release the rtlabel reference before being freed. -- :wq Claudio Index: config.c === RCS file: /cvs/src/usr.sbin/bgpd/config.c,v retrieving revision 1.102 diff -u -p -

Re: pf: pool for pf_anchor

2022-07-20 Thread Alexandr Nedvedicky
Hello, On Tue, Jul 19, 2022 at 10:58:08PM +0200, Alexander Bluhm wrote: > On Tue, Jul 19, 2022 at 07:18:54PM +0200, Moritz Buhl wrote: > > A solution would be to move the allocation of the pf_anchor struct > > into a pool. One final question would be regarding the size of the > > hiwat or hardlim

Re: pf: pool for pf_anchor

2022-07-20 Thread Alexander Bluhm
On Wed, Jul 20, 2022 at 09:43:01AM +0200, Moritz Buhl wrote: > Is the following diff OK? Did you run regress/sbin/pfctl ? OK bluhm@ > Index: sbin/pfctl/pfctl.c > === > RCS file: /mount/openbsd/cvs/src/sbin/pfctl/pfctl.c,v > retrievi

Re: pf: pool for pf_anchor

2022-07-20 Thread Moritz Buhl
On Tue, Jul 19, 2022 at 10:58:08PM +0200, Alexander Bluhm wrote: > On Tue, Jul 19, 2022 at 07:18:54PM +0200, Moritz Buhl wrote: > > A solution would be to move the allocation of the pf_anchor struct > > into a pool. One final question would be regarding the size of the > > hiwat or hardlimit. Any