Re: How to set a HTTP proxy for sysupgrade
On Wed, June 30, 2021 5:28 am, Raimo Niskanen wrote: > Hello list! > > I just upgraded one of our lab machines from 6.8 to 6.9 > (amd64), and our lab environment is closed to the Internet, > so using an HTTP proxy is required to reach out. > > I have set http_proxy, ftp_proxy and https_proxy in > /etc/login.conf, the default class, but it is apparently > not used by rc.firstboot after sysupgrade. > > With the new installer in 6.9 rc.firstboot seems to be > a background process that hangs because of this, so when I > logged in as root after remote upgrade I resolved the stalemate > by first killing an ftp job serving fw_update, then a similar > download job serving syspatch, and waited until the not updated > kernel was relinked. > Then I could run fw_update and syspatch manually. > > Is there a better / proper way to set a HTTP/HTTPS proxy > for sysupgrade? > > Cheers > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > I simply echo the export statements of the proxy environment variables to /etc/rc.firstime before reboot. The installer will always append to the file so fw_update will be added after the variables are exported. The ftp process will timeout in, I think, 5 minutes. That is a long time, but you're not going to be hung there forever. Tim.
Re: support and consulting: new entry request
> On Jun 30, 2021, at 1:50 PM, Ingo Schwarze wrote: > > Hi Navan, > > Navan Carson wrote on Wed, Jun 30, 2021 at 01:08:55PM -0600: > >> The TLS certificate is invalid for https://obsd.solutions/. >> It's for some mcafee.com names. > > I'm sorry, but so far, i'm unable to reproduce. When i connect > to obsd.solutions with HTTPs, the following certificate is > returned from the server: > >Serial Number: >05:d8:3c:dd:c3:1f:f3:15:6c:4f:96:db:14:a2:cd:43 >Issuer: C=US, O=Cloudflare, Inc., CN=Cloudflare Inc ECC CA-3 >Subject: C=US, ST=California, L=San Francisco, O=Cloudflare, Inc., > CN=sni.cloudflaressl.com >X509v3 extensions: >X509v3 Subject Alternative Name: >DNS:sni.cloudflaressl.com, >DNS:obsd.solutions, DNS:*.obsd.solutions > > I verified that with both firefox and nc(1). > > I see nothing involving mcafee.com in there. > > Yours, > Ingo Hi Ingo, You are right. The certificate I am seeing is coming from the WiFi access point I’m on. Sorry for the distraction, and thanks for the additional thing to fix at the relatives house. Take care, Navan
Re: support and consulting: new entry request
Hi Navan, Navan Carson wrote on Wed, Jun 30, 2021 at 01:08:55PM -0600: > The TLS certificate is invalid for https://obsd.solutions/. > It's for some mcafee.com names. I'm sorry, but so far, i'm unable to reproduce. When i connect to obsd.solutions with HTTPs, the following certificate is returned from the server: Serial Number: 05:d8:3c:dd:c3:1f:f3:15:6c:4f:96:db:14:a2:cd:43 Issuer: C=US, O=Cloudflare, Inc., CN=Cloudflare Inc ECC CA-3 Subject: C=US, ST=California, L=San Francisco, O=Cloudflare, Inc., CN=sni.cloudflaressl.com X509v3 extensions: X509v3 Subject Alternative Name: DNS:sni.cloudflaressl.com, DNS:obsd.solutions, DNS:*.obsd.solutions I verified that with both firefox and nc(1). I see nothing involving mcafee.com in there. Yours, Ingo
Re: support and consulting: new entry request
> On Jun 23, 2021, at 9:46 AM, nabbi...@scqr.net wrote: > > 0 > C Japan > P Osaka > T Osaka > Z > O Scqr Inc. > I > A > M contact@obsd.solutions > U https://obsd.solutions/ > B > X > N We are experienced ICT designers/developers and security monks, using > OpenBSD as primary servers for years. [ Company Website ] href="https://www.scqr.net/";>scqr.net > The TLS certificate is invalid for https://obsd.solutions/. It’s for some mcafee.com names.
Re: Sharing desktop with Jitsi and pledge
On Wed, Jun 30, 2021 at 08:02:51AM -, Stuart Henderson wrote: > > To use screen sharing, you'll need to disable pledge, it is specifically > mentioned in the pkg-readme for firefox. Stuart thanks so much for the insight. I should have been more perceptive and consulted the pkg_readme. I am going to leave pledge and unveil alone. I'll just send out the *.odp in advance. Kind regards, Jonathan > >
Re: rad daemon strange error message
Thanks a lot. You were right and my eyes have corrected the misspelling. After correcting the config the RAD server seems to work correctly. kind regards On Wed, 30 Jun 2021 13:58:17 +0200 Markus Wernig wrote: > On 6/30/21 1:32 PM, Pierre Dupond wrote: > > veteher30 has no IPv6 link-local address, ignoring > ^ > > I don't know rad, but from the output above there seems to be a typo in > some config. >
Re: supermicro 5019D-FTN4 server with AMD EPYC 3251 SoC Processor
btw, it would be really helpful if people could send their dmesg to dm...@openbsd.org, this hardware doesn't show up there, in fact there are no EPYC 3xxx CPUs at all.
Re: supermicro 5019D-FTN4 server with AMD EPYC 3251 SoC Processor
> Good day everyone > > Does anyone use supermicro 5019D-FTN4 server with AMD EPYC 3251 SoC > Processor? > > https://www.supermicro.com/Aplus/system/Embedded/AS-5019D-FTN4.cfm > > Experience and dmesg would be perfect. > > I did not find any mention in the archive > > I'm looking for a new efficient router for 10" depth rack. > > Thanks > There should be no reason the server part will not work. I run the motherboard in a different rack mount case and it works fine. OpenBSD 6.9 (GENERIC.MP) #3: Mon Jun 7 08:21:26 MDT 2021 r...@syspatch-69-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8458678272 (8066MB) avail mem = 8186937344 (7807MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xdab37000 (49 entries) bios0: vendor American Megatrends Inc. version "1.0" date 01/30/2019 bios0: Supermicro Super Server acpi0 at bios0: ACPI 6.1 acpi0: sleep states S0 S5 acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SSDT MCFG SSDT CRAT CDIT BERT EINJ HEST HPET SSDT UEFI IVRS SSDT WSMT acpi0: wakeup devices S0D0(S3) S0D1(S3) S0D2(S3) S0D3(S3) S1D0(S3) S1D1(S3) S1D2(S3) S1D3(S3) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD EPYC 3251 8-Core Processor, 2500.45 MHz, 17-01-02 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu0: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu1: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu1: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu2: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu2: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 6 (application processor) cpu3: AMD EPYC 3251 8-Core Processor, 2500.00 MHz, 17-01-02 cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu3: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu3: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3: smt 0, core 3, package 0 cpu4 at mainbus0: apid 8 (application processor) cpu4: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,
Re: C style in OpenBSD
The reason to a style guide is not that one style is inherently better than another. It is because consistency makes the code easier to read for anyone familiar with that style. Part of that means using common idioms that are immediately recognizable by someone familiar with the style. This reduces the amount of time is takes someone to understand the code. We want to make the code easy to read, since time spent in maintenance is much greater than the time spent initially writing it. This means that being clever when writing code is a _bad_ thing if it reduces readability. There is plenty of use of the ternary operator in the OpenBSD code base but it tends to be used sparingly. Nesting the ternary operator must be done with care due to C's operator precedence. We've seen bugs in the past due to this. In other words, just because you can doesn't mean you should ;-) What one person finds clear and obvious may seem obfuscated to someone else. We try to use a consistent style so that everyone can read and understand the code once they are familiar with that style and common idioms. - todd
Re: supermicro 5019D-FTN4 server with AMD EPYC 3251 SoC Processor
Le Tue, Jun 29, 2021 at 07:46:55PM +0200, EdaSky a écrit : > Good day everyone > > Does anyone use supermicro 5019D-FTN4 server with AMD EPYC 3251 SoC > Processor? > > https://www.supermicro.com/Aplus/system/Embedded/AS-5019D-FTN4.cfm > > Experience and dmesg would be perfect. > Experience is perfect so far. I am really happy with it as BGP edge. OpenBSD 6.9-current (GENERIC.MP) #20: Sun May 16 00:32:45 MDT 2021 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 34228760576 (32643MB) avail mem = 33175949312 (31639MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xdab19000 (51 entries) bios0: vendor American Megatrends Inc. version "1.0c" date 06/30/2020 bios0: Supermicro AS -5019D-FTN4 acpi0 at bios0: ACPI 6.1 acpi0: sleep states S0 S5 acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SPMI SSDT MCFG SSDT CRAT CDIT BERT EINJ HEST HPET SSDT UEFI SSDT WSMT acpi0: wakeup devices S0D0(S3) S0D1(S3) S0D2(S3) S0D3(S3) S1D0(S3) S1D1(S3) S1D2(S3) S1D3(S3) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD EPYC 3251 8-Core Processor, 2500.55 MHz, 17-01-02 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu0: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu1: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu1: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu2: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu2: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 6 (application processor) cpu3: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES cpu3: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB 64b/line 8-way L2 cache cpu3: ITLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3: smt 0, core 3, package 0 cpu4 at mainbus0: apid 8 (application processor) cpu4: AMD EPYC 3251 8-Core Processor, 2500.01 MHz, 17-01-02 cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,O
How to set a HTTP proxy for sysupgrade
Hello list! I just upgraded one of our lab machines from 6.8 to 6.9 (amd64), and our lab environment is closed to the Internet, so using an HTTP proxy is required to reach out. I have set http_proxy, ftp_proxy and https_proxy in /etc/login.conf, the default class, but it is apparently not used by rc.firstboot after sysupgrade. With the new installer in 6.9 rc.firstboot seems to be a background process that hangs because of this, so when I logged in as root after remote upgrade I resolved the stalemate by first killing an ftp job serving fw_update, then a similar download job serving syspatch, and waited until the not updated kernel was relinked. Then I could run fw_update and syspatch manually. Is there a better / proper way to set a HTTP/HTTPS proxy for sysupgrade? Cheers -- / Raimo Niskanen, Erlang/OTP, Ericsson AB
Re: rad daemon strange error message
On 6/30/21 1:32 PM, Pierre Dupond wrote: > veteher30 has no IPv6 link-local address, ignoring ^ I don't know rad, but from the output above there seems to be a typo in some config.
Re: C style in OpenBSD
> Date: Wed, 30 Jun 2021 13:27:21 +1000 > From: Reuben ua Bríġ > it seems a lot of people are having difficulty with my ?: expression. > > rather than going through each branch yourself, think of it like a > `boolean' switch that stops on the first `true' question (the bit on > each line before the ?), and then chooses the corresponding `answer' > (the bit before the :). try it on this one: > > /* read the above paragraph BEFORE the following code! */ > max(a,b,c) { > return > a > b && a > c ? a : > b > c ? b : > c; > } got the hang of that? you may be ready for a more efficient version: /* read the quoted code BEFORE the following code... */ max(a,b,c) { return a > b ? ( a > c ? a : c ) : b > c ? b : c; }
Re: C style in OpenBSD
heres a fun example i was an idiot to miss: > Date: Tue, 29 Jun 2021 15:17:58 +0959 > From: Reuben ua Bríġ > ANSI 'K'&'R' is really just 'B' in disguise. /* note the () around & are for ==, not ?: */ int main() { return ('K'&'R') == 'B' ? 0 : 1; }
Re: C style in OpenBSD
it seems a lot of people are having difficulty with my ?: expression. rather than going through each branch yourself, think of it like a `boolean' switch that stops on the first `true' question (the bit on each line before the ?), and then chooses the corresponding `answer' (the bit before the :). try it on this one: /* read the above paragraph BEFORE the following code! */ max(a,b,c) { return a > b && a > c ? a : b > c ? b : c; } remember that, whether or not you understand the C grammar, the two blocks of code i provided last email are equivalent. i find the ?: notation rewarding in its simplicity and compactness. it is no more complicated then elif, but more regular and needs fewer (). finally i note that K (from K&R), rather than write in idiomatic fortran, wrote ratfor. no, i am not comparing myself to, K neither my example to ratfor: i have not changed C, merely understood its grammar. (thanks R!) thanks for your time, reuben. --- > ANSI 'K'&'R' is really just 'B' in disguise. at least one person missed the ''
Re: Source of the spin
On Wed, Jun 30, 2021 at 4:15 AM Stuart Henderson wrote: > > On 2021-06-29, Sven F. wrote: > > Dear readers, > > > > I probably did something silly again, > > Could you help with a bit of knowledge around performance ? > > My openbsd CPU (6.8) is spinning a lot : > > > > 0.0%Int 53.1%Spn 25.8%Sys 19.6%Usr 1.4%Idle > > > > * Is this bad ? > > * What kind of basic operation ( like basic shell scripting ) could do > > that ? ? > > > > Thank you, > > > > This means the kernel is spending a lot of time waiting for other CPUs > to exit locked sections. > > First things first, try 6.9, the malloc cache implementation changed > and that may help. > > Thank you, Can I use ktrace to check where the lock comes from ( can't really put 6.9 easily to test ) ? Will try to get 6.9 anyway, but it would be either to know what i need to test. -- -- - Knowing is not enough; we must apply. Willing is not enough; we must do
Re: Source of the spin
On 2021-06-30, Jay Hart wrote: >> On 2021-06-29, Sven F. wrote: >>> Dear readers, >>> >>> I probably did something silly again, >>> Could you help with a bit of knowledge around performance ? >>> My openbsd CPU (6.8) is spinning a lot : >>> >>> 0.0%Int 53.1%Spn 25.8%Sys 19.6%Usr 1.4%Idle > > What command produces this output? It doesn't look like 'top' to me. systat.
Re: apu2 and Atheros WLE600VX not working
On 2021-06-30 8:01 a.m., Stefan Sperling wrote: On Wed, Jun 30, 2021 at 07:45:13AM -0400, George wrote: Hi thanks for the reply! How is the performance on the 200nx are you using it as an access point i.e. router? How many antennas? There is currently no way to run an AP on OpenBSD if you require performance levels comparable to commercially available access points. Regarding athn(4) in particular, there is no support for Tx aggregation and there are unresolved bugs which prevent Tx rates at the upper end from working. You can expect about 20 Mbit/s top, most likely less than that. But it is fairly stable. If performance isn't your main concern it can be fine. athn(4) only supports 2 antenna cards. Cards with 3 anntennas don't work yet. If you can only connect one antenna you need to run this command to prevent packet loss: ifconfig athn0 nwflag nomimo Thanks for the informative and complete answer. I think I will resort to using a cheap off the shelf router for the moment as 20Mb/s top means a lot less average throughput making it kind of pointless as an AP. Cheers, George
Re: apu2 and Atheros WLE600VX not working
On Wed, Jun 30, 2021 at 07:45:13AM -0400, George wrote: > Hi thanks for the reply! How is the performance on the 200nx are you using > it as an access point i.e. router? How many antennas? There is currently no way to run an AP on OpenBSD if you require performance levels comparable to commercially available access points. Regarding athn(4) in particular, there is no support for Tx aggregation and there are unresolved bugs which prevent Tx rates at the upper end from working. You can expect about 20 Mbit/s top, most likely less than that. But it is fairly stable. If performance isn't your main concern it can be fine. athn(4) only supports 2 antenna cards. Cards with 3 anntennas don't work yet. If you can only connect one antenna you need to run this command to prevent packet loss: ifconfig athn0 nwflag nomimo
Re: Source of the spin
> On 2021-06-29, Sven F. wrote: >> Dear readers, >> >> I probably did something silly again, >> Could you help with a bit of knowledge around performance ? >> My openbsd CPU (6.8) is spinning a lot : >> >> 0.0%Int 53.1%Spn 25.8%Sys 19.6%Usr 1.4%Idle What command produces this output? It doesn't look like 'top' to me. Thanks, Jay >> >> * Is this bad ? >> * What kind of basic operation ( like basic shell scripting ) could do that >> ? ? >> >> Thank you, >> > > This means the kernel is spending a lot of time waiting for other CPUs > to exit locked sections. > > First things first, try 6.9, the malloc cache implementation changed > and that may help. > > >
Re: apu2 and Atheros WLE600VX not working
On 2021-06-30 3:29 a.m., Marcus MERIGHI wrote: Hello! g.lis...@nodeunit.com (George), 2021.06.30 (Wed) 01:41 (CEST): I am running OpenBSD 6.9 the machine recognizes an earlier version of the same wireless PCIe card, namely the WLE200NX but for some, unknown to me reason, the WLE600VX is not recognized. I checked the athn driver support for the chip set which should be AR9280 and it list it. When I boot I get in dmesg: "Atheros QCA986x/988x" rev 0x00 at pci1 dev 0 function 0 not configured You have: https://www.pcengines.ch/wle600vx.htm Chipset Qualcomm Atheros QCA9882 "Expect some pain, ath10k drivers required. Currently not supported by pfSense / OPNsense !" => GCA9882 is not in athn(4). You want: https://www.pcengines.ch/wle200nx.htm Chipset Qualcomm Atheros AR9280. => AR9280 is in athn(4). I have the latter and it works, in an apu2. Hi thanks for the reply! How is the performance on the 200nx are you using it as an access point i.e. router? How many antennas? Marcus
rad daemon strange error message
Hi All, I am trying to setup the rad daemon on a quite complicated configuration. I receive however a strange error message which I don't understand fully. The message claims that there is no link local address on the device "vether30". But, as far as I understand a such address is present with the value "fe80::fce1:baff:fed2:a15%vether30" (as one can notice in the following log). Any idea about this problem? Thanks for your help, Best regards, --Message log--- saleve# ifconfig vether30 vether30: flags=248943 mtu 1500 lladdr fe:e1:ba:d2:0a:15 description: Adr. net 'Sourire Phones' index 12 priority 0 llprio 3 groups: vether media: Ethernet autoselect status: active inet 192.168.30.10 netmask 0xff00 broadcast 192.168.30.255 inet6 fe80::fce1:baff:fed2:a15%vether30 prefixlen 64 scopeid 0xc inet6 fd4f:bd4e:6d27:30::10 prefixlen 64 inet6 2a02:168:c000:30::10 prefixlen 64 saleve# rad -d -v PREF_SOURIRE_LOCAL = "fd4f:bd4e:6d27:cafe" PREF_SOURIRE_INIT7 = "2a02:168:c000:cafe" PREF_MONTBRILLANT_LOCAL = "fd4f:bd4e:6d27:0" PREF_MONTBRILLANT_INIT7 = "2a02:168:c000:0" PREF_PHONES_LOCAL = "fd4f:bd4e:6d27:30" PREF_PHONES_INIT7 = "2a02:168:c000:30" PREF_TV_LOCAL = "fd4f:bd4e:6d27:40" PREF_TV_INIT7 = "2a02:168:c000:40" PREF_LOCAL_LINK = "fe80" DNS_SECOURS = "2620:fe::9" startup SIOCGIFRDOMAIN: Device not configured veteher30 has no IPv6 link-local address, ignoring SIOCGIFRDOMAIN: Device not configured veteher40 has no IPv6 link-local address, ignoring ^Cfrontend exiting waiting for children to terminate engine exiting terminating saleve#
Re: Source of the spin
On 2021-06-29, Sven F. wrote: > Dear readers, > > I probably did something silly again, > Could you help with a bit of knowledge around performance ? > My openbsd CPU (6.8) is spinning a lot : > > 0.0%Int 53.1%Spn 25.8%Sys 19.6%Usr 1.4%Idle > > * Is this bad ? > * What kind of basic operation ( like basic shell scripting ) could do that > ? ? > > Thank you, > This means the kernel is spending a lot of time waiting for other CPUs to exit locked sections. First things first, try 6.9, the malloc cache implementation changed and that may help.
Re: Sharing desktop with Jitsi and pledge
On 2021-06-29, Jonathan Drews wrote: > Hi Folks: > > I am running OpenBSD 6.9 GENERIC.MP#4 amd64 and have Jitsi working > well here on OpenBSD. The audio and video work fine. So do the typing > of comments in Jitsi > > However when I attempt to share my desktop, through Jitsi, then > Firefox crashes. I get this message in my dmesg output: > > firefox[17370]: pledge "", syscall 289 > > It looks like pledge is stopping Jitsi, as it should. Any suggestions > at to how I could share a presentation through OpenBSD? I've tried > Zoom but it doesn't work as well as Jitsi. > > Kind regards, > Jonathan > > To use screen sharing, you'll need to disable pledge, it is specifically mentioned in the pkg-readme for firefox.
Re: C style in OpenBSD
Saying a code is horrible, is often subjective. If you work on your own project, choose the style that fits your mind. If you are patching a program, try to be consistent with the existing code. You can also have a look at the “style” manpage but keep in mind that it is for the kernel. Ronan > Le 29 juin 2021 à 15:00, Reuben ua Bríġ a écrit : > > gday folks. > > first i will say i am do not consider myself well versed in machine > languages. i have use plain tex for a while, and i use the odd bit of > sh, sed, etc. i recently read K&R because sh disgusts me. i have seen > a bit of some programming languages, but nothing very recent, and i > cant say C or most any other language i have seen seem very sensible. > i am have an account on a timesharing system in the CS school, but > otherwise have nothing to do with them or any computer scholars. > > i have seen much comment from openbsd developers about bad C style. > i would be thankful to see examples of `good' style, in case i wish to > write some C for OpenBSD. (right now i am interested in fixing some > bugs in vi.) > > also are there places for discussing such things, suitable for a newbie? > > cheers, > reuben. > > p.s. one particular question i have is on the mandoc/main.c: > > i found the following: > >if (strcmp(progname, BINM_MAN) == 0) >search.argmode = ARG_NAME; >else if (strcmp(progname, BINM_APROPOS) == 0) >search.argmode = ARG_EXPR; >else if (strcmp(progname, BINM_WHATIS) == 0) >search.argmode = ARG_WORD; >else if (strncmp(progname, "help", 4) == 0) >search.argmode = ARG_NAME; >else >search.argmode = ARG_FILE; > > much more readable as: > >search.argmode = >strcmp(progname, BINM_MAN) == 0 ? ARG_NAME : >strcmp(progname, BINM_APROPOS) == 0 ? ARG_EXPR : >strcmp(progname, BINM_WHATIS) == 0 ?ARG_WORD : >strncmp(progname, "help", 4) == 0 ? ARG_NAME : >ARG_FILE; > > a style i came up with in imitation of some disgusting haskell code. > any comments? > > --- > ANSI 'K'&'R' is really just 'B' in disguise. >
Re: apu2 and Atheros WLE600VX not working
Hello! g.lis...@nodeunit.com (George), 2021.06.30 (Wed) 01:41 (CEST): > I am running OpenBSD 6.9 the machine recognizes an earlier version of > the same wireless PCIe card, namely the WLE200NX but for some, > unknown to me reason, the WLE600VX is not recognized. I checked the > athn driver support for the chip set which should be AR9280 and it list it. > When I boot I get in dmesg: > "Atheros QCA986x/988x" rev 0x00 at pci1 dev 0 function 0 not configured You have: https://www.pcengines.ch/wle600vx.htm Chipset Qualcomm Atheros QCA9882 "Expect some pain, ath10k drivers required. Currently not supported by pfSense / OPNsense !" => GCA9882 is not in athn(4). You want: https://www.pcengines.ch/wle200nx.htm Chipset Qualcomm Atheros AR9280. => AR9280 is in athn(4). I have the latter and it works, in an apu2. Marcus